MCPcopy
hub / github.com/visgl/deck.gl / _onMultiPan

Function _onMultiPan

modules/core/src/controllers/controller.ts:591–608  ·  view source on GitHub ↗
(event: MjolnirGestureEvent)

Source from the content-addressed store, hash-verified

589 }
590
591 protected _onMultiPan(event: MjolnirGestureEvent): boolean {
592 if (!this.touchRotate) {
593 return false;
594 }
595 if (!this.isDragging()) {
596 return false;
597 }
598
599 const pos = this.getCenter(event);
600 pos[0] -= event.deltaX;
601
602 const newControllerState = this.controllerState.rotate({pos});
603 this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
604 isDragging: true,
605 isRotating: true
606 });
607 return true;
608 }
609
610 protected _onMultiPanEnd(event: MjolnirGestureEvent): boolean {
611 if (!this.isDragging()) {

Callers

nothing calls this directly

Calls 3

getCenterMethod · 0.65
rotateMethod · 0.65
updateViewportMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…