diff options
author | bobzel <zzzman@gmail.com> | 2021-03-02 19:52:59 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-03-02 19:52:59 -0500 |
commit | 1b481cd441cc8bb200906b246b43e4bc5dc53b4e (patch) | |
tree | 10fe0b4cbbfa7a0c25cf84090aef0f12bbf0be4c /src/client/views/LightboxView.tsx | |
parent | faf9dc5ca6a7380f3b040dc2ddbe07c29689e014 (diff) |
added a fitwidth toggle for lightbox. fixed _showCaption/setting _fields to undefined. updated documentView to use not having fitWidth set as a trigger for whether to treat a doc without nativeWidth/Height as if its width/height is that.
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r-- | src/client/views/LightboxView.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index 15b98467c..3fc72c45c 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -247,6 +247,7 @@ export class LightboxView extends React.Component<LightboxViewProps> { ContainingCollectionDoc={undefined} renderDepth={0} /> </div> + {this.navBtn(0, undefined, this.props.PanelHeight / 2 - 12.50, "chevron-left", () => LightboxView.LightboxDoc && LightboxView._history?.length ? "" : "none", e => { e.stopPropagation(); @@ -258,6 +259,10 @@ export class LightboxView extends React.Component<LightboxViewProps> { LightboxView.Next(); })} <LightboxTourBtn navBtn={this.navBtn} future={this.future} stepInto={this.stepInto} tourMap={this.tourMap} /> + <div className="lightboxView-navBtn" title={"toggle fit width"} style={{ position: "absolute", right: 10, top: 10, color: "white" }} + onClick={e => { e.stopPropagation(); LightboxView.LightboxDoc!._fitWidth = !LightboxView.LightboxDoc!._fitWidth }}> + <FontAwesomeIcon icon={"arrows-alt-h"} size="2x" /> + </div> </div>; } } |