@@ -1245,15 +1245,13 @@ var FigureView = widgets.DOMWidgetView.extend({
1245
1245
if ( msgData . source_view_id === this . viewID ) {
1246
1246
// Operation originated from this view, don't re-apply it
1247
1247
console . log ( "Skipping relayout for view " + this . viewID ) ;
1248
- return
1249
1248
} else {
1250
1249
console . log ( "Applying relayout for view " + this . viewID ) ;
1251
- }
1252
-
1253
- var relayoutData = msgData . relayout_data ;
1254
1250
1255
- relayoutData [ "_doNotReportToPy" ] = true ;
1256
- Plotly . relayout ( this . el , msgData . relayout_data ) ;
1251
+ var relayoutData = msgData . relayout_data ;
1252
+ relayoutData [ "_doNotReportToPy" ] = true ;
1253
+ Plotly . relayout ( this . el , msgData . relayout_data ) ;
1254
+ }
1257
1255
1258
1256
// ### Send layout delta ###
1259
1257
var layout_edit_id = msgData . layout_edit_id ;
@@ -1279,13 +1277,12 @@ var FigureView = widgets.DOMWidgetView.extend({
1279
1277
if ( msgData . source_view_id === this . viewID ) {
1280
1278
// Operation originated from this view, don't re-apply it
1281
1279
console . log ( "Skipping update for view " + this . viewID ) ;
1282
- return
1283
1280
} else {
1284
1281
console . log ( "Applying update for view " + this . viewID )
1285
- }
1286
1282
1287
- style [ "_doNotReportToPy" ] = true ;
1288
- Plotly . update ( this . el , style , layout , traceIndexes ) ;
1283
+ style [ "_doNotReportToPy" ] = true ;
1284
+ Plotly . update ( this . el , style , layout , traceIndexes ) ;
1285
+ }
1289
1286
1290
1287
// ### Send trace deltas ###
1291
1288
// We create an array of deltas corresponding to the updated
@@ -1327,26 +1324,35 @@ var FigureView = widgets.DOMWidgetView.extend({
1327
1324
if ( msgData . source_view_id === this . viewID ) {
1328
1325
// Operation originated from this view, don't re-apply it
1329
1326
console . log ( "Skipping animate for view " + this . viewID ) ;
1330
- return
1327
+
1328
+ // ### Send trace deltas ###
1329
+ // We create an array of deltas corresponding to the
1330
+ // animated traces.
1331
+ this . _sendTraceDeltas ( traceIndexes , msgData . trace_edit_id ) ;
1332
+
1333
+ // ### Send layout delta ###
1334
+ var layout_edit_id = msgData . layout_edit_id ;
1335
+ this . _sendLayoutDelta ( layout_edit_id ) ;
1336
+
1331
1337
} else {
1332
1338
console . log ( "Applying animate for view " + this . viewID )
1333
- }
1334
1339
1335
- animationData [ "_doNotReportToPy" ] = true ;
1336
- var that = this ;
1340
+ animationData [ "_doNotReportToPy" ] = true ;
1341
+ var that = this ;
1337
1342
1338
- Plotly . animate ( this . el , animationData , animationOpts ) . then (
1339
- function ( ) {
1343
+ Plotly . animate ( this . el , animationData , animationOpts ) . then (
1344
+ function ( ) {
1340
1345
1341
- // ### Send trace deltas ###
1342
- // We create an array of deltas corresponding to the
1343
- // animated traces.
1344
- that . _sendTraceDeltas ( traceIndexes , msgData . trace_edit_id ) ;
1346
+ // ### Send trace deltas ###
1347
+ // We create an array of deltas corresponding to the
1348
+ // animated traces.
1349
+ that . _sendTraceDeltas ( traceIndexes , msgData . trace_edit_id ) ;
1345
1350
1346
- // ### Send layout delta ###
1347
- var layout_edit_id = msgData . layout_edit_id ;
1348
- that . _sendLayoutDelta ( layout_edit_id ) ;
1349
- } ) ;
1351
+ // ### Send layout delta ###
1352
+ var layout_edit_id = msgData . layout_edit_id ;
1353
+ that . _sendLayoutDelta ( layout_edit_id ) ;
1354
+ } ) ;
1355
+ }
1350
1356
}
1351
1357
} ,
1352
1358
0 commit comments