Skip to content

Changing drag cursor behavior if preferCanvas is true #590

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

Merged
merged 4 commits into from
May 20, 2020

Conversation

Falke-Design
Copy link
Collaborator

Fixing #528

The problem is that only one layer exists because all layers are drawn as one canvas element. When then the circlemarker is placed and the edit mode is automatically activated the css class leaflet-pm-draggable is added to the canvas layer (full map) and not only to the circlemarker.

I fixed this by changing the code to:
If preferCanvas is true then add to all single layers the event mouseover and mouseout . If the mouse is over the layer, the canvas layer becomes the css class leaflet-pm-draggable, and if the mouse is not longer over the layer, the class is removed from the canvas.

@codeofsumit codeofsumit merged commit 9e84c58 into geoman-io:develop May 20, 2020
@Falke-Design Falke-Design deleted the canvas_drag_cursor branch May 23, 2020 20:56
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