(
newControllerState: MapState,
extraProps: Record<string, any> | null = null,
interactionState: InteractionState = {}
)
| 628 | } |
| 629 | |
| 630 | protected updateViewport( |
| 631 | newControllerState: MapState, |
| 632 | extraProps: Record<string, any> | null = null, |
| 633 | interactionState: InteractionState = {} |
| 634 | ): void { |
| 635 | // Inject rotation pivot position during rotation for visual feedback |
| 636 | const state = newControllerState.getState(); |
| 637 | if (interactionState.isDragging && state.startRotateLngLat) { |
| 638 | interactionState = { |
| 639 | ...interactionState, |
| 640 | rotationPivotPosition: state.startRotateLngLat |
| 641 | }; |
| 642 | } else if (interactionState.isDragging === false) { |
| 643 | // Clear pivot when drag ends |
| 644 | interactionState = {...interactionState, rotationPivotPosition: undefined}; |
| 645 | } |
| 646 | |
| 647 | super.updateViewport(newControllerState, extraProps, interactionState); |
| 648 | } |
| 649 | |
| 650 | /** Add altitude to rotateStart params based on rotationPivot mode */ |
| 651 | protected _getAltitude = (pos: [number, number]): number | undefined => { |
no test coverage detected