@@ -65,7 +65,7 @@ var numericNameWarningCountLimit = 5;
6565 * object containing `data`, `layout`, `config`, and `frames` members
6666 *
6767 */
68- Plotly . plot = function ( gd , data , layout , config ) {
68+ exports . plot = function ( gd , data , layout , config ) {
6969 var frames ;
7070
7171 gd = Lib . getGraphDiv ( gd ) ;
@@ -93,7 +93,7 @@ Plotly.plot = function(gd, data, layout, config) {
9393
9494 function addFrames ( ) {
9595 if ( frames ) {
96- return Plotly . addFrames ( gd , frames ) ;
96+ return exports . addFrames ( gd , frames ) ;
9797 }
9898 }
9999
@@ -627,7 +627,7 @@ function plotPolar(gd, data, layout) {
627627}
628628
629629// convenience function to force a full redraw, mostly for use by plotly.js
630- Plotly . redraw = function ( gd ) {
630+ exports . redraw = function ( gd ) {
631631 gd = Lib . getGraphDiv ( gd ) ;
632632
633633 if ( ! Lib . isPlotDiv ( gd ) ) {
@@ -638,7 +638,7 @@ Plotly.redraw = function(gd) {
638638 helpers . cleanLayout ( gd . layout ) ;
639639
640640 gd . calcdata = undefined ;
641- return Plotly . plot ( gd ) . then ( function ( ) {
641+ return exports . plot ( gd ) . then ( function ( ) {
642642 gd . emit ( 'plotly_redraw' ) ;
643643 return gd ;
644644 } ) ;
@@ -652,14 +652,14 @@ Plotly.redraw = function(gd) {
652652 * @param {Object } layout
653653 * @param {Object } config
654654 */
655- Plotly . newPlot = function ( gd , data , layout , config ) {
655+ exports . newPlot = function ( gd , data , layout , config ) {
656656 gd = Lib . getGraphDiv ( gd ) ;
657657
658658 // remove gl contexts
659659 Plots . cleanPlot ( [ ] , { } , gd . _fullData || { } , gd . _fullLayout || { } ) ;
660660
661661 Plots . purge ( gd ) ;
662- return Plotly . plot ( gd , data , layout , config ) ;
662+ return exports . plot ( gd , data , layout , config ) ;
663663} ;
664664
665665/**
@@ -987,7 +987,7 @@ function concatTypedArray(arr0, arr1) {
987987 * @param {Number|Object } [maxPoints] Number of points for trace window after lengthening.
988988 *
989989 */
990- Plotly . extendTraces = function extendTraces ( gd , update , indices , maxPoints ) {
990+ exports . extendTraces = function extendTraces ( gd , update , indices , maxPoints ) {
991991 gd = Lib . getGraphDiv ( gd ) ;
992992
993993 function updateArray ( target , insert , maxp ) {
@@ -1038,14 +1038,14 @@ Plotly.extendTraces = function extendTraces(gd, update, indices, maxPoints) {
10381038 }
10391039
10401040 var undo = spliceTraces ( gd , update , indices , maxPoints , updateArray ) ;
1041- var promise = Plotly . redraw ( gd ) ;
1041+ var promise = exports . redraw ( gd ) ;
10421042 var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1043- Queue . add ( gd , Plotly . prependTraces , undoArgs , extendTraces , arguments ) ;
1043+ Queue . add ( gd , exports . prependTraces , undoArgs , extendTraces , arguments ) ;
10441044
10451045 return promise ;
10461046} ;
10471047
1048- Plotly . prependTraces = function prependTraces ( gd , update , indices , maxPoints ) {
1048+ exports . prependTraces = function prependTraces ( gd , update , indices , maxPoints ) {
10491049 gd = Lib . getGraphDiv ( gd ) ;
10501050
10511051 function updateArray ( target , insert , maxp ) {
@@ -1095,9 +1095,9 @@ Plotly.prependTraces = function prependTraces(gd, update, indices, maxPoints) {
10951095 }
10961096
10971097 var undo = spliceTraces ( gd , update , indices , maxPoints , updateArray ) ;
1098- var promise = Plotly . redraw ( gd ) ;
1098+ var promise = exports . redraw ( gd ) ;
10991099 var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1100- Queue . add ( gd , Plotly . extendTraces , undoArgs , prependTraces , arguments ) ;
1100+ Queue . add ( gd , exports . extendTraces , undoArgs , prependTraces , arguments ) ;
11011101
11021102 return promise ;
11031103} ;
@@ -1111,11 +1111,11 @@ Plotly.prependTraces = function prependTraces(gd, update, indices, maxPoints) {
11111111 * @param {Number[]|Number } [newIndices=[gd.data.length]] Locations to add traces
11121112 *
11131113 */
1114- Plotly . addTraces = function addTraces ( gd , traces , newIndices ) {
1114+ exports . addTraces = function addTraces ( gd , traces , newIndices ) {
11151115 gd = Lib . getGraphDiv ( gd ) ;
11161116
11171117 var currentIndices = [ ] ,
1118- undoFunc = Plotly . deleteTraces ,
1118+ undoFunc = exports . deleteTraces ,
11191119 redoFunc = addTraces ,
11201120 undoArgs = [ gd , currentIndices ] ,
11211121 redoArgs = [ gd , traces ] , // no newIndices here
@@ -1150,7 +1150,7 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
11501150 // if the user didn't define newIndices, they just want the traces appended
11511151 // i.e., we can simply redraw and be done
11521152 if ( typeof newIndices === 'undefined' ) {
1153- promise = Plotly . redraw ( gd ) ;
1153+ promise = exports . redraw ( gd ) ;
11541154 Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
11551155 return promise ;
11561156 }
@@ -1176,7 +1176,7 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
11761176 // this requires some extra work that moveTraces will do
11771177 Queue . startSequence ( gd ) ;
11781178 Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1179- promise = Plotly . moveTraces ( gd , currentIndices , newIndices ) ;
1179+ promise = exports . moveTraces ( gd , currentIndices , newIndices ) ;
11801180 Queue . stopSequence ( gd ) ;
11811181 return promise ;
11821182} ;
@@ -1188,11 +1188,11 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
11881188 * @param {Object[] } gd.data The array of traces we're removing from
11891189 * @param {Number|Number[] } indices The indices
11901190 */
1191- Plotly . deleteTraces = function deleteTraces ( gd , indices ) {
1191+ exports . deleteTraces = function deleteTraces ( gd , indices ) {
11921192 gd = Lib . getGraphDiv ( gd ) ;
11931193
11941194 var traces = [ ] ,
1195- undoFunc = Plotly . addTraces ,
1195+ undoFunc = exports . addTraces ,
11961196 redoFunc = deleteTraces ,
11971197 undoArgs = [ gd , traces , indices ] ,
11981198 redoArgs = [ gd , indices ] ,
@@ -1217,7 +1217,7 @@ Plotly.deleteTraces = function deleteTraces(gd, indices) {
12171217 traces . push ( deletedTrace ) ;
12181218 }
12191219
1220- var promise = Plotly . redraw ( gd ) ;
1220+ var promise = exports . redraw ( gd ) ;
12211221 Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
12221222
12231223 return promise ;
@@ -1254,7 +1254,7 @@ Plotly.deleteTraces = function deleteTraces(gd, indices) {
12541254 * // reorder all traces (assume there are 5--a, b, c, d, e)
12551255 * Plotly.moveTraces(gd, [b, d, e, a, c]) // same as 'move to end'
12561256 */
1257- Plotly . moveTraces = function moveTraces ( gd , currentIndices , newIndices ) {
1257+ exports . moveTraces = function moveTraces ( gd , currentIndices , newIndices ) {
12581258 gd = Lib . getGraphDiv ( gd ) ;
12591259
12601260 var newData = [ ] ,
@@ -1315,7 +1315,7 @@ Plotly.moveTraces = function moveTraces(gd, currentIndices, newIndices) {
13151315
13161316 gd . data = newData ;
13171317
1318- var promise = Plotly . redraw ( gd ) ;
1318+ var promise = exports . redraw ( gd ) ;
13191319 Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
13201320
13211321 return promise ;
@@ -1351,7 +1351,7 @@ Plotly.moveTraces = function moveTraces(gd, currentIndices, newIndices) {
13511351 * If the array is too short, it will wrap around (useful for
13521352 * style files that want to specify cyclical default values).
13531353 */
1354- Plotly . restyle = function restyle ( gd , astr , val , _traces ) {
1354+ exports . restyle = function restyle ( gd , astr , val , _traces ) {
13551355 gd = Lib . getGraphDiv ( gd ) ;
13561356 helpers . clearPromiseQueue ( gd ) ;
13571357
@@ -1382,7 +1382,7 @@ Plotly.restyle = function restyle(gd, astr, val, _traces) {
13821382 var seq = [ ] ;
13831383
13841384 if ( flags . fullReplot ) {
1385- seq . push ( Plotly . plot ) ;
1385+ seq . push ( exports . plot ) ;
13861386 } else {
13871387 seq . push ( Plots . previousPromises ) ;
13881388
@@ -2156,7 +2156,7 @@ function refAutorange(gd, obj, axLetter) {
21562156 * integer or array of integers for the traces to alter (all if omitted)
21572157 *
21582158 */
2159- Plotly . update = function update ( gd , traceUpdate , layoutUpdate , _traces ) {
2159+ exports . update = function update ( gd , traceUpdate , layoutUpdate , _traces ) {
21602160 gd = Lib . getGraphDiv ( gd ) ;
21612161 helpers . clearPromiseQueue ( gd ) ;
21622162
@@ -2194,10 +2194,10 @@ Plotly.update = function update(gd, traceUpdate, layoutUpdate, _traces) {
21942194 gd . data = undefined ;
21952195 gd . layout = undefined ;
21962196
2197- seq . push ( function ( ) { return Plotly . plot ( gd , data , layout ) ; } ) ;
2197+ seq . push ( function ( ) { return exports . plot ( gd , data , layout ) ; } ) ;
21982198 }
21992199 else if ( restyleFlags . fullReplot ) {
2200- seq . push ( Plotly . plot ) ;
2200+ seq . push ( exports . plot ) ;
22012201 }
22022202 else if ( relayoutFlags . layoutReplot ) {
22032203 seq . push ( subroutines . layoutReplot ) ;
@@ -2258,10 +2258,10 @@ Plotly.update = function update(gd, traceUpdate, layoutUpdate, _traces) {
22582258 * object containing `data`, `layout`, `config`, and `frames` members
22592259 *
22602260 */
2261- Plotly . react = function ( gd , data , layout , config ) {
2261+ exports . react = function ( gd , data , layout , config ) {
22622262 var frames , plotDone ;
22632263
2264- function addFrames ( ) { return Plotly . addFrames ( gd , frames ) ; }
2264+ function addFrames ( ) { return exports . addFrames ( gd , frames ) ; }
22652265
22662266 gd = Lib . getGraphDiv ( gd ) ;
22672267
@@ -2270,7 +2270,7 @@ Plotly.react = function(gd, data, layout, config) {
22702270
22712271 // you can use this as the initial draw as well as to update
22722272 if ( ! Lib . isPlotDiv ( gd ) || ! oldFullData || ! oldFullLayout ) {
2273- plotDone = Plotly . newPlot ( gd , data , layout , config ) ;
2273+ plotDone = exports . newPlot ( gd , data , layout , config ) ;
22742274 }
22752275 else {
22762276
@@ -2323,7 +2323,7 @@ Plotly.react = function(gd, data, layout, config) {
23232323
23242324 if ( restyleFlags . fullReplot || relayoutFlags . layoutReplot || configChanged ) {
23252325 gd . _fullLayout . _skipDefaults = true ;
2326- seq . push ( Plotly . plot ) ;
2326+ seq . push ( exports . plot ) ;
23272327 }
23282328 else {
23292329 for ( var componentType in relayoutFlags . arrays ) {
@@ -2660,7 +2660,7 @@ function diffConfig(oldConfig, newConfig) {
26602660 * @param {object } animationOpts
26612661 * configuration for the animation
26622662 */
2663- Plotly . animate = function ( gd , frameOrGroupNameOrFrameList , animationOpts ) {
2663+ exports . animate = function ( gd , frameOrGroupNameOrFrameList , animationOpts ) {
26642664 gd = Lib . getGraphDiv ( gd ) ;
26652665
26662666 if ( ! Lib . isPlotDiv ( gd ) ) {
@@ -3024,7 +3024,7 @@ Plotly.animate = function(gd, frameOrGroupNameOrFrameList, animationOpts) {
30243024 * provided, an index will be provided in serial order. If already used, the frame
30253025 * will be overwritten.
30263026 */
3027- Plotly . addFrames = function ( gd , frameList , indices ) {
3027+ exports . addFrames = function ( gd , frameList , indices ) {
30283028 gd = Lib . getGraphDiv ( gd ) ;
30293029
30303030 if ( frameList === null || frameList === undefined ) {
@@ -3153,7 +3153,7 @@ Plotly.addFrames = function(gd, frameList, indices) {
31533153 * @param {array of integers } frameList
31543154 * list of integer indices of frames to be deleted
31553155 */
3156- Plotly . deleteFrames = function ( gd , frameList ) {
3156+ exports . deleteFrames = function ( gd , frameList ) {
31573157 gd = Lib . getGraphDiv ( gd ) ;
31583158
31593159 if ( ! Lib . isPlotDiv ( gd ) ) {
@@ -3197,7 +3197,7 @@ Plotly.deleteFrames = function(gd, frameList) {
31973197 * @param {string id or DOM element } gd
31983198 * the id or DOM element of the graph container div
31993199 */
3200- Plotly . purge = function purge ( gd ) {
3200+ exports . purge = function purge ( gd ) {
32013201 gd = Lib . getGraphDiv ( gd ) ;
32023202
32033203 var fullLayout = gd . _fullLayout || { } ,
0 commit comments