|
75 | 75 | return Utils.sortBy(nodes, function(n) { return (n.x + n.y * column); });
|
76 | 76 | },
|
77 | 77 |
|
78 |
| - createStylesheet: function(id, parent) { |
79 |
| - var style = document.createElement('style'); |
80 |
| - style.setAttribute('type', 'text/css'); |
81 |
| - style.setAttribute('data-gs-style-id', id); |
82 |
| - if (style.styleSheet) { |
83 |
| - style.styleSheet.cssText = ''; |
84 |
| - } else { |
85 |
| - style.appendChild(document.createTextNode('')); |
86 |
| - } |
87 |
| - if (!parent) { parent = document.getElementsByTagName('head')[0]; } // default to head |
88 |
| - parent.insertBefore(style, parent.firstChild); |
89 |
| - return style.sheet; |
90 |
| - }, |
| 78 | + createStylesheet: function(id, parent) { |
| 79 | + var style = document.createElement('style'); |
| 80 | + style.setAttribute('type', 'text/css'); |
| 81 | + style.setAttribute('data-gs-style-id', id); |
| 82 | + if (style.styleSheet) { |
| 83 | + style.styleSheet.cssText = ''; |
| 84 | + } else { |
| 85 | + style.appendChild(document.createTextNode('')); |
| 86 | + } |
| 87 | + if (!parent) { parent = document.getElementsByTagName('head')[0]; } // default to head |
| 88 | + parent.insertBefore(style, parent.firstChild); |
| 89 | + return style.sheet; |
| 90 | + }, |
91 | 91 |
|
92 |
| - removeStylesheet: function(id) { |
93 |
| - $('STYLE[data-gs-style-id=' + id + ']').remove(); |
94 |
| - }, |
| 92 | + removeStylesheet: function(id) { |
| 93 | + $('STYLE[data-gs-style-id=' + id + ']').remove(); |
| 94 | + }, |
95 | 95 |
|
96 | 96 | insertCSSRule: function(sheet, selector, rules, index) {
|
97 | 97 | if (typeof sheet.insertRule === 'function') {
|
|
0 commit comments