From e3c8534e129a3ce70a2673c92cadccec26f6cdc7 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 11 Sep 2020 18:02:07 -0400 Subject: moved settings menu to the the documentButtonsBar --- src/client/views/DocumentDecorations.tsx | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'src/client/views/DocumentDecorations.tsx') diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index abad53b6d..41be364fd 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -127,22 +127,6 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> setTimeout(() => this._keyinput.current!.focus(), 0); } - @action onSettingsDown = (e: React.PointerEvent): void => { - setupMoveUpEvents(this, e, () => false, (e) => { }, this.onSettingsClick); - } - @action onSettingsClick = (e: PointerEvent): void => { - if (e.button === 0 && !e.altKey && !e.ctrlKey) { - let child = SelectionManager.SelectedDocuments()[0].ContentDiv!.children[0]; - while (child.children.length) { - const next = Array.from(child.children).find(c => typeof (c.className) === "string"); - if (next?.className.includes("documentView-node")) break; - if (next) child = next; - else break; - } - simulateMouseClick(child, e.clientX, e.clientY + 30, e.screenX, e.screenY + 30); - } - } - onBackgroundDown = (e: React.PointerEvent): void => { setupMoveUpEvents(this, e, this.onBackgroundMove, (e) => { }, (e) => { }); } @@ -607,14 +591,9 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> const titleArea = this._edtingTitle ? this.titleBlur(true)} onChange={action(e => this._accumulatedTitle = e.target.value)} onKeyPress={this.titleEntered} /> : - <> - {minimal ? (null) : Show context menu} placement="top">
- -
} -
- {`${this.selectionTitle}`} -
- ; +
+ {`${this.selectionTitle}`} +
; bounds.x = Math.max(0, bounds.x - this._resizeBorderWidth / 2) + this._resizeBorderWidth / 2; bounds.y = Math.max(0, bounds.y - this._resizeBorderWidth / 2 - this._titleHeight) + this._resizeBorderWidth / 2 + this._titleHeight; -- cgit v1.2.3-70-g09d2