aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-09 08:53:24 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-09 08:53:24 -0400
commit37763de22835e3a4a7ad995eb089d23054109c3d (patch)
treeb84bb1453328b3158a0473fc53126846c0b061ac /src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
parent78e098c4ecb95b90482e7d27fd82fb857de96bb4 (diff)
parentcf86d1b7917f0317af550293344f784a341bd7b9 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/PreviewCursor.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/PreviewCursor.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx b/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
index 93c98f7b0..8eabb020a 100644
--- a/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
+++ b/src/client/views/collections/collectionFreeForm/PreviewCursor.tsx
@@ -33,7 +33,7 @@ export class PreviewCursor extends React.Component<PreviewCursorProps> {
@action
onPointerDown = (e: React.PointerEvent) => {
- if (e.button == 0 && this.props.container.props.active()) {
+ if (e.button === 0 && this.props.container.props.active()) {
document.removeEventListener("keypress", this.onKeyPress, false);
this._showOnUp = true;
this.DownX = e.pageX;
@@ -90,7 +90,7 @@ export class PreviewCursor extends React.Component<PreviewCursorProps> {
{this.props.children}
<PreviewCursorPrompt setVisible={this.setVisible} getPoint={this.getPoint} getVisible={this.getVisible} />
</div>
- )
+ );
}
}
@@ -109,8 +109,9 @@ export class PreviewCursorPrompt extends React.Component<PromptProps> {
render() {
let p = this.props.getPoint();
- if (this.props.getVisible() && this._promptRef.current)
+ if (this.props.getVisible() && this._promptRef.current) {
this._promptRef.current.focus();
+ }
return <div className="previewCursor" id="previewCursor" onBlur={this.onBlur} tabIndex={0} ref={this._promptRef}
style={{ transform: `translate(${p[0]}px, ${p[1]}px)`, opacity: this.props.getVisible() ? 1 : 0 }}>
I