Leaflet.DistortableImage icon indicating copy to clipboard operation
Leaflet.DistortableImage copied to clipboard

Most of the actions not working with crs: L.CRS.Simple

Open jbogdani opened this issue 5 years ago • 1 comments

Hello, and thank you for this great plugin.

I'm having troubles getting it to work when the map is initialized with crs: L.CRS.Simple. Drag, Scale, Rotate and Free transform actions are not working, while Distort, Lock, Opacity, Save and Delete do.

The code to reproduce this issue is very simple:

const map = L.map('map', {
    crs: L.CRS.Simple
}).setView([0, 0], 10);

const img = L.distortableImageOverlay('some-image.jpg').addTo(map);

I have tried with the latest versions of Google Chrome, Mozilla Firefox and Safari, with the same results.

jbogdani avatar Dec 05 '20 14:12 jbogdani

Thanks for opening your first issue here! Please follow the issue template to help us help you 👍🎉😄 If you have screenshots to share demonstrating the issue, that's really helpful! 📸 You can make a gif too!

welcome[bot] avatar Dec 05 '20 14:12 welcome[bot]

Oh! Just noticed this issue. This is the same problem a have using CRS too.

Please check my comments in issue #1007. I hope that helps you.

themacboy avatar Aug 16 '22 11:08 themacboy

Current I solved the problem using Math.abs(),but thata not the correct solution, and I'm not sure how to do a better patch

themacboy avatar Aug 16 '22 11:08 themacboy

I'm seeing the same problem. Can we disable the check entirely if the map CRS is L.CRS.Simple?

steveruiz avatar Sep 13 '22 18:09 steveruiz

I'm seeing the same problem. Can we disable the check entirely if the map CRS is L.CRS.Simple?

I supose that yes, but for me is more easy use Math.abs() and wait for @jywarren patch it

themacboy avatar Sep 13 '22 19:09 themacboy

Hello, I'm addressing this here - going to merge this issue into it:

https://github.com/publiclab/Leaflet.DistortableImage/issues/1007#issuecomment-1261637950

Please follow there and if you can let me know whether the fix works once it's merged, that would be super helpful. Thanks!

jywarren avatar Sep 29 '22 01:09 jywarren