From 15c4e870c3dab96a716fe38ee2bad2e69df7fdc0 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Thu, 8 Aug 2024 13:38:12 -0400 Subject: [PATCH 1/2] fix(EditableChipList): put edit button at end and name overflow --- src/components/EditableChipList.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/EditableChipList.vue b/src/components/EditableChipList.vue index 3411863a..504b4436 100644 --- a/src/components/EditableChipList.vue +++ b/src/components/EditableChipList.vue @@ -47,8 +47,7 @@ const itemsToRender = computed(() => @click="toggle" > - {{ title }} - + {{ title }} @@ -70,4 +69,8 @@ const itemsToRender = computed(() => background-color: rgb(var(--v-theme-selection-bg-color)); border-color: rgb(var(--v-theme-selection-border-color)); } + +.v-chip:deep() .v-chip__content { + width: 100%; +} From 9cbc411b4b923cdbe043e332e6ec0d1c58175fc7 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Fri, 9 Aug 2024 17:43:50 -0400 Subject: [PATCH 2/2] fix(layers): load whole image before resampling --- src/store/datasets-layers.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/store/datasets-layers.ts b/src/store/datasets-layers.ts index 75b4b33a..d4954637 100644 --- a/src/store/datasets-layers.ts +++ b/src/store/datasets-layers.ts @@ -1,4 +1,5 @@ -import { ref } from 'vue'; +import { computed, ref, unref } from 'vue'; +import { until } from '@vueuse/core'; import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData'; import vtkBoundingBox from '@kitware/vtk.js/Common/DataModel/BoundingBox'; import { defineStore } from 'pinia'; @@ -7,6 +8,7 @@ import { Maybe } from '@/src/types'; import { ensureSameSpace } from '@/src/io/resample/resample'; import { useErrorMessage } from '../composables/useErrorMessage'; import { Manifest, StateFile } from '../io/state-file/schema'; +import useChunkStore from './chunks'; // differ from Image/Volume IDs with a branded type export type LayerID = string & { __type: 'LayerID' }; @@ -66,6 +68,12 @@ export const useLayersStore = defineStore('layer', () => { parent: DataSelection, source: DataSelection ) { + // ensureSameSpace need final image array to resample, so wait for all chunks + const doneLoading = computed( + () => !unref(useChunkStore().chunkImageById[source].isLoading) + ); + await until(doneLoading).toBe(true); + return useErrorMessage('Failed to build layer', async () => { try { await this._addLayer(parent, source);