Demo:当移动画布、删除图片、按住调整图片按钮时隐藏节点图片位置设置工具栏

This commit is contained in:
街角小林 2025-03-03 17:24:17 +08:00
parent 3b9cced7ea
commit 76b5f7d22a

View File

@ -41,7 +41,6 @@ export default {
imgPlacement: ''
}
},
computed: {},
created() {
this.mindMap.on('node_img_click', this.show)
this.mindMap.on('draw_click', this.close)
@ -49,6 +48,9 @@ export default {
this.mindMap.on('node_dblclick', this.close)
this.mindMap.on('node_active', this.onNodeActive)
this.mindMap.on('scale', this.onScale)
this.mindMap.on('node_img_adjust_btn_mousedown', this.close)
this.mindMap.on('delete_node_img_from_delete_btn', this.close)
this.mindMap.on('translate', this.close)
},
mounted() {
document.body.append(this.$refs.nodeImgPlacementToolbar)
@ -60,6 +62,9 @@ export default {
this.mindMap.off('node_dblclick', this.close)
this.mindMap.off('node_active', this.onNodeActive)
this.mindMap.off('scale', this.onScale)
this.mindMap.off('node_img_adjust_btn_mousedown', this.close)
this.mindMap.off('delete_node_img_from_delete_btn', this.close)
this.mindMap.off('translate', this.close)
},
methods: {
show(node, imgNode) {