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: Viewport | undefined, current: Viewport | undefined): void Parameter Type Description _previous Viewport | undefined The previously active view. current Viewport | undefined The new active view. Returns - void Defined in core/frontend/src/tools/PrimitiveTool.ts Line 125 Last Updated: 13 June, 2024