From abebf2672aa945b4e2155860697e3bb6efb10a61 Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle Date: Fri, 8 Aug 2025 10:45:56 +0100 Subject: [PATCH] Disable item stickiness --- packages/frontend-2/lib/viewer/composables/tree.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/frontend-2/lib/viewer/composables/tree.ts b/packages/frontend-2/lib/viewer/composables/tree.ts index 6d496e92c..ef1cae276 100644 --- a/packages/frontend-2/lib/viewer/composables/tree.ts +++ b/packages/frontend-2/lib/viewer/composables/tree.ts @@ -359,6 +359,7 @@ export function useVirtualTreeList() { const activeStickyStackRef = useThrottle(rawStickyStackRef, 16) // ~60fps for smooth updates const lastStartIndex = ref(-1) const lastStickyStack = ref([]) + const areTreeItemStickiesEnabled = ref(false) const findActiveStickyStack = ( startIndex: number, @@ -410,7 +411,11 @@ export function useVirtualTreeList() { ? unifiedVirtualItems[currentActiveModelIndex]?.modelId : null - if (currentModelId && currentActiveModelIndex !== undefined) { + if ( + areTreeItemStickiesEnabled.value && + currentModelId && + currentActiveModelIndex !== undefined + ) { // Only look at tree items between this model and the visible area const modelStartIndex = currentActiveModelIndex const activeTreeStickies: number[] = []