changeset 35255 | ad0de63e1d6a |
parent 35235 | 4a6c51f5ae4d |
child 35407 | 27ab3150cd50 |
35254:9c99541e3d56 | 35255:ad0de63e1d6a |
---|---|
1819 var data = [{"edges": [[0, 0, 1, 3, "FF0000"]], "node": "cad8025a2e87", "vertex": [0, 1]}, {"edges": [[0, 0, 1, 3, ""]], "node": "1d22e65f027e", "vertex": [0, 1]}, {"edges": [[0, 0, 1, 3, ""]], "node": "a4f92ed23982", "vertex": [0, 1]}, {"edges": [], "node": "2ef0ac749a14", "vertex": [0, 1]}]; |
1819 var data = [{"edges": [[0, 0, 1, 3, "FF0000"]], "node": "cad8025a2e87", "vertex": [0, 1]}, {"edges": [[0, 0, 1, 3, ""]], "node": "1d22e65f027e", "vertex": [0, 1]}, {"edges": [[0, 0, 1, 3, ""]], "node": "a4f92ed23982", "vertex": [0, 1]}, {"edges": [], "node": "2ef0ac749a14", "vertex": [0, 1]}]; |
1820 var graph = new Graph(); |
1820 var graph = new Graph(); |
1821 graph.scale(39); |
1821 graph.scale(39); |
1822 |
1822 |
1823 graph.vertex = function(x, y, radius, color, parity, cur) { |
1823 graph.vertex = function(x, y, radius, color, parity, cur) { |
1824 |
1824 Graph.prototype.vertex.apply(this, arguments); |
1825 this.ctx.beginPath(); |
1825 return ['<li class="bg parity' + parity + '"></li>', '']; |
1826 color = this.setColor(color, 0.25, 0.75); |
|
1827 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
|
1828 this.ctx.fill(); |
|
1829 |
|
1830 var bg = '<li class="bg parity' + parity + '"></li>'; |
|
1831 var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size; |
|
1832 |
|
1833 var item = document.querySelector('[data-node="' + cur.node + '"]'); |
|
1834 if (item) { |
|
1835 item.style.paddingLeft = left + 'px'; |
|
1836 } |
|
1837 |
|
1838 return [bg, '']; |
|
1839 |
|
1840 } |
1826 } |
1841 |
1827 |
1842 graph.render(data); |
1828 graph.render(data); |
1843 |
1829 |
1844 // stop hiding script --> |
1830 // stop hiding script --> |