aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/LightboxView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-03-29 17:44:26 -0400
committerbobzel <zzzman@gmail.com>2024-03-29 17:44:26 -0400
commitd38f8a80cff0e7e6140fd3ff815210077718746d (patch)
tree43e6f8bcab09fa73e8ee17192466be9afbcdcb2a /src/client/views/LightboxView.tsx
parent7ae6431a59604085c4117622c4f5e466daf541a3 (diff)
fixed capture offset to target in link following. fixed links to appear in lightbox and to not disappear when dragged.
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r--src/client/views/LightboxView.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index be7c22c9f..79700d8ab 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -35,7 +35,12 @@ 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 Contains(view?:DocumentView) { return view && LightboxView.Instance?._docView&& (view.containerViewPath?.() ?? []).concat(view).includes(LightboxView.Instance?._docView); } // prettier-ignore
+ /**
+ * Determines whether a DocumentView is descendant of the lightbox view
+ * @param view
+ * @returns true if a DocumentView is descendant of the lightbox view
+ */
+ 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: {