antvis / X6

🚀 JavaScript diagramming library that uses SVG and HTML for rendering.
https://x6.antv.antgroup.com
MIT License
5.77k stars 1.72k forks source link

自定义节点如何缩放节点 #4358

Open z309520291 opened 4 months ago

z309520291 commented 4 months ago

问题描述

当我在自定义一个节点后,创建这个节点,但是缩放框异常了,拖动缩放框,图形并没有跟着缩放框改变 image 我的代码是这样的 image 麻烦帮我看看是不是有什么问题

重现链接

https://stackblitz.com/edit/vitejs-vite-qaxtja?file=package.json,src%2Fcomponents%2FHelloWorld.vue,src%2Fcomponents%2Fgraph.js,src%2FApp.vue,src%2Fcomponents%2Findex.js

重现步骤

1.我使用registerNode注册了一个节点类型,2.我在画布中创建了这个节点 问题在于:我不知道为什么缩放框失效了,它和图形直接没有联系了,图形没有跟着缩放框进行缩放

预期行为

希望能和https://x6.antv.vision/zh/examples/showcase/practices#flowchart中的基本流程图的图形一样可以正常缩放就行

平台

屏幕截图或视频(可选)

image image image

补充说明(可选)

求大佬帮忙瞅瞅 309520291@qq.com

x6-bot[bot] commented 4 months ago

👋 @z309520291

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Ardanas commented 2 months ago

可能要自己resize一下