-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
Changed style / position after clear() start() #813
Comments
Hi
You can use this function to return to coordinates 0.0 I don't think you should call start again if it is already started. |
Thank you!! So I needed to to editor.start() in order to reset the nodeID count to 0. Otherwise, if a new node was added, the id was not starting from 0. When doing editor.start(), what happened is that a new '.drawflow' was created. I fixed the problem by doing this
Awesome library by the way! |
I have added a button to reset the editor. What I have noticed, is that although I was adding node in the same position (etc 100, 100), the actual position from the user perspective was different.
Here are two screenshots showing it.
It seems that when doing start, the styles changed before and after performing
this.editor.clear();
this.editor.start();
Changed style: inlineSize: before = 1200.98px, after = 600.484px
Changed style: perspectiveOrigin: before = 600.484px 238px, after = 300.234px 238px
Changed style: transformOrigin: before = 600.492px 238px, after = 300.242px 238px
Changed style: webkitLogicalWidth: before = 1200.98px, after = 600.484px
Changed style: webkitPerspectiveOrigin: before = 600.484px 238px, after = 300.234px 238px
Changed style: webkitTransformOrigin: before = 600.492px 238px, after = 300.242px 238px
Changed style: width: before = 1200.98px, after = 600.484px
Position dimension changed : width: before = 1200.984375, after = 600.484375
Position dimension changed : right: before = 1623.984375, after = 1023.484375
The text was updated successfully, but these errors were encountered: