-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bug 🐛Something isn't workingSomething isn't workinggood first issueGood for newcomers.Good for newcomers.oscpThis issue is related to the OSCP (Open Source Contribution Plan)This issue is related to the OSCP (Open Source Contribution Plan)
Description
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
Metadata
Metadata
Assignees
Labels
bug 🐛Something isn't workingSomething isn't workinggood first issueGood for newcomers.Good for newcomers.oscpThis issue is related to the OSCP (Open Source Contribution Plan)This issue is related to the OSCP (Open Source Contribution Plan)
Type
Projects
Status
Done