API Reference > imodeljs-frontend > Tools > PrimitiveTool > onSelectedViewportChanged onSelectedViewportChanged Method Called when active view changes. Tool may choose to restart or exit based on current view type. onSelectedViewportChanged(_previous: undefined | Viewport, current: undefined | Viewport): void Parameter Type Description _previous undefined | Viewport The previously active view. current undefined | Viewport The new active view. Returns - void Defined in core/frontend/src/tools/PrimitiveTool.ts Line 137 Last Updated: 11 June, 2024