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