-
-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
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
Can we preserve output- class of output bubbles? #153
Comments
Hello @ishpreetkaurwebner There is no function to hold className. The only option I can think of is that you overwrite the removeNodeOutput function. Even though I don't know if it would give problems with the addNodeOuput function, even if it said problems you could also overwrite it. |
@jerosoler Thanks a lot for quick reply. |
@ishpreetkaurwebner when you deleted the output class while it connected to other nodes ,please check node which this class belongs , in editor,drawflow.drawflow.Home.data and try to console getNodeFromId(node_id) as well.check the outputs object. #151 |
@jerosoler and @techies-sudo: Thanks a lot for your reply. overwrite the removeNodeOutput, getNodeFromId, removeSingleConnection all have helped me to resolve my problem. But, I am facing another issue: When I export the drawflow, it is displaying me old bubbles also. It has not removed old bubbles in export data. It is showing all bubbles which is/are removed. When I removed bubble, then I removed connections linked with this bubble as shown in following code. Export does not show connections, it is perfect here, but bubbles are still showing in export. I have made following changes for override
Any idea to update the drawflow. |
Hello @jerosoler , I am able to update the drawflow using
and export is working perfectly. So, when I export the drawflow and then import the drawflow, then it shows me output connections as As you can see in image, output_5 is missing as I have removed this bubble, so it is missing here and no reordering of output bubbles happened with function Now, I have imported the same drawflow on web page, and in import, if we see with console.log, output bubbles are shown as with same class output_1, output_2, output_3, output_4, output_6, output_7 which was exported, Now, any idea to avoid reordering of output_ class while importing? Once again thanks for quick reply. |
👍 Override for(var x = 0; x < Object.keys(dataNode.outputs).length; x++) {
const output = document.createElement('div');
output.classList.add("output");
output.classList.add("output_"+(x+1));
outputs.appendChild(output);
} I don't think it's difficult to change that. |
@jerosoler Thanks for reply. |
@jerosoler I have read the code carefully, it is creating each and every class like 'parent-node', 'inputs', 'outputs'. If I override the function, then definitely every div will be removed. |
Not remove, edit! I think everything else will work fine. Or maybe you also have to touch the |
@jerosoler : Thanks for giving me idea of lines of code which is producing reordering of outputs. So, I am trying to add new function for ordering of output_ class bubbles and I want to call that function in
But it is not working at all. Even simple Whether I am doing something wrong in callback function for event
|
The console show error? |
Console does not display any error, but no alert message is displayed on |
I have done by first removing bubbles and then creating bubbles in a function and calling this function immediately after import function. I have not done any code relating to maintaining actual sequence of code in any editor events. Thanks for giving idea of code and that idea helps me to do ordering of output bubbles. |
add before import |
Suppose, I have 6 output bubbles with class names output_1, output_2, .... output_6.
I removes one output bubble having class output_4 with method
editor.removeNodeOutput()
, it renames all bubble outputs like output_1, output_2, output_3, output_4, output_5. I would like to have output classes as:output_1, output_2, output_3, output_5, output_6. output_4 is removed, so it should not be there in sequence.
When we remove any node, then node classes are not renamed. In same way, can output bubbles' classes can be preserved?
The text was updated successfully, but these errors were encountered: