We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2版本 构造方法中nodeTextDraggable/edgeTextDraggable 属性设置为true无效 无法实现节点文本和连接线文本的拖拽 (可用状态时 鼠标位于文本上回有移动的鼠标指针模式 且文本可拖动) v1版本 这2个属性可用
// 创建画布实例,也可以 new Core.LogicFLow const lf = new Core.default({ container: document.querySelector('#container'), width: 700, height: 500, grid: true, nodeTextDraggable:true, edgeTextDraggable:true, })
示例地址 https://github.com/eye33/logicFlow_demo_v2/blob/main/index.html
2.x
No response
Chrome, Microsoft Edge
The text was updated successfully, but these errors were encountered:
允许文本拖动的逻辑在2.0版本更新后有变化,详见:
LogicFlow/packages/core/CHANGELOG.md
Line 352 in 080eff1
想要实现文本拖拽的话,可以参考以下修改:
// 修改前的节点定义 { id: '21', type: 'rect', x: 100, y: 200, text: 'rect node', } // 修改后的节点定义 { id: '21', type: 'rect', x: 100, y: 200, text: { value: 'rect node', x: 100, y: 200, draggable: true, }, }
不过目前文本拖拽的位移计算似乎有问题,可以先看看目前的文本拖拽功能能不能满足实现。
Sorry, something went wrong.
允许文本拖动的逻辑在2.0版本更新后有变化,详见: LogicFlow/packages/core/CHANGELOG.md Line 352 in 080eff1 - 优化允许文本拖动的逻辑判断 -> nodeTextDraggable && draggable 才可以允许拖动
为了使节点和边的文本都可以拖拽, 我是不是还得写一段类似这样的代码?
lf.on('text:update', ({ data }) => { lf.getModelById(data.id).text.draggable = true })
这或许有些不合理了, 让原本只要一个配置项就能实现的功能复杂化
我认为也许这么设定会更好些:
typeof text.draggable === 'boolean'
text.draggable
nodeTextDraggable/edgeTextDraggable
No branches or pull requests
发生了什么?
v2版本 构造方法中nodeTextDraggable/edgeTextDraggable 属性设置为true无效 无法实现节点文本和连接线文本的拖拽 (可用状态时 鼠标位于文本上回有移动的鼠标指针模式 且文本可拖动)
v1版本 这2个属性可用
// 创建画布实例,也可以 new Core.LogicFLow
const lf = new Core.default({
container: document.querySelector('#container'),
width: 700,
height: 500,
grid: true,
nodeTextDraggable:true,
edgeTextDraggable:true,
})
示例地址
https://github.com/eye33/logicFlow_demo_v2/blob/main/index.html
logicflow/core版本
2.x
logicflow/extension版本
2.x
logicflow/engine版本
No response
浏览器&环境
Chrome, Microsoft Edge
The text was updated successfully, but these errors were encountered: