diff options
author | bobzel <zzzman@gmail.com> | 2021-02-12 14:53:37 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-12 14:53:37 -0500 |
commit | ffeada4e258e1786536b579b17798932bf4b8a8a (patch) | |
tree | 988051b380aafe5d6f25792d5106d9cd247e613b /src/client/views/LightboxView.tsx | |
parent | d30f5b4855a0ad500cc5784260128ecc269f6450 (diff) |
fixed bejhavior of Annotations when clicked to use FollowLink so that behavior is consistent. previously in a lightbox links within a pdf woud unnecessarily open the the PDF in its context
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r-- | src/client/views/LightboxView.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index 529eecacf..4c6592e58 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -11,6 +11,8 @@ import { DocumentView } from './nodes/DocumentView'; import { DefaultStyleProvider } from './StyleProvider'; import { DocUtils } from '../documents/Documents'; import { DocumentManager } from '../util/DocumentManager'; +import { SelectionManager } from '../util/SelectionManager'; +import { TabDocView } from './collections/TabDocView'; interface LightboxViewProps { PanelWidth: number; @@ -51,6 +53,10 @@ export class LightboxView extends React.Component<LightboxViewProps> { </div> </div>; } + addDocTab = (doc: Doc, location: string) => { + SelectionManager.DeselectAll(); + return LightboxView.SetLightboxDoc(doc); + } render() { if (LightboxView.LightboxHistory.lastElement() !== LightboxView.LightboxDoc) LightboxView.LightboxHistory.push(LightboxView.LightboxDoc); @@ -73,8 +79,8 @@ export class LightboxView extends React.Component<LightboxViewProps> { Document={LightboxView.LightboxDoc} DataDoc={undefined} addDocument={undefined} - addDocTab={returnFalse} - pinToPres={emptyFunction} + addDocTab={this.addDocTab} + pinToPres={TabDocView.PinDoc} rootSelected={returnTrue} docViewPath={returnEmptyDoclist} removeDocument={undefined} |