diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-22 13:34:34 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-22 13:34:34 -0500 |
| commit | 533051fbf278fb7109d898c9299f8e724902c138 (patch) | |
| tree | 7bffe11b82e2c747c1b3f094d3edc86652308fc7 /src/client/views/LightboxView.tsx | |
| parent | c12659816adf68bb0bb931e97096afa82bfbe769 (diff) | |
cleaned up viewPath methods and LightboxView's containment api
Diffstat (limited to 'src/client/views/LightboxView.tsx')
| -rw-r--r-- | src/client/views/LightboxView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index aec9e32fc..3b86d24a6 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -34,7 +34,7 @@ const savedKeys = ['freeform_panX', 'freeform_panY', 'freeform_scale', 'layout_s type LightboxSavedState = { [key: string]: FieldResult; }; // prettier-ignore @observer export class LightboxView extends ObservableReactComponent<LightboxViewProps> { - public static IsLightboxDocView(path: DocumentView[]) { return (path ?? []).includes(LightboxView.Instance?._docView!); } // prettier-ignore + public static Contains(view?:DocumentView) { return view && LightboxView.Instance?._docView&& (view.containerViewPath?.() ?? []).concat(view).includes(LightboxView.Instance?._docView); } // prettier-ignore public static get LightboxDoc() { return LightboxView.Instance?._doc; } // prettier-ignore static Instance: LightboxView; private _path: { |
