Skip to content

Allow custom relative snap points for handles #6975

@kostyafarber

Description

@kostyafarber

What's the feature?

See #6908 (comment). We have no way of defining a relative snap point when snapping handles with the shift modifier.

The current logic relies on finding a "next adjacent point", which just means the next handle that isn't a 'middle' handle and that isn't itself. This works for our shapes, but does not allow for custom behaviour in user defined shapes.

This came about working on the bezier curve example shape. With this shape the first control handle ends up snapping relative to the next control handle, which results in janky snapping. Amusingly, it works for the second control point because the next point that isn't middle and itself is the end point of the curve — which is the desired point for intuitive snapping.

This will require a new API design that will allow users to define their own relative snap points for shift modifier snapping.

Where would you like this feature?

The developer package

Contact Details

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions