• Public
  • Public/Protected
  • All

Interface NavigationConfig

Navigation configuration for a view.

Specify how mouse and touch input should be used to navigate the view (move the camera).

Note: To use the right mouse button (either rightMouseButton or leftAndRightMouseButtons), you need to disable the default context menu in the browser (see example below).

Example on how to configure "Ceetron style" navigation:

// Disable context menu - Required for enableMouseButtonTracking
canvas.addEventListener("contextmenu", (event) => { event.preventDefault()});

// Enable mouse tracking (so we can use leftAndRightMouseButtons)

// Ceetron style navigation
const navConfig = view.navigation.config;
navConfig.leftMouseButton.noModifier =cee.NavigationType.PAN;
navConfig.rightMouseButton.noModifier =cee.NavigationType.ROTATE;
navConfig.leftAndRightMouseButtons.noModifier =cee.NavigationType.WALK;
navConfig.wheelOrPinch = cee.NavigationType.WALK;


  • NavigationConfig




invertWalkZoom: boolean

Invert zoom or walk. If true, camera will zoom out if mouse is moved up

Default is false


invertWheel: boolean

Invert the zoom direction of the mouse wheel

Default is false

Readonly leftAndRightMouseButtons

leftAndRightMouseButtons: NavigationMouseButtonConfig

Navigation config when both left and right mouse buttons are pressed.

Default is NONE for all modifier states.

Note: To use the leftAndRightMouseButtons you have to enable mouse tracking in the viewer. See Viewer.enableMouseButtonTracking. This again requires the browser context menu to be disabled

Readonly leftMouseButton

Navigation config for left mouse button.

Default is no modifiers -> ROTATE shift pressed -> WALK ctrl or cmd pressed -> PAN

Readonly middleMouseButton

middleMouseButton: NavigationMouseButtonConfig

Navigation config for middle mouse button.

Default is NONE for all modifier states.


oneFinger: NavigationType

Navigation type to use for one finger dragging.

Default is ROTATE

Readonly rightMouseButton

rightMouseButton: NavigationMouseButtonConfig

Navigation config for right mouse button.

Default is NONE for all modifier states.


twoFinger: NavigationType

Navigation type to use for two finger dragging.

Default is PAN


wheelOrPinch: NavigationType

Navigation type to use for mouse wheel/touch screen pinch events.

Default is WALK

Generated using TypeDoc