diff --git a/src/Plotly.vue b/src/Plotly.vue index f687273..fab9b1b 100644 --- a/src/Plotly.vue +++ b/src/Plotly.vue @@ -83,10 +83,10 @@ export default { methods: { initEvents() { if (this.autoResize) { - this.__resizeListener = () => { + this.__resizeListener = debounce(() => { this.internalLayout.datarevision++ - debounce(this.react, 200) - } + this.react() + }, 200) window.addEventListener('resize', this.__resizeListener) }