Explorar el Código

register event handlers once after every newPlot call

Brian Benjamin Maranville hace 1 año
padre
commit
7862f1a427
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      nicegui/elements/plotly.vue

+ 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