diff options
author | bobzel <zzzman@gmail.com> | 2020-08-27 20:36:19 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-27 20:36:19 -0400 |
commit | a4b379c77ba579ad3d2c04ea08bc019347f2f56a (patch) | |
tree | 214ac3cb252ad065930252df53b77570b3f7d651 /src | |
parent | 2e0e34df0db385acfcd4079fae6e01fd4a2234fa (diff) |
fixed open on right from Doc Decorations to remove context field. fixed presBox to find best target instead of assuming targetDoc is always displayed
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 6 | ||||
-rw-r--r-- | src/client/views/MainView.tsx | 1 | ||||
-rw-r--r-- | src/client/views/nodes/formattedText/RichTextMenu.tsx | 2 | ||||
-rw-r--r-- | src/client/views/presentationview/PresElementBox.tsx | 5 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 3d6301ae9..fad6b1a0b 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -185,8 +185,10 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> if (e.button === 0) { const selectedDocs = SelectionManager.SelectedDocuments(); if (selectedDocs.length) { - //CollectionDockingView.Instance?.OpenFullScreen(selectedDocs[0], selectedDocs[0].props.LibraryPath); - CollectionDockingView.AddRightSplit(Doc.MakeAlias(selectedDocs[0].props.Document), selectedDocs[0].props.LibraryPath); + const alias = Doc.MakeAlias(selectedDocs[0].props.Document); + alias.context = undefined; + //CollectionDockingView.Instance?.OpenFullScreen(selectedDocs[0]); + CollectionDockingView.AddRightSplit(alias); } } SelectionManager.DeselectAll(); diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 0bdfa0cdd..c995223c3 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -575,7 +575,6 @@ export class MainView extends React.Component { @computed get mainContent() { const height = `calc(100% - ${this.topOffset}px)`; - console.log("Height = " + height); const pinned = FormatShapePane.Instance?.Pinned; const innerContent = this.mainInnerContent; return !this.userDoc ? (null) : ( diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx index 3812e878f..399f72608 100644 --- a/src/client/views/nodes/formattedText/RichTextMenu.tsx +++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx @@ -2,7 +2,7 @@ import React = require("react"); import { IconProp } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Tooltip } from "@material-ui/core"; -import { action, IReactionDisposer, observable, reaction } from "mobx"; +import { action, IReactionDisposer, observable, reaction, runInAction } from "mobx"; import { observer } from "mobx-react"; import { lift, wrapIn } from "prosemirror-commands"; import { Mark, MarkType, Node as ProsNode, NodeType, ResolvedPos } from "prosemirror-model"; diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index e1b97887a..7ff21975b 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -208,14 +208,13 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc } @undoBatch - @action - removeItem = (e: React.MouseEvent) => { + removeItem = action((e: React.MouseEvent) => { this.props.removeDocument?.(this.rootDoc); if (PresBox.Instance._selectedArray.includes(this.rootDoc)) { PresBox.Instance._selectedArray.splice(PresBox.Instance._selectedArray.indexOf(this.rootDoc), 1); } e.stopPropagation(); - } + }) render() { const className = "presElementBox-item" + (PresBox.Instance._selectedArray.includes(this.rootDoc) ? " presElementBox-active" : ""); |