画布scale事件有个bug
Describe the bug
缩放的中心点(ox,oy)永远都是0.
Your Example Website or App
https://x6.antv.antgroup.com/examples/node/native-node/#text-block
Steps to Reproduce the Bug or Issue
import { Graph } from '@antv/x6'
const graph = new Graph({
container: document.getElementById('container'),
mousewheel:true,
scaling:{
min:0.1,
max:10
},
grid: true,
})
graph.on('scale', (e) => {
console.log(e)
console.log(textNode)
textNode.prop('attrs/label/text',JSON.stringify(e));
})
const textNode=graph.addNode({
x: 160,
y: 120,
width: 360,
height: 120,
shape: 'text-block',
text: `There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.`,
attrs: {
body: {
fill: '#efdbff',
stroke: '#9254de',
rx: 4,
ry: 4,
},
},
})
鼠标滚轮转动,查看事件里的数据
Expected behavior
ox和oy.能正常返回
Screenshots or Videos
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 2.11.1]
Additional context
No response
碰到了同样的问题
🧑🏻💻 In order to ensure the better, healthy, and sustainable development of our open-source project, and to allow develops in the community who are interested in open source to easily get started and contribute, we have included this issue in the oscp program. You can claim it by replying with "claim." During the process, you will receive one-on-one guidance from project members, and after your contribution is merged, you will be eligible for some official activity incentives.
Reference document:
🧑🏻💻 为了让我们的开源项目能更好的、健康的可持续发展,也让社区对开源感兴趣的同学,能轻轻松松的入门和贡献,我们将这个 issue 纳入到 oscp 计划中,回复「收到」即可认领,过程中能有项目成员的一对一指导,并在合并之后获得官方的一些活动激励。
参考文档: