diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index c202a8b69c..e072f0a346 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -165,8 +165,10 @@ const handleInnerMouseDown = e => { onMounted(() => { currentInstance = getCurrentInstance() + const methodName = 'componentImageDownload-' + config.value.id + useEmitt().emitter.off(methodName) useEmitt({ - name: 'componentImageDownload-' + config.value.id, + name: methodName, callback: () => { htmlToImage() } diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index 0aa72d23e3..1e7803b5b6 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -1112,8 +1112,10 @@ onMounted(() => { // do stopAnimation }) settingAttribute() + const methodName = 'componentImageDownload-' + element.value.id + useEmitt().emitter.off(methodName) useEmitt({ - name: 'componentImageDownload-' + element.value.id, + name: methodName, callback: () => { htmlToImage() }