aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/LightboxView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-14 18:29:00 -0500
committerbobzel <zzzman@gmail.com>2021-02-14 18:29:00 -0500
commit6fcef3d8dfdbe373724d2f11c9df8f350bd8950c (patch)
treee3ac92a411512e56626a23e21beb3f8a392de367 /src/client/views/LightboxView.tsx
parent26bbd3a593e6f51ec3665e124e66ed8030ab98df (diff)
fixes to focus()'s api and extension to allow focusing on a Tab's contents.
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r--src/client/views/LightboxView.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index eb3d62779..a2088a8fc 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -89,7 +89,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
const target = LightboxView.LightboxDocTarget = LightboxView.LightboxFuture?.pop();
const docView = target && DocumentManager.Instance.getLightboxDocumentView(target);
if (docView && target) {
- docView.focus(target, true, 0.9);
+ docView.focus(target, { willZoom: true, scale: 0.9 });
if (LightboxView.LightboxHistory?.lastElement() !== target) LightboxView.LightboxHistory?.push(target);
} else {
if (!target && LightboxView.path.length) {
@@ -120,7 +120,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
const docView = target && DocumentManager.Instance.getLightboxDocumentView(target);
if (docView && target) {
if (LightboxView.LightboxFuture?.lastElement() !== previous) LightboxView.LightboxFuture?.push(previous!);
- docView.focus(target, true, 0.9);
+ docView.focus(target, { willZoom: true, scale: 0.9 });
} else {
LightboxView.SetLightboxDoc(target);
}
@@ -138,6 +138,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
if (coll) {
const fieldKey = Doc.LayoutFieldKey(coll);
LightboxView.SetLightboxDoc(coll, [...DocListCast(coll[fieldKey]), ...DocListCast(coll[fieldKey + "-annotations"])]);
+ TabDocView.PinDoc(coll, { hidePresBox: true });
}
setTimeout(() => this.stepForward());
}