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