diff --git a/packages/frontend-2/components/viewer/AnchoredPoints.vue b/packages/frontend-2/components/viewer/AnchoredPoints.vue
index e15f476f6..f968e33f9 100644
--- a/packages/frontend-2/components/viewer/AnchoredPoints.vue
+++ b/packages/frontend-2/components/viewer/AnchoredPoints.vue
@@ -120,11 +120,11 @@
-
+
+
@@ -162,7 +162,8 @@ const { sessionId } = viewerState
const { users } = useViewerUserActivityTracking({ parentEl })
const { isOpenThread, open, closeAllThreads } = useThreadUtilities()
const {
- filters: { hasAnyFiltersApplied }
+ filters: { hasAnyFiltersApplied },
+ hasAnyIsolationsApplied
} = useFilterUtilities({ state: viewerState })
const canPostComment = useCheckViewerCommentingAccess()
const breakpoints = useBreakpoints(TailwindBreakpoints)
diff --git a/packages/frontend-2/components/viewer/GlobalIsolationReset.vue b/packages/frontend-2/components/viewer/GlobalIsolationReset.vue
new file mode 100644
index 000000000..78ec93e95
--- /dev/null
+++ b/packages/frontend-2/components/viewer/GlobalIsolationReset.vue
@@ -0,0 +1,22 @@
+
+
+ Reset isolations
+
+
+
diff --git a/packages/frontend-2/lib/viewer/composables/filtering/filtering.ts b/packages/frontend-2/lib/viewer/composables/filtering/filtering.ts
index ed3160b07..90ddbacc6 100644
--- a/packages/frontend-2/lib/viewer/composables/filtering/filtering.ts
+++ b/packages/frontend-2/lib/viewer/composables/filtering/filtering.ts
@@ -37,7 +37,10 @@ import {
findFilterByKvp
} from '~/lib/viewer/helpers/filters/utils'
import { useFilterColoringHelpers } from '~/lib/viewer/composables/filtering/coloringHelpers'
-import { useHighlightedObjectsUtilities } from '~/lib/viewer/composables/ui'
+import {
+ useHighlightedObjectsUtilities,
+ useSelectionUtilities
+} from '~/lib/viewer/composables/ui'
export function useFilterUtilities(
options?: Partial<{ state: InjectableViewerState }>
@@ -50,6 +53,7 @@ export function useFilterUtilities(
const dataStore = useFilteringDataStore()
const { removeColorFilter } = useFilterColoringHelpers({ state })
const { clearHighlightedObjects } = useHighlightedObjectsUtilities()
+ const { clearSelection } = useSelectionUtilities()
const isolateObjects = (
objectIds: string[],
@@ -74,6 +78,15 @@ export function useFilterUtilities(
)
}
+ const resetIsolations = () => {
+ clearHighlightedObjects()
+ filters.isolatedObjectIds.value = []
+ }
+
+ const hasAnyIsolationsApplied = computed(() => {
+ return filters.isolatedObjectIds.value.length > 0
+ })
+
const hideObjects = (
objectIds: string[],
options?: Partial<{
@@ -81,6 +94,7 @@ export function useFilterUtilities(
}>
) => {
clearHighlightedObjects()
+ clearSelection()
filters.hiddenObjectIds.value = uniq([
...(options?.replace ? [] : filters.hiddenObjectIds.value),
@@ -878,8 +892,10 @@ export function useFilterUtilities(
return {
isolateObjects,
unIsolateObjects,
+ resetIsolations,
hideObjects,
showObjects,
+ hasAnyIsolationsApplied,
filters,
addActiveFilter,
updateFilterProperty,