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

Deselect event listener is triggered when selecting and deselecting, and it does this for all imageoverlay in the map

Open semihsahin opened this issue 3 years ago • 7 comments

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 avatar Jun 06 '22 15:06 semihsahin

@semihsahin @TildaDares can i work on this

leumasxxx avatar Oct 13 '22 08:10 leumasxxx

Hi @leumasxxx, yes you can.

Can you also add a screenshot of the behavior here when you’re able to reproduce it? Thanks!

TildaDares avatar Oct 13 '22 11:10 TildaDares

@semihsahin or @TildaDares can I claim for this bug to be my second issue?

julianavmgiusti avatar Oct 15 '22 12:10 julianavmgiusti

@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?

julianavmgiusti avatar Oct 20 '22 19:10 julianavmgiusti

Hi @julianavmgiusti, you can start by adding a screenshot of the bug reproduction. After reproducing the bug, we’ll move forward from there.

TildaDares avatar Oct 20 '22 20:10 TildaDares

Oh, @TildaDares great, so I can work on this. Great, thak you so much.

julianavmgiusti avatar Oct 20 '22 20:10 julianavmgiusti

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

victory-lydia avatar Oct 23 '22 15:10 victory-lydia