zakjan / leaflet-lasso

Lasso selection plugin for Leaflet
https://zakjan.github.io/leaflet-lasso/
MIT License
111 stars 21 forks source link

Touch support #20

Closed MicahStevens closed 4 years ago

MicahStevens commented 4 years ago

I need to integrate touch support for this tool, I have some ideas but as I'm new to plugin dev for leaflet I was wondering if you had particular recommendations on how to accomplish this? Just merely adding touch events to the existing handlers doesn't work, so I'll have to dig in more.

zakjan commented 4 years ago

The issue is likely in https://github.com/zakjan/leaflet-lasso/blob/master/src/lasso-handler.ts#L120-L125, this code is applicable only in mouse scenario. Then I suppose adding touch events should work.

MicahStevens commented 4 years ago

Thank you, I'll open a pull request in case you want to include it in the main repo once I get it working. Appreciate the input.

zakjan commented 4 years ago

Awesome, I'm looking forward to it, thanks! :)

niharsalunke commented 4 years ago

Is the touch support enabled? I have had a great help with your code, but I am looking forward to extend its compatibilities with touch screen devices. Please Help.

MicahStevens commented 4 years ago

I started working on a patch for touch support, but it's not complete. I'll post here and submit a pull request when I get something working, but I had to set it aside for a little while due to other priorities.

niharsalunke commented 4 years ago

I started working on a patch for touch support, but it's not complete. I'll post here and submit a pull request when I get something working, but I had to set it aside for a little while due to other priorities.

Thank You so much for the reply. The feature is much awaited. 😄😄

zakjan commented 4 years ago

Hi @MicahStevens @niharsalunke, I released touch support as 2.2.0, could you take a look if it works well for you?

MicahStevens commented 4 years ago

Great! Thank you, much appreciated, I didn't think to use the map container. I can try out today on android tablet + phone and iOS tablet + phone, plus an embedded touchscreen chrome device.