1
1
'use strict' ;
2
2
3
- /* global MathJax:false, Promise:false */
3
+ /* global MathJax:false */
4
4
5
- var Plotly = require ( '../plotly' ) ,
6
- d3 = require ( 'd3' ) ;
5
+ var Plotly = require ( '../plotly' ) ;
6
+ var d3 = require ( 'd3' ) ;
7
7
8
8
var util = module . exports = { } ;
9
9
10
10
// Append SVG
11
- /////////////////////////////
12
11
13
12
d3 . selection . prototype . appendSVG = function ( _svgString ) {
14
13
var skeleton = '<svg xmlns="http://www.w3.org/2000/svg" ' +
@@ -28,7 +27,6 @@ d3.selection.prototype.appendSVG = function(_svgString) {
28
27
} ;
29
28
30
29
// Text utilities
31
- /////////////////////////////
32
30
33
31
util . html_entity_decode = function ( s ) {
34
32
var hiddenDiv = d3 . select ( 'body' ) . append ( 'div' ) . style ( { display : 'none' } ) . html ( '' ) ;
@@ -46,7 +44,6 @@ util.xml_entity_encode = function(str){
46
44
} ;
47
45
48
46
// text converter
49
- /////////////////////////////
50
47
51
48
function getSize ( _selection , _dimension ) {
52
49
return _selection . node ( ) . getBoundingClientRect ( ) [ _dimension ] ;
@@ -171,7 +168,6 @@ util.convertToTspans = function(_context, _callback){
171
168
172
169
173
170
// MathJax
174
- /////////////////////////////
175
171
176
172
function cleanEscapesForTex ( s ) {
177
173
return s . replace ( / ( < | & l t ; | & # 6 0 ; ) / g, '\\lt ' )
@@ -357,7 +353,6 @@ function alignHTMLWith(_base, container, options){
357
353
}
358
354
359
355
// Editable title
360
- /////////////////////////////
361
356
362
357
util . makeEditable = function ( context , _delegate , options ) {
363
358
if ( ! options ) options = { } ;
0 commit comments