Skip to content

issue-1405-resolved#1406

Open
th-himanshu wants to merge 1 commit intopubliclab:mainfrom
th-himanshu:issue-resolved-1405
Open

issue-1405-resolved#1406
th-himanshu wants to merge 1 commit intopubliclab:mainfrom
th-himanshu:issue-resolved-1405

Conversation

@th-himanshu
Copy link
Copy Markdown

Problem
The DistortableImageOverlay was behaving inconsistently when added dynamically. This was caused by attempting to bind DOM events to img.getElement() before the element was fully injected into the Leaflet pane, or while the GoogleMutant layer was still re-ordering the DOM.

Changes
Switched from L.DomEvent.on(img.getElement(), 'load', ...) to the Leaflet-native img.on('add', ...) event.

Ensured event listeners are only attached once the layer has a valid DOM presence.

Corrected the edit listener to bind to the Leaflet layer instance instead of the raw HTML element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant