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
目前graph.on('cell:added')回调中,可以识别是stencil拖拽过来的新节点; 但是graph.on('cell:added')回调中,不能识别是paste粘贴过来的新节点;
1.paste可以自定义参数:graph.paste({customerOption:{...}}) 2.cell:added的回调可以获取用户自定义参数,
graph.paste({customerOption:{...}})
graph.on("cell:added",(event)=>{ myOption = event.options.customerOption } )
The text was updated successfully, but these errors were encountered:
可以这样:
graph.paste({ nodeProps: { flag: 1 } }) graph.on('cell:added', ({ cell }) => { const flag = cell.prop('flag') console.log(flag) })
Sorry, something went wrong.
可以这样: graph.paste({ nodeProps: { flag: 1 } }) graph.on('cell:added', ({ cell }) => { const flag = cell.prop('flag') console.log(flag) })
这种方式是针对剪切板中已经复制的所有cell吧?
是的
No branches or pull requests
功能描述
目前graph.on('cell:added')回调中,可以识别是stencil拖拽过来的新节点;
但是graph.on('cell:added')回调中,不能识别是paste粘贴过来的新节点;
期望解决方案
1.paste可以自定义参数:
graph.paste({customerOption:{...}})
2.cell:added的回调可以获取用户自定义参数,
The text was updated successfully, but these errors were encountered: