Revize 5502b34e
Přidáno uživatelem Pavel Fidranský před více než 6 roky(ů)
sources/src/main/webapp/js/components/sidebarUnconnectedNodeList.js | ||
---|---|---|
18 | 18 |
|
19 | 19 |
this.add = function(node) { |
20 | 20 |
if (!(node instanceof Vertex)) { |
21 |
throw new TypeError(node.toString() + 'is not instance of Vertex');
|
|
21 |
throw new TypeError(node.toString() + ' is not an instance of Vertex');
|
|
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// set remove hook |
... | ... | |
32 | 32 |
|
33 | 33 |
this.remove = function(node) { |
34 | 34 |
if (!(node instanceof Vertex)) { |
35 |
throw new TypeError(node.toString() + 'is not instance of Vertex');
|
|
35 |
throw new TypeError(node.toString() + ' is not an instance of Vertex');
|
|
36 | 36 |
} |
37 | 37 |
|
38 | 38 |
// unset remove hook |
sources/src/main/webapp/js/components/viewport.js | ||
---|---|---|
28 | 28 |
|
29 | 29 |
this.addEdge = function(edge) { |
30 | 30 |
if (!(edge instanceof Edge)) { |
31 |
throw new TypeError(edge.toString() + 'is not instance of Edge');
|
|
31 |
throw new TypeError(edge.toString() + ' is not an instance of Edge');
|
|
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
edgeList.push(edge); |
sources/src/main/webapp/js/utils/dom.js | ||
---|---|---|
26 | 26 |
*/ |
27 | 27 |
static createHtmlElement(tagName, attributes = {}) { |
28 | 28 |
if (DOM.validHTMLTags.indexOf(tagName) === -1) { |
29 |
throw new InvalidArgumentError(tagName + 'is not a valid HTML element'); |
|
29 |
throw new InvalidArgumentError(tagName + ' is not a valid HTML element');
|
|
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
const element = document.createElement(tagName); |
... | ... | |
47 | 47 |
*/ |
48 | 48 |
static createSvgElement(tagName, attributes = {}) { |
49 | 49 |
if (DOM.validSVGTags.indexOf(tagName) === -1) { |
50 |
throw new InvalidArgumentError(tagName + 'is not a valid SVG element'); |
|
50 |
throw new InvalidArgumentError(tagName + ' is not a valid SVG element');
|
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
const element = document.createElementNS('http://www.w3.org/2000/svg', tagName); |
... | ... | |
79 | 79 |
*/ |
80 | 80 |
static h(tagName, attributes = {}, children = [], options = null) { |
81 | 81 |
if (DOM.validHTMLTags.indexOf(tagName) === -1) { |
82 |
throw new InvalidArgumentError(tagName + 'is not a valid HTML element'); |
|
82 |
throw new InvalidArgumentError(tagName + ' is not a valid HTML element');
|
|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
const element = document.createElement(tagName, options); |
... | ... | |
117 | 117 |
*/ |
118 | 118 |
static s(tagName, attributes = {}, children = [], options = null) { |
119 | 119 |
if (DOM.validSVGTags.indexOf(tagName) === -1) { |
120 |
throw new InvalidArgumentError(tagName + 'is not a valid SVG element'); |
|
120 |
throw new InvalidArgumentError(tagName + ' is not a valid SVG element');
|
|
121 | 121 |
} |
122 | 122 |
|
123 | 123 |
const element = document.createElementNS('http://www.w3.org/2000/svg', tagName, options); |
Také k dispozici: Unified diff
typos