diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-08 23:07:52 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-08 23:07:52 -0400 |
| commit | b9fda86731a01ebfc3f21ebdd4eaf43a1c9eccc6 (patch) | |
| tree | 25ccf7f509111dc96b019b9c495e4a956dcbcf41 /src/client/views/DocumentDecorations.tsx | |
| parent | 09b722789afa5d7c5edfc701978f17e4745113bc (diff) | |
yet another fix to cardView to make animations smooth - need to specifically target hidingDecorations without going using IsResizing as a hack
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 9 |
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; |
