From a4b379c77ba579ad3d2c04ea08bc019347f2f56a Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 27 Aug 2020 20:36:19 -0400 Subject: fixed open on right from Doc Decorations to remove context field. fixed presBox to find best target instead of assuming targetDoc is always displayed --- src/client/views/presentationview/PresElementBox.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/client/views/presentationview') 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 { + 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" : ""); -- cgit v1.2.3-70-g09d2