Leaflet / Leaflet/Leaflet.Editable

Editable forces object to be draggable

Open Beginner friendly
#151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
606
Forks
190
PR merge metrics
No merged PRs in 30d

Description

Hi,

Leaflet.Editable forces the leaflet path objects to be draggable. It does not matter matter if you set draggable: true or draggable: false,path.enableEdit() overrides this. If you call path.dragging.disable() after path.enableEdit() it works as expected.

I think this line causes the problem: https://github.com/Leaflet/Leaflet.Editable/blob/master/src/Leaflet.Editable.js#L798

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Leaflet.Editable.js around line 798, where path editing affects dragging. Trace how enableEdit handles the path's draggable setting and compare behavior for paths configured with draggable true and false. Done means editing no longer overrides an explicitly disabled dragging state while enabled dragging still behaves as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.