diff options
| author | Jude <julie_wang1@brown.edu> | 2019-03-09 17:14:42 -0500 |
|---|---|---|
| committer | Jude <julie_wang1@brown.edu> | 2019-03-09 17:14:42 -0500 |
| commit | c6a3faf616e68ede2d67580344e4337c3f0cfdc5 (patch) | |
| tree | fa09d4c17b083f4656ebd912c35b212cc801459d /src/client/views/DocumentDecorations.tsx | |
| parent | 695a91d86df0aa7d3e6a4a63414286fbdaf86d80 (diff) | |
added some flair to freeform views
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 36395ed0d..406d6a234 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -11,6 +11,7 @@ export class DocumentDecorations extends React.Component { static Instance: DocumentDecorations private _resizer = "" private _isPointerDown = false; + private _resizeBorderWidth = 16; @observable private _hidden = false; constructor(props: Readonly<{}>) { @@ -149,10 +150,10 @@ export class DocumentDecorations extends React.Component { } return ( <div id="documentDecorations-container" style={{ - width: (bounds.r - bounds.x + 20) + "px", - height: (bounds.b - bounds.y + 20) + "px", - left: bounds.x - 10, - top: bounds.y - 10, + width: (bounds.r - bounds.x + this._resizeBorderWidth) + "px", + height: (bounds.b - bounds.y + this._resizeBorderWidth) + "px", + left: bounds.x - this._resizeBorderWidth / 2, + top: bounds.y - this._resizeBorderWidth / 2, }}> <div id="documentDecorations-topLeftResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> <div id="documentDecorations-topResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> |
