Skip to content

Commit

Permalink
fix: 地图拖拽冒泡
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulLyoko committed May 7, 2022
1 parent b4ee795 commit ce9a1e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/utils/fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export function fixMapPropagation(map: T.Map | null) {
map?.disableDoubleClickZoom();
setTimeout(() => map?.enableDoubleClickZoom(), 300);
}
},
mousemove: (e: Event) => {
e.stopPropagation();
if (map?.isDrag()) {
map?.disableDrag();
setTimeout(() => map?.enableDrag(), 300);
}
}
};
}

0 comments on commit ce9a1e2

Please sign in to comment.