bottom Panel
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user