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
Hi, i am doing prototypes and an evaluation of libs like yours. First of all thank you for spending your time providing this great lib.
I think i found a bug.
If i add a node vie the addNode method the data is not passed to the underlying vue component as props.
Here is my code:
const id = document.getElementById("drawflow"); this.editor = new Drawflow(id, Vue, this); this.editor.registerNode('ButtonNode', ButtonNode); this.editor.reroute = true; this.editor.reroute_fix_curvature = true; this.editor.curvature = 1; this.editor.start(); const data = { "label" : "someLabel" } this.editor.addNode('test2', 1, 1, 150, 300, '', data, 'ButtonNode', 'vue');
this is how the node is added starting at drawflow.js:1231
if(parseInt(this.render.version) === 3 ) { //Vue 3 let wrapper = this.render.h(this.noderegister[html].html, this.noderegister[html].props, this.noderegister[html].options); wrapper.appContext = this.parent; this.render.render(wrapper,content); } else { // Vue 2 let wrapper = new this.render({ parent: this.parent, render: h => h(this.noderegister[html].html, { props: this.noderegister[html].props }), ...this.noderegister[html].options }).$mount() // content.appendChild(wrapper.$el); }
It seems like the data parameter is not used. Possible way to solve: Maybe merge the data and this.noderegister[html].props
data
this.noderegister[html].props
Or maybe i am doing sth wrong?
Thank you in advance.
some versions:
The text was updated successfully, but these errors were encountered:
jerosoler#485
49f7269
- merged data to props
If node data is not passed as props.
It is at the time of registration that the props can be passed.
editor.registerNode('name', component, props, options);
There are users who have problems receiving the data. Even though it can be interesting to pass the data as props. Examples passing props:
Maybe pass the values inside a parameter. Or use some parameter type "dataInProps" true/false.
I study it.
Sorry, something went wrong.
i added a PR: #486
Yes, I saw it. Thanks. I will check it.
jerosoler
No branches or pull requests
Hi,
i am doing prototypes and an evaluation of libs like yours. First of all thank you for spending your time providing this great lib.
I think i found a bug.
If i add a node vie the addNode method the data is not passed to the underlying vue component as props.
Here is my code:
this is how the node is added starting at drawflow.js:1231
It seems like the data parameter is not used.
Possible way to solve: Maybe merge the
data
andthis.noderegister[html].props
Or maybe i am doing sth wrong?
Thank you in advance.
some versions:
The text was updated successfully, but these errors were encountered: