Skip to content

Commit

Permalink
fix: disable propagation for custom leaflet extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
hiba9201 committed Nov 5, 2023
1 parent ed626bb commit d59ce11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class UserPlacemarkControl extends L.Control {
`;

L.DomEvent.on(button, 'click', () => this.onClick(container), this);
L.DomEvent.disableClickPropagation(container);

this.map.addEventListener('drag', () => {
this.setFreeState(container);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class ZoomControl extends L.Control.Zoom {
onAdd() {
const container = L.DomUtil.create('div', cn(styles.ZoomControl));

L.DomEvent.disableClickPropagation(container);
// TS tells that those buttons do not exist in ZoomControl
// @ts-ignore
// eslint-disable-next-line no-underscore-dangle
Expand Down

1 comment on commit d59ce11

@ekbdev
Copy link

@ekbdev ekbdev commented on d59ce11 Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for transport ready!

✅ Preview
https://transport-bdu1l5h5k-ekbdev.vercel.app
https://ekbdev-transport-fix-disable-propagation-for-leaflet0extensions.vercel.app

Built with commit d59ce11.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.