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

activate point feature when set point to draw tool by draw.add and draw.changeMode #1207

Open
zipporaSay opened this issue Dec 21, 2023 · 0 comments

Comments

@zipporaSay
Copy link

mapbox-gl-js version:
1.11.1
mapbox-gl-draw version:
1.2.0

Steps to Trigger Behavior

i have features and want to edit them:
const featureIds = this.draw.add(geoInsight);
this.draw.setFeatureProperty(featureIds[0], 'myFillColorProperty', this.geoInsight.color);
this.draw.setFeatureProperty(featureIds[0], 'draw_type', this.geoInsight.geometricType);
this.draw.changeMode((this.geoInsight.geometricType === GeometryType.POINT ? 'simple_select' : 'direct_select'), { featureId: featureIds[0] });

as you seemed in type point i use simple_select mode as in docs: https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#direct_select

Expected Behavior

i want point to be activate like put feature in draw tool by direct_select,
and emit draw.selectionchange when clickoutside selected point.

Actual Behavior

set point by simple_select and currently draw.selectionchange not emit when clickoutside selected point....

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

No branches or pull requests

1 participant