aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-07-12 22:19:05 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-07-12 22:19:05 -0400
commitf9c833cafb9c0268435aef4eafe240c3403d7472 (patch)
treeeb9a0859c6a4c9be5e72434e8a8fca394baa58df /src/client/views/nodes
parent4db507d08249ccddf664798ab59c3b729c3d1065 (diff)
parent59d32987f4f220c97a3b3cd4886ba47f3e8c4341 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx3
-rw-r--r--src/client/views/nodes/VideoBox.tsx6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index bc36074d2..82c2cef26 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -350,7 +350,8 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
}
}
onPointerWheel = (e: React.WheelEvent): void => {
- if (this.props.isSelected()) {
+ // if a text note is not selected and scrollable, this prevents us from being able to scroll and zoom out at the same time
+ if (this.props.isSelected() || e.currentTarget.scrollHeight > e.currentTarget.clientHeight) {
e.stopPropagation();
}
}
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index c9179db47..861e91e41 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -154,7 +154,7 @@ export class VideoBox extends DocComponent<FieldViewProps, VideoDocument>(VideoD
}
}
- @observable static _showControls: boolean = false;
+ @observable static _showControls: boolean;
@computed get youtubeVideoId() {
let field = Cast(this.Document[this.props.fieldKey], VideoField);
@@ -191,4 +191,6 @@ export class VideoBox extends DocComponent<FieldViewProps, VideoDocument>(VideoD
{this.youtubeVideoId ? this.youtubeContent : this.content}
</div>;
}
-} \ No newline at end of file
+}
+
+VideoBox._showControls = true; \ No newline at end of file