-
Notifications
You must be signed in to change notification settings - Fork 11
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
When dropping an object in "build mode", both vertices should pop inside the black box #113
Comments
The above implementation just bumps one of the vertices inside the black box, and translates everything with it. If a single wire is dropped outside the black box, both vertices may go to the same point. Despite these limitations, this implementation seems very useful and may be good enough. On hold until next published version, then @arouinfar can review and comment. |
Please see #126 for testing. |
I've noticed that both vertices always go to the same point, so long as both vertices were located outside of the black box. To me this doesn't cue that items must be placed within the black box. Could the wires do this instead (or maintain their width when translating)? That way both vertices are still viewable and the wire looks like it's been moved inside the black box. It looks like the right side of the component snaps to the closest edge of the black box. If items are dropped to the left of the black box, they still appear to be outside of the black box after snapping. I think it's best if objects snap so that they are contained within the black box. At the end of this .gif you may notice that the battery and resistor look like they may have potentially overlapped, so the resistor rotated. However, the they did not actually connect, so there may be some edge-case funniness with #125. |
In the above commit, I iterate over all vertices in a fixed subgraph and move them all inside the black box. It works well, but now we must tackle variable-length wires. |
In the above solution, I applied a 2-pass approach that seems to work well for translating things as well as shrinking wires that are longer than the black box, it will need to be tested. |
Please see #134 for testing. |
Looks good @samreid! Closing. |
When dropping an object in "build mode", its vertices should pop inside the black box
The text was updated successfully, but these errors were encountered: