@@ -762,59 +762,52 @@ var FigureView = widgets.DOMWidgetView.extend({
762
762
var initialTraces = _ . cloneDeep ( this . model . get ( "_data" ) ) ;
763
763
var initialLayout = _ . cloneDeep ( this . model . get ( "_layout" ) ) ;
764
764
765
- Plotly . newPlot ( that . el , [ ] , {
766
- 'xaxis' : { 'showgrid' : false , 'showticklabels' : false , 'zeroline' : false } ,
767
- 'yaxis' : { 'showgrid' : false , 'showticklabels' : false , 'zeroline' : false }
768
- } ) . then ( function ( ) {
769
- Plotly . Plots . resize ( that . el ) . then ( function ( ) {
770
- Plotly . newPlot ( that . el , initialTraces , initialLayout ) . then (
771
- function ( ) {
772
- // Plotly.Plots.resize(that.el);
773
-
774
- // ### Send trace deltas ###
775
- // We create an array of deltas corresponding to the new
776
- // traces.
777
- that . _sendTraceDeltas ( trace_edit_id ) ;
778
-
779
- // ### Send layout delta ###
780
- that . _sendLayoutDelta ( layout_edit_id ) ;
781
-
782
- // Wire up plotly event callbacks
783
- that . el . on ( "plotly_restyle" ,
784
- function ( update ) {
785
- that . handle_plotly_restyle ( update )
786
- } ) ;
787
- that . el . on ( "plotly_relayout" ,
788
- function ( update ) {
789
- that . handle_plotly_relayout ( update )
790
- } ) ;
791
- that . el . on ( "plotly_update" ,
792
- function ( update ) {
793
- that . handle_plotly_update ( update )
794
- } ) ;
795
- that . el . on ( "plotly_click" ,
796
- function ( update ) {
797
- that . handle_plotly_click ( update )
798
- } ) ;
799
- that . el . on ( "plotly_hover" ,
800
- function ( update ) {
801
- that . handle_plotly_hover ( update )
802
- } ) ;
803
- that . el . on ( "plotly_unhover" ,
804
- function ( update ) {
805
- that . handle_plotly_unhover ( update )
806
- } ) ;
807
- that . el . on ( "plotly_selected" ,
808
- function ( update ) {
809
- that . handle_plotly_selected ( update )
810
- } ) ;
811
- that . el . on ( "plotly_doubleclick" ,
812
- function ( update ) {
813
- that . handle_plotly_doubleclick ( update )
814
- } ) ;
765
+ Plotly . newPlot ( that . el , initialTraces , initialLayout ) . then (
766
+ function ( ) {
767
+ // Plotly.Plots.resize(that.el);
768
+
769
+ // ### Send trace deltas ###
770
+ // We create an array of deltas corresponding to the new
771
+ // traces.
772
+ that . _sendTraceDeltas ( trace_edit_id ) ;
773
+
774
+ // ### Send layout delta ###
775
+ that . _sendLayoutDelta ( layout_edit_id ) ;
776
+
777
+ // Wire up plotly event callbacks
778
+ that . el . on ( "plotly_restyle" ,
779
+ function ( update ) {
780
+ that . handle_plotly_restyle ( update )
781
+ } ) ;
782
+ that . el . on ( "plotly_relayout" ,
783
+ function ( update ) {
784
+ that . handle_plotly_relayout ( update )
785
+ } ) ;
786
+ that . el . on ( "plotly_update" ,
787
+ function ( update ) {
788
+ that . handle_plotly_update ( update )
789
+ } ) ;
790
+ that . el . on ( "plotly_click" ,
791
+ function ( update ) {
792
+ that . handle_plotly_click ( update )
793
+ } ) ;
794
+ that . el . on ( "plotly_hover" ,
795
+ function ( update ) {
796
+ that . handle_plotly_hover ( update )
797
+ } ) ;
798
+ that . el . on ( "plotly_unhover" ,
799
+ function ( update ) {
800
+ that . handle_plotly_unhover ( update )
801
+ } ) ;
802
+ that . el . on ( "plotly_selected" ,
803
+ function ( update ) {
804
+ that . handle_plotly_selected ( update )
805
+ } ) ;
806
+ that . el . on ( "plotly_doubleclick" ,
807
+ function ( update ) {
808
+ that . handle_plotly_doubleclick ( update )
815
809
} ) ;
816
810
} ) ;
817
- } ) ;
818
811
} ,
819
812
/**
820
813
* Purge Plotly.js data structures from the notebook output display
0 commit comments