From 19e1e75ce679a887bca78846519dab7334e3b3bc Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Fri, 10 Jan 2025 21:17:16 +0300 Subject: [PATCH] Add comments for triggerCancel --- packages/dui3/lib/bindings/definitions/ISendBinding.ts | 3 +++ packages/dui3/store/hostApp.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/packages/dui3/lib/bindings/definitions/ISendBinding.ts b/packages/dui3/lib/bindings/definitions/ISendBinding.ts index 4d279c2e04..24af961adf 100644 --- a/packages/dui3/lib/bindings/definitions/ISendBinding.ts +++ b/packages/dui3/lib/bindings/definitions/ISendBinding.ts @@ -31,5 +31,8 @@ export interface ISendBindingEvents idMap: Record newSelectedObjectIds: string[] }) => void + /** + * Use whenever want to cancel model card progress, it is used on Archicad so far since send operation blocks the UI thread. + */ triggerCancel: (modelCardId: string) => void } diff --git a/packages/dui3/store/hostApp.ts b/packages/dui3/store/hostApp.ts index 4bd38daabb..8e98295129 100644 --- a/packages/dui3/store/hostApp.ts +++ b/packages/dui3/store/hostApp.ts @@ -183,6 +183,7 @@ export const useHostAppStore = defineStore('hostAppStore', () => { () => sendFilters.value?.find((f) => f.name === 'Selection') as ISendFilter ) + // Used on Archicad so far since send operation blocks the UI thread. app.$sendBinding?.on('triggerCancel', (modelCardId: string) => { const model = documentModelStore.value.models.find( (m) => m.modelCardId === modelCardId