Skip to content

Instantly share code, notes, and snippets.

View yusk90's full-sized avatar

Yurii Skorniakov yusk90

View GitHub Profile
var $ = go.GraphObject.make; // for conciseness in defining templates
myDiagram = $(go.Diagram, "myDiagramDiv", // create a Diagram for the DIV HTML element
{
initialContentAlignment: go.Spot.Center, // center the content
"undoManager.isEnabled": true // enable undo & redo
});
// define a simple Node template
myDiagram.nodeTemplate =
@yusk90
yusk90 / test.js
Created January 10, 2016 13:54
Test
class Animal {
constructor(name) {
this.name = name;
}
getName() {
return this.name;
}
}
class Dog extends Animal {
@yusk90
yusk90 / index.html
Created July 11, 2015 09:00
20.06.15
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<div id="button-container">
<button id="add-class">Add Class</button>
@yusk90
yusk90 / gist:60afcc24fe17ea2396fa
Last active August 29, 2015 14:22
addEventListener
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
#inputField {
width: 94px;
margin-bottom: 5px;
}
var list = document.getElementById('list');
list.classList;
list.parentNode;
list.children;
list.style.background = '#fff';
list.childNodes;
list.children[0].innerText = 'asd'; //замена элемента
list.children[0].innerText += 'asd'; //добавление текста
list.children[0].innerHTML = '<p>qwe</p>';