Leaflet.Path.Drag icon indicating copy to clipboard operation
Leaflet.Path.Drag copied to clipboard

[Question] Dragging multiple polygons in canvas mode?

Open AndrejGajdos opened this issue 3 years ago • 7 comments

I am just wondering. Does dragging multiple polygons work in canvas mode? During dragging only one polygon is visible.

I am adding a link to so for reference.

AndrejGajdos avatar Mar 03 '21 19:03 AndrejGajdos

Can you put them into a MultiPolygon?

w8r avatar Mar 03 '21 19:03 w8r

@w8r yes I can. Thank you, this is a great idea. I will try it out and let you know.

AndrejGajdos avatar Mar 03 '21 19:03 AndrejGajdos

@w8r unfortunately, multipolygon doesn't work because it makes holes for overlapping polygons codesandbox.io

AndrejGajdos avatar Mar 03 '21 20:03 AndrejGajdos

There's a fllRule option on the L.Path styles for that, what makes it alternate like that is the evenodd option, you may try some other one from the list here

w8r avatar Mar 04 '21 13:03 w8r

@w8r default value is evenodd, if I try nonzero it doesn't make any difference codesandbox.io

AndrejGajdos avatar Mar 04 '21 13:03 AndrejGajdos

Would be great if this plugin supports dragging whole FeatureGroup. You can consider this as a feature request.

AndrejGajdos avatar Mar 05 '21 11:03 AndrejGajdos

Good point!

w8r avatar Mar 05 '21 12:03 w8r