@@ -1358,9 +1358,7 @@ Plotly.extendTraces = function extendTraces (gd, update, indices, maxPoints) {
1358
1358
Plotly . redraw ( gd ) ;
1359
1359
1360
1360
var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1361
- if ( Plotly . Queue ) {
1362
- Plotly . Queue . add ( gd , Plotly . prependTraces , undoArgs , extendTraces , arguments ) ;
1363
- }
1361
+ Plotly . Queue . add ( gd , Plotly . prependTraces , undoArgs , extendTraces , arguments ) ;
1364
1362
} ;
1365
1363
1366
1364
Plotly . prependTraces = function prependTraces ( gd , update , indices , maxPoints ) {
@@ -1385,9 +1383,7 @@ Plotly.prependTraces = function prependTraces (gd, update, indices, maxPoints)
1385
1383
Plotly . redraw ( gd ) ;
1386
1384
1387
1385
var undoArgs = [ gd , undo . update , indices , undo . maxPoints ] ;
1388
- if ( Plotly . Queue ) {
1389
- Plotly . Queue . add ( gd , Plotly . extendTraces , undoArgs , prependTraces , arguments ) ;
1390
- }
1386
+ Plotly . Queue . add ( gd , Plotly . extendTraces , undoArgs , prependTraces , arguments ) ;
1391
1387
} ;
1392
1388
1393
1389
/**
@@ -1431,7 +1427,7 @@ Plotly.addTraces = function addTraces (gd, traces, newIndices) {
1431
1427
// i.e., we can simply redraw and be done
1432
1428
if ( typeof newIndices === 'undefined' ) {
1433
1429
Plotly . redraw ( gd ) ;
1434
- if ( Plotly . Queue ) Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1430
+ Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1435
1431
return ;
1436
1432
}
1437
1433
@@ -1454,10 +1450,10 @@ Plotly.addTraces = function addTraces (gd, traces, newIndices) {
1454
1450
1455
1451
// if we're here, the user has defined specific places to place the new traces
1456
1452
// this requires some extra work that moveTraces will do
1457
- if ( Plotly . Queue ) Plotly . Queue . startSequence ( gd ) ;
1458
- if ( Plotly . Queue ) Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1453
+ Plotly . Queue . startSequence ( gd ) ;
1454
+ Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1459
1455
Plotly . moveTraces ( gd , currentIndices , newIndices ) ;
1460
- if ( Plotly . Queue ) Plotly . Queue . stopSequence ( gd ) ;
1456
+ Plotly . Queue . stopSequence ( gd ) ;
1461
1457
} ;
1462
1458
1463
1459
/**
@@ -1497,8 +1493,7 @@ Plotly.deleteTraces = function deleteTraces (gd, indices) {
1497
1493
}
1498
1494
1499
1495
Plotly . redraw ( gd ) ;
1500
-
1501
- if ( Plotly . Queue ) Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1496
+ Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1502
1497
} ;
1503
1498
1504
1499
/**
@@ -1592,10 +1587,8 @@ Plotly.moveTraces = function moveTraces (gd, currentIndices, newIndices) {
1592
1587
}
1593
1588
1594
1589
gd . data = newData ;
1595
-
1596
1590
Plotly . redraw ( gd ) ;
1597
-
1598
- if ( Plotly . Queue ) Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1591
+ Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1599
1592
} ;
1600
1593
1601
1594
// -----------------------------------------------------
@@ -2032,9 +2025,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
2032
2025
2033
2026
// now all attribute mods are done, as are redo and undo
2034
2027
// so we can save them
2035
- if ( Plotly . Queue ) {
2036
- Plotly . Queue . add ( gd , restyle , [ gd , undoit , traces ] , restyle , [ gd , redoit , traces ] ) ;
2037
- }
2028
+ Plotly . Queue . add ( gd , restyle , [ gd , undoit , traces ] , restyle , [ gd , redoit , traces ] ) ;
2038
2029
2039
2030
// do we need to force a recalc?
2040
2031
var autorangeOn = false ;
@@ -2412,9 +2403,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
2412
2403
}
2413
2404
// now all attribute mods are done, as are
2414
2405
// redo and undo so we can save them
2415
- if ( Plotly . Queue ) {
2416
- Plotly . Queue . add ( gd , relayout , [ gd , undoit ] , relayout , [ gd , redoit ] ) ;
2417
- }
2406
+ Plotly . Queue . add ( gd , relayout , [ gd , undoit ] , relayout , [ gd , redoit ] ) ;
2418
2407
2419
2408
// calculate autosizing - if size hasn't changed,
2420
2409
// will remove h&w so we don't need to redraw
0 commit comments