Cancel in-progress drag with right click or escape key #119
Conversation
Deploying with
|
| Latest commit: |
b20d607
|
| Status: | |
| Preview URL: | https://09945588.graphite-master.pages.dev |
core/editor/src/tools/ellipse.rs, line 82 at r1 (raw file): (EllipseToolFsmState::LmbDown, Event::KeyUp(Key::KeyEscape)) | EllipseToolFsmState::LmbDown, Event::RmbDown(_)) => {
…
}
> ```core/editor/src/tools/line.rs, line 89 at r1 (raw file):
same thing here core/editor/src/tools/pen.rs, line 65 at r1 (raw file):
comparing floats is not ideal. It should not make a difference in this case but there might be a case in which something changes between the calculations, so I'd suggest you calculate the distance instead and compare that to some epsilon core/editor/src/tools/pen.rs, line 80 at r1 (raw file):
See above core/editor/src/tools/rectangle.rs, line 81 at r1 (raw file):
You get the gist |
core/editor/src/tools/ellipse.rs, line 82 at r1 (raw file): Previously, TrueDoctor wrote…
|
|
|
|
Closes #116 by allowing the user to cancel rectangle, ellipse, shape and line creation by either pressing the escape key or the right mouse button. On the pen tool the same action results in the already placed points being committed.
Closes #109 by not committing empty polylines or adding redundant points when clicking the same location twice in a row using the pen tool.
This change is