diff options
| author | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-08-06 14:48:49 -0400 |
|---|---|---|
| committer | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-08-06 14:48:49 -0400 |
| commit | a882dc6899a6b11e2e972f3e2a2ae991caeea094 (patch) | |
| tree | 6fe43316f629e1b667e603a3001a69ef6b2a3d6e /src/client/views/DocumentDecorations.tsx | |
| parent | d0ac8d270c78e31212ab55fd3ad3dac516228703 (diff) | |
locking into hotkey buttons
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index b5d819b97..f3b4013f7 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -703,6 +703,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora const maxDist = Math.min((this.Bounds.r - this.Bounds.x) / 2, (this.Bounds.b - this.Bounds.y) / 2); const radiusHandle = (borderRadius / docMax) * maxDist; const radiusHandleLocation = Math.min(radiusHandle, maxDist); + const sharingMenu = Doc.IsSharingEnabled && docShareMode ? ( @@ -765,6 +766,12 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora const centery = hideTitle ? 0 : this._titleHeight; const transformOrigin = `${50}% calc(50% + ${centery / 2}px)`; const freeformDoc = DocumentView.Selected().some(v => CollectionFreeFormDocumentView.from(v)); + + + const keyWordTrans = doc[DocData].showLabels ? NumCast(doc[DocData].keywordHeight) : 0 + const tagTrans = doc[DocData].showIconTags ? NumCast(doc[DocData].tagHeight) : 0 + + return ( <div className="documentDecorations" style={{ display: this._showNothing && !freeformDoc ? 'none' : undefined }}> <div @@ -832,7 +839,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora <div className="link-button-container" style={{ - top: `${(doc[DocData].showLabels || doc[DocData].showIconTags) ? 4 + (doc._keywordHeight as number) : 4}px`, + top: `${ keyWordTrans + tagTrans + 4}px`, transform: `translate(${-this._resizeBorderWidth / 2 + 10}px, ${this._resizeBorderWidth + bounds.b - bounds.y + this._titleHeight}px) `, }}> <DocumentButtonBar views={() => DocumentView.Selected()} /> |
