diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-26 10:53:43 -0500 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-01-26 10:53:43 -0500 |
commit | a516d28ce05f2506a45ff009498a2bc404c0d56b (patch) | |
tree | bfe34ab987d0edaeb60e55300f5001d0bfdcdaca /src/client/views/linking/LinkMenuItem.tsx | |
parent | 4fe5eebb3a02ac7cb86a54aa4350ae40cbfdd343 (diff) | |
parent | 95b8a5a2b470d3118b6eeac484a45b23df2830b4 (diff) |
Merge branch 'master' of github.com:brown-dash/Dash-Web into master
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r-- | src/client/views/linking/LinkMenuItem.tsx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index 91b63c1a6..a2a2255e6 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -15,10 +15,11 @@ import { LinkManager } from '../../util/LinkManager'; import { SelectionManager } from '../../util/SelectionManager'; import { SettingsManager } from '../../util/SettingsManager'; import { undoBatch } from '../../util/UndoManager'; -import { DocumentView } from '../nodes/DocumentView'; +import { DocumentView, OpenWhere } from '../nodes/DocumentView'; import { LinkDocPreview } from '../nodes/LinkDocPreview'; import './LinkMenuItem.scss'; import React = require('react'); +import { MainView } from '../MainView'; interface LinkMenuItemProps { groupType: string; @@ -100,9 +101,15 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { }, emptyFunction, action(() => { - SelectionManager.SelectView(this.props.docView, false); - if ((SettingsManager.propertiesWidth ?? 0) < 100) { - SettingsManager.propertiesWidth = 250; + const trail = DocCast(this.props.docView.rootDoc.presTrail); + if (trail) { + Doc.ActivePresentation = trail; + MainView.addDocTabFunc(trail, OpenWhere.replaceRight); + } else { + SelectionManager.SelectView(this.props.docView, false); + if ((SettingsManager.propertiesWidth ?? 0) < 100) { + SettingsManager.propertiesWidth = 250; + } } }) ); |