Skip to content

Commit

Permalink
fix for Dialog reactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonrt committed Nov 28, 2021
1 parent c3ad350 commit 1219eb9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions _dist/component/core/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _dist/component/core/index.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/component/core/dialog/DialogShell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@
// Update the main foundry options when data changes. Perform explicit checks against existing data in `foundryApp`.
const newDraggable = data.draggable ?? true;
if (foundryApp.draggable !== newDraggable) { foundryApp.draggable = newDraggable; }
if (foundryApp.reactive.draggable !== newDraggable) { foundryApp.reactive.draggable = newDraggable; }
const newPopOut = data.popOut ?? true;
if (foundryApp.popOut !== newPopOut) { foundryApp.popOut = newPopOut; }
if (foundryApp.reactive.popOut !== newPopOut) { foundryApp.reactive.popOut = newPopOut; }
const newResizable = data.resizable ?? false;
if (foundryApp.resizable !== newResizable) { foundryApp.resizable = newResizable; }
if (foundryApp.reactive.resizable !== newResizable) { foundryApp.reactive.resizable = newResizable; }
// Note foundryApp.title from Application localizes `options.title`, so compare with `foundryApp.options.title`.
const newTitle = data.title ?? 'Dialog';
if (newTitle !== foundryApp?.options?.title) { foundryApp.title = newTitle; }
if (newTitle !== foundryApp?.options?.title) { foundryApp.reactive.title = newTitle; }
if (foundryApp.zIndex !== zIndex) { foundryApp.zIndex = zIndex; }
if (foundryApp.reactive.zIndex !== zIndex) { foundryApp.reactive.zIndex = zIndex; }
}
// ApplicationShell transition options ----------------------------------------------------------------------------
Expand Down Expand Up @@ -175,4 +175,4 @@
<ApplicationShell bind:elementRoot {...appProps}>
<DialogContent {data} />
</ApplicationShell>
{/if}
{/if}

0 comments on commit 1219eb9

Please sign in to comment.