fix(fe): consolidate createExtensions

This commit is contained in:
andrewwallacespeckle
2025-09-24 18:13:04 +02:00
parent 4a1b203f24
commit 8cc18f8892
2 changed files with 2 additions and 3 deletions
@@ -101,6 +101,7 @@ import { useMeasurementsSetup } from '~/lib/viewer/composables/setup/measurement
import { useFiltersSetup } from '~/lib/viewer/composables/setup/filters'
import { useViewerPanelsSetup } from '~/lib/viewer/composables/setup/panels'
import { ViewerRenderPageType } from '~/lib/viewer/helpers/state'
import { HighlightExtension } from '~/lib/viewer/composables/setup/highlighting'
export type LoadedModel = NonNullable<
Get<ViewerLoadedResourcesQuery, 'project.models.items[0]'>
@@ -448,6 +449,7 @@ function createViewerDataBuilder(params: { viewerDebug: boolean }) {
...DefaultViewerParams,
verbose: !!(import.meta.client && params.viewerDebug)
})
viewer.createExtension(HighlightExtension)
viewer.createExtension(PassReader)
const initPromise = viewer.init()
@@ -55,9 +55,6 @@ export const useHighlightingPostSetup = () => {
if (pageType.value === ViewerRenderPageType.Presentation) return
// Create the highlighting extension once during setup
instance.createExtension(HighlightExtension)
// Get the highlighting extension instance
const getHighlightExtensionInstance = () => instance.getExtension(HighlightExtension)