@@ -1358,9 +1358,7 @@ Plotly.extendTraces = function extendTraces (gd, update, indices, maxPoints) {
13581358 Plotly . redraw ( gd ) ;
13591359
13601360 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 ) ;
13641362} ;
13651363
13661364Plotly . prependTraces = function prependTraces ( gd , update , indices , maxPoints ) {
@@ -1385,9 +1383,7 @@ Plotly.prependTraces = function prependTraces (gd, update, indices, maxPoints)
13851383 Plotly . redraw ( gd ) ;
13861384
13871385 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 ) ;
13911387} ;
13921388
13931389/**
@@ -1431,7 +1427,7 @@ Plotly.addTraces = function addTraces (gd, traces, newIndices) {
14311427 // i.e., we can simply redraw and be done
14321428 if ( typeof newIndices === 'undefined' ) {
14331429 Plotly . redraw ( gd ) ;
1434- if ( Plotly . Queue ) Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
1430+ Plotly . Queue . add ( gd , undoFunc , undoArgs , redoFunc , redoArgs ) ;
14351431 return ;
14361432 }
14371433
@@ -1454,10 +1450,10 @@ Plotly.addTraces = function addTraces (gd, traces, newIndices) {
14541450
14551451 // if we're here, the user has defined specific places to place the new traces
14561452 // 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 ) ;
14591455 Plotly . moveTraces ( gd , currentIndices , newIndices ) ;
1460- if ( Plotly . Queue ) Plotly . Queue . stopSequence ( gd ) ;
1456+ Plotly . Queue . stopSequence ( gd ) ;
14611457} ;
14621458
14631459/**
@@ -1497,8 +1493,7 @@ Plotly.deleteTraces = function deleteTraces (gd, indices) {
14971493 }
14981494
14991495 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 ) ;
15021497} ;
15031498
15041499/**
@@ -1592,10 +1587,8 @@ Plotly.moveTraces = function moveTraces (gd, currentIndices, newIndices) {
15921587 }
15931588
15941589 gd . data = newData ;
1595-
15961590 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 ) ;
15991592} ;
16001593
16011594// -----------------------------------------------------
@@ -2032,9 +2025,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
20322025
20332026 // now all attribute mods are done, as are redo and undo
20342027 // 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 ] ) ;
20382029
20392030 // do we need to force a recalc?
20402031 var autorangeOn = false ;
@@ -2412,9 +2403,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
24122403 }
24132404 // now all attribute mods are done, as are
24142405 // 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 ] ) ;
24182407
24192408 // calculate autosizing - if size hasn't changed,
24202409 // will remove h&w so we don't need to redraw
0 commit comments