diff options
| author | bobzel <zzzman@gmail.com> | 2023-11-19 13:49:19 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-11-19 13:49:19 -0500 |
| commit | 3ebb44420ebe8621be355478cbd45656a5224303 (patch) | |
| tree | ff95f2c59060122adfe79c40d5296aabde76bd5c /src/client/util/SelectionManager.ts | |
| parent | 95ca3c2419a760970d56a4af656b28c4f3b6c073 (diff) | |
fixed animations of text html overlays and turned off overflow hidden so that rotation doesn't get clipped. cleaned up docView querying for Selection
Diffstat (limited to 'src/client/util/SelectionManager.ts')
| -rw-r--r-- | src/client/util/SelectionManager.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index e864458d8..f7e6fa2dc 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -64,11 +64,8 @@ export namespace SelectionManager { manager.SelectSchemaViewDoc(document); } - // computed functions, such as used in IsSelected generate errors if they're called outside of a - // reaction context. Specifying the context with 'outsideReaction' allows an efficiency feature - // to avoid unnecessary mobx invalidations when running inside a reaction. - export function IsSelected(dv?: DocumentView | Doc): boolean { - return (dv instanceof Doc ? Array.from(dv[DocViews]) : dv ? [dv] : []).some(dv => dv?.SELECTED); + export function IsSelected(doc?: Doc): boolean { + return Array.from(doc?.[DocViews] ?? []).some(dv => dv?.SELECTED); } export function DeselectAll(except?: Doc): void { |
