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

End drawing when appendCoordinates() hits maxPoints #15371

Merged
merged 2 commits into from Nov 25, 2023

Conversation

ahocevar
Copy link
Member

Fixes #15367.

Copy link

📦 Preview the website for this branch here: https://deploy-preview-15371--ol-site.netlify.app/.

@@ -1666,12 +1668,13 @@ class Draw extends PointerInteraction {
* Stop drawing and add the sketch feature to the target layer.
* The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is
* dispatched before inserting the feature.
* @return {Feature<import("../geom/SimpleGeometry.js").default>|null} The drawn feature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardly seems worth it, but we could add a note to the upgrade notes saying that finishDrawing now returns a feature.

@ahocevar ahocevar merged commit d887da5 into openlayers:main Nov 25, 2023
8 checks passed
@ahocevar ahocevar deleted the draw-appendcoordinates-maxpoints branch November 25, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script crashes when on drawing LineString from existing coordinates
2 participants