butterfly
butterfly copied to clipboard
canvas.justifyCoordinate不生效
您想申请的是需求还是问题? 问题 目前的情况是什么? 拖动节点位置后,运行canvas.justifyCoordinate()没有效果 预期的结果是什么? 拖动节点位置后,运行canvas.justifyCoordinate()没有效果 哪个butterfly版本在哪个浏览器/操作系统发生的错误? 3.1.0 请重现步骤,如果可以的话,请提供一个最小的演示案例。 修改了example/demo/liteGraph/index.jsx中的代码。
componentDidMount() {
let root = document.getElementById('dag-canvas');
this.canvas = new Canvas({
root: root,
disLinkable: true, // 可删除连线
linkable: true, // 可连线
draggable: true, // 可拖动
zoomable: true, // 可放大
moveable: true, // 可平移
theme: {
edge: {
type: 'AdvancedBezier'
}
}
})
this.canvas.draw(mockData, () => {
console.dir(mockData)
this.canvas.setGirdMode(true, {
isAdsorb: false, // 是否自动吸附,默认关闭
theme: {
shapeType: 'circle', // 展示的类型,支持line & circle
gap: 20, // 网格间隙
backgroud: '#252525', // 网格背景颜色
circleRadiu: 1.5, // 圆点半径
circleColor: 'rgba(255, 255, 255, 0.8)' // 圆点颜色
}
});
});
this.canvas.on('events', (data) => {
console.log(data);
})
window.canvas = this.canvas;
}
在页面上拖拽节点后在开发者工具栏中调用canvas.justifyCoordinate()没有效果,请问该怎么使用canvas.justifyCoordinate()
我晚些看看,justifyCoordinate可能在升级大版本的时候出问题了
Same issue