@@ -1263,9 +1263,7 @@ Plotly.extendTraces = function extendTraces(gd, update, indices, maxPoints) {
1263
1263
var promise = Plotly . redraw ( gd ) ;
1264
1264
1265
1265
var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1266
- if ( Queue ) {
1267
- Queue . add ( gd , Plotly . prependTraces , undoArgs , extendTraces , arguments ) ;
1268
- }
1266
+ Queue . add ( gd , Plotly . prependTraces , undoArgs , extendTraces , arguments ) ;
1269
1267
1270
1268
return promise ;
1271
1269
} ;
@@ -1292,9 +1290,7 @@ Plotly.prependTraces = function prependTraces(gd, update, indices, maxPoints) {
1292
1290
var promise = Plotly . redraw ( gd ) ;
1293
1291
1294
1292
var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1295
- if ( Queue ) {
1296
- Queue . add ( gd , Plotly . extendTraces , undoArgs , prependTraces , arguments ) ;
1297
- }
1293
+ Queue . add ( gd , Plotly . extendTraces , undoArgs , prependTraces , arguments ) ;
1298
1294
1299
1295
return promise ;
1300
1296
} ;
@@ -1342,7 +1338,7 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
1342
1338
// i.e., we can simply redraw and be done
1343
1339
if ( typeof newIndices === 'undefined' ) {
1344
1340
promise = Plotly . redraw ( gd ) ;
1345
- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1341
+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1346
1342
return promise ;
1347
1343
}
1348
1344
@@ -1365,10 +1361,10 @@ Plotly.addTraces = function addTraces(gd, traces, newIndices) {
1365
1361
1366
1362
// if we're here, the user has defined specific places to place the new traces
1367
1363
// this requires some extra work that moveTraces will do
1368
- if ( Queue ) Queue . startSequence ( gd ) ;
1369
- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1364
+ Queue . startSequence ( gd ) ;
1365
+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1370
1366
promise = Plotly . moveTraces ( gd , currentIndices , newIndices ) ;
1371
- if ( Queue ) Queue . stopSequence ( gd ) ;
1367
+ Queue . stopSequence ( gd ) ;
1372
1368
return promise ;
1373
1369
} ;
1374
1370
@@ -1409,8 +1405,7 @@ Plotly.deleteTraces = function deleteTraces(gd, indices) {
1409
1405
}
1410
1406
1411
1407
var promise = Plotly . redraw ( gd ) ;
1412
-
1413
- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1408
+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1414
1409
1415
1410
return promise ;
1416
1411
} ;
@@ -1508,8 +1503,7 @@ Plotly.moveTraces = function moveTraces(gd, currentIndices, newIndices) {
1508
1503
gd . data = newData ;
1509
1504
1510
1505
var promise = Plotly . redraw ( gd ) ;
1511
-
1512
- if ( Queue ) Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1506
+ Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1513
1507
1514
1508
return promise ;
1515
1509
} ;
@@ -1955,9 +1949,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
1955
1949
1956
1950
// now all attribute mods are done, as are redo and undo
1957
1951
// so we can save them
1958
- if ( Queue ) {
1959
- Queue . add ( gd , restyle , [ gd , undoit , traces ] , restyle , [ gd , redoit , traces ] ) ;
1960
- }
1952
+ Queue . add ( gd , restyle , [ gd , undoit , traces ] , restyle , [ gd , redoit , traces ] ) ;
1961
1953
1962
1954
// do we need to force a recalc?
1963
1955
var autorangeOn = false ;
@@ -2375,9 +2367,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
2375
2367
}
2376
2368
// now all attribute mods are done, as are
2377
2369
// redo and undo so we can save them
2378
- if ( Queue ) {
2379
- Queue . add ( gd , relayout , [ gd , undoit ] , relayout , [ gd , redoit ] ) ;
2380
- }
2370
+ Queue . add ( gd , relayout , [ gd , undoit ] , relayout , [ gd , redoit ] ) ;
2381
2371
2382
2372
// calculate autosizing - if size hasn't changed,
2383
2373
// will remove h&w so we don't need to redraw
0 commit comments