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/client/views/presentationview/PresElementBox.tsx | |
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/client/views/presentationview/PresElementBox.tsx')
-rw-r--r-- | src/client/views/presentationview/PresElementBox.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
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" : ""); |