@@ -15,18 +15,19 @@ var Snapshot = require('../../snapshot');
15
15
var Icons = require ( '../../../build/ploticon' ) ;
16
16
17
17
18
- var modebarButtons = module . exports = { } ;
18
+ var modeBarButtons = module . exports = { } ;
19
19
20
20
/**
21
- * Modebar buttons configuration
21
+ * ModeBar buttons configuration
22
22
*
23
23
* @param {string } name
24
24
* name / id of the buttons (for tracking)
25
25
* @param {string } title
26
26
* text that appears while hovering over the button,
27
27
* enter null, false or '' for no hover text
28
28
* @param {string } icon
29
- * svg icon associated with the button
29
+ * svg icon object associated with the button
30
+ * can be linked to Plotly.Icons to use the default plotly icons
30
31
* @param {string } [gravity]
31
32
* icon positioning
32
33
* @param {function } click
@@ -42,7 +43,7 @@ var modebarButtons = module.exports = {};
42
43
* is the button a toggle button?
43
44
*/
44
45
45
- modebarButtons . toImage = {
46
+ modeBarButtons . toImage = {
46
47
name : 'toImage' ,
47
48
title : 'Download plot as a png' ,
48
49
icon : Icons . camera ,
@@ -93,7 +94,7 @@ modebarButtons.toImage = {
93
94
}
94
95
} ;
95
96
96
- modebarButtons . sendDataToCloud = {
97
+ modeBarButtons . sendDataToCloud = {
97
98
name : 'sendDataToCloud' ,
98
99
title : 'Save and edit plot in cloud' ,
99
100
icon : Icons . disk ,
@@ -102,7 +103,7 @@ modebarButtons.sendDataToCloud = {
102
103
}
103
104
} ;
104
105
105
- modebarButtons . zoom2d = {
106
+ modeBarButtons . zoom2d = {
106
107
name : 'zoom2d' ,
107
108
title : 'Zoom' ,
108
109
attr : 'dragmode' ,
@@ -111,7 +112,7 @@ modebarButtons.zoom2d = {
111
112
click : handleCartesian
112
113
} ;
113
114
114
- modebarButtons . pan2d = {
115
+ modeBarButtons . pan2d = {
115
116
name : 'pan2d' ,
116
117
title : 'Pan' ,
117
118
attr : 'dragmode' ,
@@ -120,7 +121,7 @@ modebarButtons.pan2d = {
120
121
click : handleCartesian
121
122
} ;
122
123
123
- modebarButtons . zoomIn2d = {
124
+ modeBarButtons . zoomIn2d = {
124
125
name : 'zoomIn2d' ,
125
126
title : 'Zoom in' ,
126
127
attr : 'zoom' ,
@@ -129,7 +130,7 @@ modebarButtons.zoomIn2d = {
129
130
click : handleCartesian
130
131
} ;
131
132
132
- modebarButtons . zoomOut2d = {
133
+ modeBarButtons . zoomOut2d = {
133
134
name : 'zoomOut2d' ,
134
135
title : 'Zoom out' ,
135
136
attr : 'zoom' ,
@@ -138,7 +139,7 @@ modebarButtons.zoomOut2d = {
138
139
click : handleCartesian
139
140
} ;
140
141
141
- modebarButtons . autoScale2d = {
142
+ modeBarButtons . autoScale2d = {
142
143
name : 'autoScale2d' ,
143
144
title : 'Autoscale' ,
144
145
attr : 'zoom' ,
@@ -147,7 +148,7 @@ modebarButtons.autoScale2d = {
147
148
click : handleCartesian
148
149
} ;
149
150
150
- modebarButtons . resetScale2d = {
151
+ modeBarButtons . resetScale2d = {
151
152
name : 'resetScale2d' ,
152
153
title : 'Reset axes' ,
153
154
attr : 'zoom' ,
@@ -156,7 +157,7 @@ modebarButtons.resetScale2d = {
156
157
click : handleCartesian
157
158
} ;
158
159
159
- modebarButtons . hoverClosestCartesian = {
160
+ modeBarButtons . hoverClosestCartesian = {
160
161
name : 'hoverClosestCartesian' ,
161
162
title : 'Show closest data on hover' ,
162
163
attr : 'hovermode' ,
@@ -166,7 +167,7 @@ modebarButtons.hoverClosestCartesian = {
166
167
click : handleCartesian
167
168
} ;
168
169
169
- modebarButtons . hoverCompareCartesian = {
170
+ modeBarButtons . hoverCompareCartesian = {
170
171
name : 'hoverCompareCartesian' ,
171
172
title : 'Compare data on hover' ,
172
173
attr : 'hovermode' ,
@@ -237,7 +238,7 @@ function handleCartesian(gd, ev) {
237
238
} ) ;
238
239
}
239
240
240
- modebarButtons . zoom3d = {
241
+ modeBarButtons . zoom3d = {
241
242
name : 'zoom3d' ,
242
243
title : 'Zoom' ,
243
244
attr : 'dragmode' ,
@@ -246,7 +247,7 @@ modebarButtons.zoom3d = {
246
247
click : handleDrag3d
247
248
} ;
248
249
249
- modebarButtons . pan3d = {
250
+ modeBarButtons . pan3d = {
250
251
name : 'pan3d' ,
251
252
title : 'Pan' ,
252
253
attr : 'dragmode' ,
@@ -255,7 +256,7 @@ modebarButtons.pan3d = {
255
256
click : handleDrag3d
256
257
} ;
257
258
258
- modebarButtons . orbitRotation = {
259
+ modeBarButtons . orbitRotation = {
259
260
name : 'orbitRotation' ,
260
261
title : 'orbital rotation' ,
261
262
attr : 'dragmode' ,
@@ -264,7 +265,7 @@ modebarButtons.orbitRotation = {
264
265
click : handleDrag3d
265
266
} ;
266
267
267
- modebarButtons . tableRotation = {
268
+ modeBarButtons . tableRotation = {
268
269
name : 'tableRotation' ,
269
270
title : 'turntable rotation' ,
270
271
attr : 'dragmode' ,
@@ -288,15 +289,15 @@ function handleDrag3d(gd, ev) {
288
289
Plotly . relayout ( gd , layoutUpdate ) ;
289
290
}
290
291
291
- modebarButtons . resetCameraDefault3d = {
292
+ modeBarButtons . resetCameraDefault3d = {
292
293
name : 'resetCameraDefault3d' ,
293
294
title : 'Reset camera to default' ,
294
295
attr : 'resetDefault' ,
295
296
icon : Icons . home ,
296
297
click : handleCamera3d
297
298
} ;
298
299
299
- modebarButtons . resetCameraLastSave3d = {
300
+ modeBarButtons . resetCameraLastSave3d = {
300
301
name : 'resetCameraLastSave3d' ,
301
302
title : 'Reset camera to last save' ,
302
303
attr : 'resetLastSave' ,
@@ -332,7 +333,7 @@ function handleCamera3d(gd, ev) {
332
333
*/
333
334
}
334
335
335
- modebarButtons . hoverClosest3d = {
336
+ modeBarButtons . hoverClosest3d = {
336
337
name : 'hoverClosest3d' ,
337
338
title : 'Toggle show closest data on hover' ,
338
339
attr : 'hovermode' ,
@@ -385,7 +386,7 @@ modebarButtons.hoverClosest3d = {
385
386
}
386
387
} ;
387
388
388
- modebarButtons . zoomInGeo = {
389
+ modeBarButtons . zoomInGeo = {
389
390
name : 'zoomInGeo' ,
390
391
title : 'Zoom in' ,
391
392
attr : 'zoom' ,
@@ -394,7 +395,7 @@ modebarButtons.zoomInGeo = {
394
395
click : handleGeo
395
396
} ;
396
397
397
- modebarButtons . zoomOutGeo = {
398
+ modeBarButtons . zoomOutGeo = {
398
399
name : 'zoomOutGeo' ,
399
400
title : 'Zoom in' ,
400
401
attr : 'zoom' ,
@@ -403,7 +404,7 @@ modebarButtons.zoomOutGeo = {
403
404
click : handleGeo
404
405
} ;
405
406
406
- modebarButtons . resetGeo = {
407
+ modeBarButtons . resetGeo = {
407
408
name : 'resetGeo' ,
408
409
title : 'Reset' ,
409
410
attr : 'reset' ,
@@ -412,7 +413,7 @@ modebarButtons.resetGeo = {
412
413
click : handleGeo
413
414
} ;
414
415
415
- modebarButtons . hoverClosestGeo = {
416
+ modeBarButtons . hoverClosestGeo = {
416
417
name : 'hoverClosestGeo' ,
417
418
title : 'Toggle show closest data on hover' ,
418
419
attr : 'hovermode' ,
@@ -445,7 +446,7 @@ function handleGeo(gd, ev) {
445
446
}
446
447
}
447
448
448
- modebarButtons . hoverClosestGl2d = {
449
+ modeBarButtons . hoverClosestGl2d = {
449
450
name : 'hoverClosestGl2d' ,
450
451
title : 'Toggle show closest data on hover' ,
451
452
attr : 'hovermode' ,
@@ -456,7 +457,7 @@ modebarButtons.hoverClosestGl2d = {
456
457
click : toggleHover
457
458
} ;
458
459
459
- modebarButtons . hoverClosestPie = {
460
+ modeBarButtons . hoverClosestPie = {
460
461
name : 'hoverClosestPie' ,
461
462
title : 'Toggle show closest data on hover' ,
462
463
attr : 'hovermode' ,
0 commit comments