Leaflet.DistortableImage
Leaflet.DistortableImage copied to clipboard
Deselect event listener is triggered when selecting and deselecting, and it does this for all imageoverlay in the map
I want to handle 'deselect' operation for individual distortableImageOverlay. But 'deselect' listener is also triggered when selecting an image. And it does this for all overlays, for example; if i have 3 distortableImageOverlay layer in the map, deselect listener is triggered 3 times when i select or deselect an image. This issue does not happen for 'select' listener.
labels.map(({labelId, lat, lng, text, angle}, index) => {
let image = require("../assets/icons/tree-736885__480.jpg")
const overlay = L.distortableImageOverlay(image,{
corners: [
L.latLng(lat, lng),
L.latLng(lat, lng + text.length*0.00054),
L.latLng(lat-0.001, lng),
L.latLng(lat - 0.001, lng + text.length*0.00054),
],
editable: true,
actions: [L.RotateAction, L.LockAction, L.OpacityAction, L.DeleteAction],
})
L.DomEvent.on(overlay, "deselect", function (e){
console.log(labelId)
})
Browser, version, and operating system:
- chrome -
@semihsahin @TildaDares can i work on this
Hi @leumasxxx, yes you can.
Can you also add a screenshot of the behavior here when you’re able to reproduce it? Thanks!
@semihsahin or @TildaDares can I claim for this bug to be my second issue?
@TildaDares I'm trying to move forward with the contribution but I'm not getting any responses. Can you please guide me on the next steps?
Hi @julianavmgiusti, you can start by adding a screenshot of the bug reproduction. After reproducing the bug, we’ll move forward from there.
Oh, @TildaDares great, so I can work on this. Great, thak you so much.
Hi @TildaDares I don't see any other issues to work on after my FTO please can you direct me to another issue or a way forward