NavigationConfig
- class cee.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) viewer.enableMouseButtonTracking(true); // 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;
Properties
Properties
- cee.NavigationConfig.invertWalkZoom
Invert zoom or walk. If true, camera will zoom out if mouse is moved up
Default is false
- cee.NavigationConfig.invertWheel
Invert the zoom direction of the mouse wheel
Default is false
- cee.NavigationConfig.leftAndRightMouseButtons
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
- cee.NavigationConfig.leftMouseButton
Navigation config for left mouse button.
Default is no modifiers -> ROTATE shift pressed -> WALK ctrl or cmd pressed -> PAN
- cee.NavigationConfig.middleMouseButton
Navigation config for middle mouse button.
Default is NONE for all modifier states.
- cee.NavigationConfig.oneFinger
Navigation type to use for one finger dragging.
Default is ROTATE
- cee.NavigationConfig.rightMouseButton
Navigation config for right mouse button.
Default is NONE for all modifier states.
- cee.NavigationConfig.twoFinger
Navigation type to use for two finger dragging.
Default is PAN
- cee.NavigationConfig.wheelOrPinch
Navigation type to use for mouse wheel/touch screen pinch events.
Default is WALK