Rasterex APINPM Package/docs/components/navigation/api
API References
Technical reference for navigation tool SDK actions.
The following action IDs are used with the viewer.tools.navigation.set({ action: ... }) method.
- MAGNIFY: Activates the magnification loupe.
- ZOOM_IN / ZOOM_OUT: Incremental zoom changes.
- FIT_TO_WINDOW: Resets zoom to show the entire page.
- FIT_WIDTH / FIT_HEIGHT: Fits the page width or height to the viewport.
- ZOOM_WINDOW: Zoom to a user-drawn box.
- ROTATE: Rotates the drawing view clockwise.
- HIDE_MARKUPS: Toggle markup visibility.
- BACKGROUND: Toggle background display.
- MONOCHROME / GRAYSCALE: Display modes.
- SEARCH_TEXT: Opens the text search interface or executes a search programmatically.
- SELECT_TEXT: Enables text selection mode.
- VECTORINFO / BLOCKINFO: Retrieves vector and block details.
All navigation controls use the specific navigation.set() method on the Viewer tools interface.
// Standard interaction
await viewer.tools.navigation.set({
action: 'FIT_TO_WINDOW',
enabled: true
});
// Search Text
await viewer.tools.navigation.set({
action: 'SEARCH_TEXT',
enabled: true,
searchText: 'Sample',
searchCaseSensitive: false,
searchForward: true
});Method Signature
