aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-12-05 11:11:07 -0500
committerbob <bcz@cs.brown.edu>2019-12-05 11:11:07 -0500
commit6ee91f4f5044465dfe33113dd84b7ffc8308bd2a (patch)
treec0f22090f9f72231cb74500e1d78960891cc01a8 /src/client/views/nodes/FormattedTextBox.tsx
parent245fb46560603f95116580448ee8711fbf342979 (diff)
compile warning fixes.
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 481ae441e..e7c59ccb4 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -376,8 +376,8 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps &
e.preventDefault(); // prevents text from being selected during drag
}
sidebarMove = (e: PointerEvent) => {
- let bounds = this.CurrentDiv.getBoundingClientRect();
- this._sidebarMovement += Math.sqrt((e.clientX - this._lastX) * (e.clientX - this._lastX) + (e.clientY - this._lastY) * (e.clientY - this._lastY))
+ const bounds = this.CurrentDiv.getBoundingClientRect();
+ this._sidebarMovement += Math.sqrt((e.clientX - this._lastX) * (e.clientX - this._lastX) + (e.clientY - this._lastY) * (e.clientY - this._lastY));
this.props.Document.sidebarWidthPercent = "" + 100 * (1 - (e.clientX - bounds.left) / bounds.width) + "%";
}
sidebarUp = (e: PointerEvent) => {