1
0
Эх сурвалжийг харах

register event handlers once after every newPlot call

Brian Benjamin Maranville 1 жил өмнө
parent
commit
7862f1a427

+ 1 - 1
nicegui/elements/plotly.vue

@@ -7,7 +7,6 @@ export default {
   async mounted() {
     await this.$nextTick();
     this.update();
-    this.set_handlers();
   },
   updated() {
     this.update();
@@ -24,6 +23,7 @@ export default {
         Plotly.react(this.$el.id, this.options.data, this.options.layout);
       } else {
         Plotly.newPlot(this.$el.id, this.options.data, this.options.layout, options.config);
+        this.set_handlers();
       }
 
       // store last options