Skip to content

Commit

Permalink
Add comments for triggerCancel
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhankoral committed Jan 10, 2025
1 parent 1ff0887 commit 19e1e75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/dui3/lib/bindings/definitions/ISendBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ export interface ISendBindingEvents
idMap: Record<string, string>
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
}
1 change: 1 addition & 0 deletions packages/dui3/store/hostApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19e1e75

Please sign in to comment.