bottom Panel

This commit is contained in:
2024-02-05 13:37:01 +05:00
parent 82299f1ea8
commit b6c4ea24b3
8 changed files with 139 additions and 154 deletions
+11 -1
View File
@@ -39,7 +39,17 @@ const createMapView = (container: HTMLDivElement) => {
view.on("double-click", ["Control"], stopEvtPropagation);
// disables pinch-zoom and panning on the view
view.on("drag", (e: any) => console.log("e", e));
view.on("drag", (event: any) => {
if (event.native) {
// Check if the event is from a touch device
const pointerCount = event.native.length;
if (pointerCount === 2) {
console.log("event.pointerMovePoints", event);
// Use two-finger drag to move the map
event.stopPropagation();
}
}
});
// disable the view's zoom box to prevent the Shift + drag
// and Shift + Control + drag zoom gestures.