diff options
author | geireann <geireann.lindfield@gmail.com> | 2024-09-29 14:22:03 -0400 |
---|---|---|
committer | geireann <geireann.lindfield@gmail.com> | 2024-09-29 14:22:03 -0400 |
commit | ba01c7376ed4a2b817a26a430faf4041524aef35 (patch) | |
tree | 5265f639070a29b0413a57cefffb3517366ec7bf /src | |
parent | ecd8ed4e41940089ec31d9601afaa0d5932c6401 (diff) |
updated npm packages
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index fc4b1f0af..34b05da56 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -60,6 +60,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora private _interactionLock?: boolean; @observable _showNothing = true; + @observable private _forceRender = 0 @observable private _accumulatedTitle = ''; @observable private _titleControlString: string = '$title'; @observable private _editingTitle = false; @@ -621,8 +622,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora }); }; - @computed - get selectionTitle(): string { + @computed get selectionTitle(): string { if (DocumentView.Selected().length === 1) { const selected = DocumentView.Selected()[0]; if (this._titleControlString.startsWith('$')) { @@ -643,10 +643,9 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora } return this._rotCenter; } - - @observable forceRender = 0; +; render() { - this.forceRender; + 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)) { @@ -660,10 +659,9 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora } if (seldocview && !seldocview?.ContentDiv?.getBoundingClientRect().width) { - setTimeout(action(() => this.forceRender++)); + setTimeout(action(() => this._forceRender++)); // if the selected Doc has no width, then assume it's stil being layed out and try to render again later. return null; } - console.log('Renderedr'); // sharing const acl = GetEffectiveAcl(!this._showLayoutAcl ? Doc.GetProto(seldocview.Document) : seldocview.Document); |