Skip to content

Fix Rectangle and Circle drawing broken since Leaflet 1.0.0#108

Merged
yohanboniface merged 1 commit intomasterfrom
touch-drag
Nov 3, 2016
Merged

Fix Rectangle and Circle drawing broken since Leaflet 1.0.0#108
yohanboniface merged 1 commit intomasterfrom
touch-drag

Conversation

@yohanboniface
Copy link
Copy Markdown
Member

Warning: this is a hack.

L.Draggable has two workflows:

  • mousedown => mousemove => mouseup
  • touchstart => touchmove => touchend

Problem: L.Map.Tap does not allow us to listen to touchstart on L.Map, so we only can deal with the mousedown way, but then when in a touch device, we are dealing with simulated events (actually simulated by L.Map.Tap), which are no more taken into account by L.Draggable since Leaflet/Leaflet@f05af08 / Leaflet/Leaflet#4387.

As a reminder, the overall goal here is to cancel map dragging to allow drawing to start

Also, this is the last bit blocking Leaflet.Editable 1.0.0 release.

Fix #103

@mourner @perliedman @IvanSanchez any better idea by chance?

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