@@ -451,8 +451,8 @@ def _handler_js2py_traceDeltas(self, change):
451
451
# Receive message
452
452
# ---------------
453
453
msg_data = change ['new' ]
454
- self ._js2py_traceDeltas = None
455
454
if not msg_data :
455
+ self ._js2py_traceDeltas = None
456
456
return
457
457
458
458
trace_deltas = msg_data ['trace_deltas' ]
@@ -504,6 +504,8 @@ def _handler_js2py_traceDeltas(self, change):
504
504
while self ._waiting_edit_callbacks :
505
505
self ._waiting_edit_callbacks .pop ()()
506
506
507
+ self ._js2py_traceDeltas = None
508
+
507
509
@observe ('_js2py_layoutDelta' )
508
510
def _handler_js2py_layoutDelta (self , change ):
509
511
"""
@@ -513,8 +515,8 @@ def _handler_js2py_layoutDelta(self, change):
513
515
# Receive message
514
516
# ---------------
515
517
msg_data = change ['new' ]
516
- self ._js2py_layoutDelta = None
517
518
if not msg_data :
519
+ self ._js2py_layoutDelta = None
518
520
return
519
521
520
522
layout_delta = msg_data ['layout_delta' ]
@@ -566,6 +568,8 @@ def _handler_js2py_layoutDelta(self, change):
566
568
while self ._waiting_edit_callbacks :
567
569
self ._waiting_edit_callbacks .pop ()()
568
570
571
+ self ._js2py_layoutDelta = None
572
+
569
573
@observe ('_js2py_restyle' )
570
574
def _handler_js2py_restyle (self , change ):
571
575
"""
@@ -575,8 +579,9 @@ def _handler_js2py_restyle(self, change):
575
579
# Receive message
576
580
# ---------------
577
581
restyle_msg = change ['new' ]
578
- self . _js2py_restyle = None
582
+
579
583
if not restyle_msg :
584
+ self ._js2py_restyle = None
580
585
return
581
586
582
587
style_data = restyle_msg ['style_data' ]
@@ -589,6 +594,8 @@ def _handler_js2py_restyle(self, change):
589
594
trace_indexes = style_traces ,
590
595
source_view_id = source_view_id )
591
596
597
+ self ._js2py_restyle = None
598
+
592
599
@observe ('_js2py_update' )
593
600
def _handler_js2py_update (self , change ):
594
601
"""
@@ -598,8 +605,9 @@ def _handler_js2py_update(self, change):
598
605
# Receive message
599
606
# ---------------
600
607
update_msg = change ['new' ]
601
- self . _js2py_update = None
608
+
602
609
if not update_msg :
610
+ self ._js2py_update = None
603
611
return
604
612
605
613
style = update_msg ['style_data' ]
@@ -613,6 +621,8 @@ def _handler_js2py_update(self, change):
613
621
trace_indexes = trace_indexes ,
614
622
source_view_id = source_view_id )
615
623
624
+ self ._js2py_update = None
625
+
616
626
@observe ('_js2py_relayout' )
617
627
def _handler_js2py_relayout (self , change ):
618
628
"""
@@ -622,8 +632,9 @@ def _handler_js2py_relayout(self, change):
622
632
# Receive message
623
633
# ---------------
624
634
relayout_msg = change ['new' ]
625
- self . _js2py_relayout = None
635
+
626
636
if not relayout_msg :
637
+ self ._js2py_relayout = None
627
638
return
628
639
629
640
relayout_data = relayout_msg ['relayout_data' ]
@@ -640,6 +651,8 @@ def _handler_js2py_relayout(self, change):
640
651
self .plotly_relayout (relayout_data = relayout_data ,
641
652
source_view_id = source_view_id )
642
653
654
+ self ._js2py_relayout = None
655
+
643
656
@observe ('_js2py_pointsCallback' )
644
657
def _handler_js2py_pointsCallback (self , change ):
645
658
"""
@@ -649,8 +662,9 @@ def _handler_js2py_pointsCallback(self, change):
649
662
# Receive message
650
663
# ---------------
651
664
callback_data = change ['new' ]
652
- self . _js2py_pointsCallback = None
665
+
653
666
if not callback_data :
667
+ self ._js2py_pointsCallback = None
654
668
return
655
669
656
670
# Get event type
@@ -718,6 +732,8 @@ def _handler_js2py_pointsCallback(self, change):
718
732
elif event_type == 'plotly_selected' :
719
733
trace ._dispatch_on_selection (points , selector )
720
734
735
+ self ._js2py_pointsCallback = None
736
+
721
737
# Callbacks
722
738
# ---------
723
739
def on_edits_completed (self , fn ):
0 commit comments