aboutsummaryrefslogtreecommitdiff
path: root/src/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2019-01-30 02:30:15 -0500
committerbobzel <zzzman@gmail.com>2019-01-30 02:30:15 -0500
commit3032decb31fa6c891520923ed49612ba5ecf7c93 (patch)
tree171ecd95932d376b732b0081de45262cde00386d /src/views/nodes/DocumentView.tsx
parent02891812b01888aba3eada58d6051a80a79c1a18 (diff)
added golden layout. doesn't work much better than the flex layout.
Diffstat (limited to 'src/views/nodes/DocumentView.tsx')
-rw-r--r--src/views/nodes/DocumentView.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/views/nodes/DocumentView.tsx b/src/views/nodes/DocumentView.tsx
index 7ba62e0b8..38e695ed2 100644
--- a/src/views/nodes/DocumentView.tsx
+++ b/src/views/nodes/DocumentView.tsx
@@ -93,6 +93,9 @@ export class DocumentView extends React.Component<DocumentViewProps> {
private _downX: number = 0;
private _downY: number = 0;
+ constructor(props: DocumentViewProps) {
+ super(props);
+ }
get screenRect(): ClientRect | DOMRect {
if (this._mainCont.current) {
return this._mainCont.current.getBoundingClientRect();
@@ -223,7 +226,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
this._downX = e.clientX;
this._downY = e.clientY;
this._contextMenuCanOpen = e.button == 2;
- if (this.active) {
+ if (this.active && !e.isDefaultPrevented()) {
e.stopPropagation();
if (e.buttons === 2) {
e.preventDefault();