@@ -15,18 +15,19 @@ var Snapshot = require('../../snapshot');
1515var Icons = require ( '../../../build/ploticon' ) ;
1616
1717
18- var modebarButtons = module . exports = { } ;
18+ var modeBarButtons = module . exports = { } ;
1919
2020/**
21- * Modebar buttons configuration
21+ * ModeBar buttons configuration
2222 *
2323 * @param {string } name
2424 * name / id of the buttons (for tracking)
2525 * @param {string } title
2626 * text that appears while hovering over the button,
2727 * enter null, false or '' for no hover text
2828 * @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
3031 * @param {string } [gravity]
3132 * icon positioning
3233 * @param {function } click
@@ -42,7 +43,7 @@ var modebarButtons = module.exports = {};
4243 * is the button a toggle button?
4344 */
4445
45- modebarButtons . toImage = {
46+ modeBarButtons . toImage = {
4647 name : 'toImage' ,
4748 title : 'Download plot as a png' ,
4849 icon : Icons . camera ,
@@ -93,7 +94,7 @@ modebarButtons.toImage = {
9394 }
9495} ;
9596
96- modebarButtons . sendDataToCloud = {
97+ modeBarButtons . sendDataToCloud = {
9798 name : 'sendDataToCloud' ,
9899 title : 'Save and edit plot in cloud' ,
99100 icon : Icons . disk ,
@@ -102,7 +103,7 @@ modebarButtons.sendDataToCloud = {
102103 }
103104} ;
104105
105- modebarButtons . zoom2d = {
106+ modeBarButtons . zoom2d = {
106107 name : 'zoom2d' ,
107108 title : 'Zoom' ,
108109 attr : 'dragmode' ,
@@ -111,7 +112,7 @@ modebarButtons.zoom2d = {
111112 click : handleCartesian
112113} ;
113114
114- modebarButtons . pan2d = {
115+ modeBarButtons . pan2d = {
115116 name : 'pan2d' ,
116117 title : 'Pan' ,
117118 attr : 'dragmode' ,
@@ -120,7 +121,7 @@ modebarButtons.pan2d = {
120121 click : handleCartesian
121122} ;
122123
123- modebarButtons . zoomIn2d = {
124+ modeBarButtons . zoomIn2d = {
124125 name : 'zoomIn2d' ,
125126 title : 'Zoom in' ,
126127 attr : 'zoom' ,
@@ -129,7 +130,7 @@ modebarButtons.zoomIn2d = {
129130 click : handleCartesian
130131} ;
131132
132- modebarButtons . zoomOut2d = {
133+ modeBarButtons . zoomOut2d = {
133134 name : 'zoomOut2d' ,
134135 title : 'Zoom out' ,
135136 attr : 'zoom' ,
@@ -138,7 +139,7 @@ modebarButtons.zoomOut2d = {
138139 click : handleCartesian
139140} ;
140141
141- modebarButtons . autoScale2d = {
142+ modeBarButtons . autoScale2d = {
142143 name : 'autoScale2d' ,
143144 title : 'Autoscale' ,
144145 attr : 'zoom' ,
@@ -147,7 +148,7 @@ modebarButtons.autoScale2d = {
147148 click : handleCartesian
148149} ;
149150
150- modebarButtons . resetScale2d = {
151+ modeBarButtons . resetScale2d = {
151152 name : 'resetScale2d' ,
152153 title : 'Reset axes' ,
153154 attr : 'zoom' ,
@@ -156,7 +157,7 @@ modebarButtons.resetScale2d = {
156157 click : handleCartesian
157158} ;
158159
159- modebarButtons . hoverClosestCartesian = {
160+ modeBarButtons . hoverClosestCartesian = {
160161 name : 'hoverClosestCartesian' ,
161162 title : 'Show closest data on hover' ,
162163 attr : 'hovermode' ,
@@ -166,7 +167,7 @@ modebarButtons.hoverClosestCartesian = {
166167 click : handleCartesian
167168} ;
168169
169- modebarButtons . hoverCompareCartesian = {
170+ modeBarButtons . hoverCompareCartesian = {
170171 name : 'hoverCompareCartesian' ,
171172 title : 'Compare data on hover' ,
172173 attr : 'hovermode' ,
@@ -237,7 +238,7 @@ function handleCartesian(gd, ev) {
237238 } ) ;
238239}
239240
240- modebarButtons . zoom3d = {
241+ modeBarButtons . zoom3d = {
241242 name : 'zoom3d' ,
242243 title : 'Zoom' ,
243244 attr : 'dragmode' ,
@@ -246,7 +247,7 @@ modebarButtons.zoom3d = {
246247 click : handleDrag3d
247248} ;
248249
249- modebarButtons . pan3d = {
250+ modeBarButtons . pan3d = {
250251 name : 'pan3d' ,
251252 title : 'Pan' ,
252253 attr : 'dragmode' ,
@@ -255,7 +256,7 @@ modebarButtons.pan3d = {
255256 click : handleDrag3d
256257} ;
257258
258- modebarButtons . orbitRotation = {
259+ modeBarButtons . orbitRotation = {
259260 name : 'orbitRotation' ,
260261 title : 'orbital rotation' ,
261262 attr : 'dragmode' ,
@@ -264,7 +265,7 @@ modebarButtons.orbitRotation = {
264265 click : handleDrag3d
265266} ;
266267
267- modebarButtons . tableRotation = {
268+ modeBarButtons . tableRotation = {
268269 name : 'tableRotation' ,
269270 title : 'turntable rotation' ,
270271 attr : 'dragmode' ,
@@ -288,15 +289,15 @@ function handleDrag3d(gd, ev) {
288289 Plotly . relayout ( gd , layoutUpdate ) ;
289290}
290291
291- modebarButtons . resetCameraDefault3d = {
292+ modeBarButtons . resetCameraDefault3d = {
292293 name : 'resetCameraDefault3d' ,
293294 title : 'Reset camera to default' ,
294295 attr : 'resetDefault' ,
295296 icon : Icons . home ,
296297 click : handleCamera3d
297298} ;
298299
299- modebarButtons . resetCameraLastSave3d = {
300+ modeBarButtons . resetCameraLastSave3d = {
300301 name : 'resetCameraLastSave3d' ,
301302 title : 'Reset camera to last save' ,
302303 attr : 'resetLastSave' ,
@@ -332,7 +333,7 @@ function handleCamera3d(gd, ev) {
332333 */
333334}
334335
335- modebarButtons . hoverClosest3d = {
336+ modeBarButtons . hoverClosest3d = {
336337 name : 'hoverClosest3d' ,
337338 title : 'Toggle show closest data on hover' ,
338339 attr : 'hovermode' ,
@@ -385,7 +386,7 @@ modebarButtons.hoverClosest3d = {
385386 }
386387} ;
387388
388- modebarButtons . zoomInGeo = {
389+ modeBarButtons . zoomInGeo = {
389390 name : 'zoomInGeo' ,
390391 title : 'Zoom in' ,
391392 attr : 'zoom' ,
@@ -394,7 +395,7 @@ modebarButtons.zoomInGeo = {
394395 click : handleGeo
395396} ;
396397
397- modebarButtons . zoomOutGeo = {
398+ modeBarButtons . zoomOutGeo = {
398399 name : 'zoomOutGeo' ,
399400 title : 'Zoom in' ,
400401 attr : 'zoom' ,
@@ -403,7 +404,7 @@ modebarButtons.zoomOutGeo = {
403404 click : handleGeo
404405} ;
405406
406- modebarButtons . resetGeo = {
407+ modeBarButtons . resetGeo = {
407408 name : 'resetGeo' ,
408409 title : 'Reset' ,
409410 attr : 'reset' ,
@@ -412,7 +413,7 @@ modebarButtons.resetGeo = {
412413 click : handleGeo
413414} ;
414415
415- modebarButtons . hoverClosestGeo = {
416+ modeBarButtons . hoverClosestGeo = {
416417 name : 'hoverClosestGeo' ,
417418 title : 'Toggle show closest data on hover' ,
418419 attr : 'hovermode' ,
@@ -445,7 +446,7 @@ function handleGeo(gd, ev) {
445446 }
446447}
447448
448- modebarButtons . hoverClosestGl2d = {
449+ modeBarButtons . hoverClosestGl2d = {
449450 name : 'hoverClosestGl2d' ,
450451 title : 'Toggle show closest data on hover' ,
451452 attr : 'hovermode' ,
@@ -456,7 +457,7 @@ modebarButtons.hoverClosestGl2d = {
456457 click : toggleHover
457458} ;
458459
459- modebarButtons . hoverClosestPie = {
460+ modeBarButtons . hoverClosestPie = {
460461 name : 'hoverClosestPie' ,
461462 title : 'Toggle show closest data on hover' ,
462463 attr : 'hovermode' ,
0 commit comments