aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-08 23:08:35 -0400
committerbobzel <zzzman@gmail.com>2024-10-08 23:08:35 -0400
commitca67414c9da685070c1143ce3b771edda2fdc191 (patch)
tree3dd72b2d9e62f6af817cd7775585d0bb93cc40c0 /src/client/views/DocumentDecorations.tsx
parent972839216c14baa5c9eaf80e1fb2fb2694bbb72c (diff)
parentb9fda86731a01ebfc3f21ebdd4eaf43a1c9eccc6 (diff)
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 1c0d51e17..62f2de776 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -63,7 +63,6 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
@observable private _accumulatedTitle = '';
@observable private _titleControlString: string = '$title';
@observable private _editingTitle = false;
- @observable private _hidden = false;
@observable private _isRotating: boolean = false;
@observable private _isRounding: boolean = false;
@observable private _showLayoutAcl: boolean = false;
@@ -202,16 +201,14 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
dragData.removeDocument = dragDocView._props.removeDocument;
dragData.isDocDecorationMove = true;
dragData.canEmbed = dragTitle;
- this._hidden = true;
+ SnappingManager.SetHideDecorations(true);
DragManager.StartDocumentDrag(
DocumentView.Selected().map(dv => dv.ContentDiv!),
dragData,
e.x,
e.y,
{
- dragComplete: action(() => {
- this._hidden = false;
- }),
+ dragComplete: () => SnappingManager.SetHideDecorations(false),
hideSource: true,
}
);
@@ -653,7 +650,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
this._forceRender;
const { b, r, x, y } = this.Bounds;
const seldocview = DocumentView.Selected().lastElement();
- if (SnappingManager.IsDragging || r - x < 1 || x === Number.MAX_VALUE || !seldocview || this._hidden || isNaN(r) || isNaN(b) || isNaN(x) || isNaN(y)) {
+ if (SnappingManager.IsDragging || r - x < 1 || x === Number.MAX_VALUE || !seldocview || SnappingManager.HideDecorations || isNaN(r) || isNaN(b) || isNaN(x) || isNaN(y)) {
setTimeout(
action(() => {
this._editingTitle = false;