aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/LightboxView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-09-20 11:34:38 -0400
committerbobzel <zzzman@gmail.com>2022-09-20 11:34:38 -0400
commit6ca8c250de45f1edabdf01d054d73b12d9fb791b (patch)
tree2350d26f6a82bfd8b8432fa985dd27e197788ecb /src/client/views/LightboxView.tsx
parent87096243391cf172c26190897c79321b3d42817c (diff)
fixed pdf boxes to be active in lightboxview by fixing lightboxview docview to be observable so that IsLightboxDoc's will invalidate. made webBox's content 'relative' so that linksButton is in correct place. changed text highlight color to orange for webboxes
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r--src/client/views/LightboxView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index cb5094f4b..e3e8403df 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -39,7 +39,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
private static _savedState: Opt<{ panX: Opt<number>; panY: Opt<number>; scale: Opt<number>; scrollTop: Opt<number> }>;
private static _history: Opt<{ doc: Doc; target?: Doc }[]> = [];
@observable private static _future: Opt<Doc[]> = [];
- private static _docView: Opt<DocumentView>;
+ @observable private static _docView: Opt<DocumentView>;
private static openInTabFunc: any;
static path: { doc: Opt<Doc>; target: Opt<Doc>; history: Opt<{ doc: Doc; target?: Doc }[]>; future: Opt<Doc[]>; saved: Opt<{ panX: Opt<number>; panY: Opt<number>; scale: Opt<number>; scrollTop: Opt<number> }> }[] = [];
@action public static SetLightboxDoc(doc: Opt<Doc>, target?: Doc, future?: Doc[], layoutTemplate?: Doc) {
@@ -98,7 +98,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
return true;
}
public static IsLightboxDocView(path: DocumentView[]) {
- return path.includes(this._docView!);
+ return (path ?? []).includes(this._docView!);
}
@computed get leftBorder() {
return Math.min(this.props.PanelWidth / 4, this.props.maxBorder[0]);