aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-13 17:35:17 -0400
committerbobzel <zzzman@gmail.com>2021-09-13 17:35:17 -0400
commitd15841974305bf01251f60fa73a8464c7cb914fe (patch)
tree1754b55f9e4b6d7b8cb5f7c4c61bbd203bbe7926 /src/client/views/DocumentDecorations.tsx
parentbab473b8c5916404c49f46a639bc660aa7ee2130 (diff)
fixed dragging document that is unselected by clicking on nested object in sidbear to not double-drag two items effectively deleting the sidebar document. fixed undoing of document decorations topbar buttons.
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 8bc167079..6ca8dbec6 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -136,7 +136,6 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
return true;
}
- @undoBatch
onCloseClick = () => {
const selected = SelectionManager.Views().slice();
SelectionManager.DeselectAll();
@@ -153,8 +152,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
return true;
}, emptyFunction, this.onMaximizeClick, false, false);
}
- @undoBatch
- @action
+
onMaximizeClick = (e: any): void => {
const selectedDocs = SelectionManager.Views();
if (selectedDocs.length) {
@@ -176,7 +174,6 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
SelectionManager.DeselectAll();
}
- @undoBatch
onIconifyClick = (): void => {
SelectionManager.Views().forEach(dv => dv?.iconify());
SelectionManager.DeselectAll();
@@ -433,7 +430,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
const topBtn = (key: string, icon: string, pointerDown: undefined | ((e: React.PointerEvent) => void), click: undefined | ((e: any) => void), title: string) => (
<Tooltip key={key} title={<div className="dash-tooltip">{title}</div>} placement="top">
<div className={`documentDecorations-${key}Button`} onContextMenu={e => e.preventDefault()}
- onPointerDown={pointerDown ?? (e => setupMoveUpEvents(this, e, returnFalse, click!, emptyFunction))} >
+ onPointerDown={pointerDown ?? (e => setupMoveUpEvents(this, e, returnFalse, emptyFunction, undoBatch(e => click!(e))))} >
<FontAwesomeIcon icon={icon as any} />
</div>
</Tooltip>);