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

feat: provide snapping to line as well as feature coordinates for polygon mode #384

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

JamesLMilner
Copy link
Owner

@JamesLMilner JamesLMilner commented Dec 22, 2024

Description of Changes

This PR sets up some breaking API changes for snapping, which paves the way for allowing snapping to lines as well as coordinates for the existing polygon mode features. Line and coordinate snapping can be enabled/disabled individually.

  • Change polygon mode snapping property from optional boolean to optional object of type { toLine?: boolean; toCoordinate?: boolean; }
  • Provides toLine which allows snapping to the line segments of polygon mode features
  • Change linestring mode snapping property from optional boolean to optional object of type { toCoordinate?: boolean; }
  • Fixes bug with initial snapping of linestrings on the first coordinate click
  • Add the CartesianPoint type to standardised x, y coordinates across the codebase

Link to Issue

#307

PR Checklist

  • The PR title follows the conventional commit standard
  • There is a associated GitHub issue
  • If I have added significant code changes, there are relevant tests
  • If there are behaviour changes these are documented

@JamesLMilner JamesLMilner force-pushed the snap-linestring branch 2 times, most recently from 447f1bc to d4ca195 Compare December 22, 2024 15:53
@JamesLMilner JamesLMilner merged commit 4b61c82 into main Dec 22, 2024
6 checks passed
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.

1 participant