Skip to content
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

Added ability to select anchors with mouse #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshuahhh
Copy link
Collaborator

@electronicwhisper: I wanted to play around with adding more point-like elements, so as a warm-up I added support for selecting & dragging anchor points. PTAL!

(((
Things that seemed sort of funky to me but eventually turned out to make perfect sense:

  1. You still need to double-click your way down to the anchor from the path. I didn't expect this, before implementing the feature. But I should have, since it fits with Apparatus's general selection method.
  2. Since anchor points are children of the parent path, their highlights will show up when the parent is highlighted. That means putting your mouse near one anchor results in all the fellow anchors being highlighted. But again, this fits with how Apparatus's visualizes single- and double-click targets: double-click targets are never visualized.

This is an interesting point to revisit: is there a good way to signify the double-click affordance?
)))

@electronicwhisper
Copy link
Collaborator

Great start!!

The dots should be somehow distinguished from the reposition/rescale dots, at least in this situation where you just have the shape selected.

image

(It is particularly confusing if you've just selected a square.)

I haven't entirely thought this through, but Sketch has a decent system for working with anchors. When you just select a shape, it has no handles for the anchor points. When you double click the shape it selects the first anchor point. When an anchor point is selected, all the anchor points in the same path get handles which you can use to select/drag them.

Shape is selected:
image

After double click, first anchor is selected, other anchors have handles as long as any anchor in the path is selected:
image

Also think about how the interface will work to add points. I want it to feel like using a "pen tool". Sketch might have the most sensible model, but I haven't catalogued all the possibilities / existing solutions.

As for visualizing what would happen with the double click, I think this would be a nice touch. Maybe if you have something selected, subtly highlight the shape that would be selected if you were to double click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants