aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-19 02:24:22 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-19 02:24:22 -0400
commita8438bd233d497a4471c4e0776c0f32b8c4ff8fd (patch)
tree91408af944b2ea1cbba680039a6da0d6a0a430ca
parentea359c9d247a9be59b78ed043be6427ab10cb8bd (diff)
fixed locked position to stop propagation. fixed rootSelected to only propage if rootDoc is not == this
-rw-r--r--src/client/views/nodes/DocumentView.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index d8178ea77..5c1326b1a 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -479,15 +479,14 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
}
return;
}
+ this._downX = e.clientX;
+ this._downY = e.clientY;
if ((!e.nativeEvent.cancelBubble || this.onClickHandler || this.Document.onDragStart) &&
// if this is part of a template, let the event go up to the tempalte root unless right/ctrl clicking
!((this.props.Document.rootDocument) && !(e.ctrlKey || e.button > 0))) {
- this._downX = e.clientX;
- this._downY = e.clientY;
if ((this.active || this.Document.onDragStart || this.onClickHandler) &&
!e.ctrlKey &&
(e.button === 0 || InteractionUtils.IsType(e, InteractionUtils.TOUCHTYPE)) &&
- !this.Document.lockedPosition &&
!this.Document.inOverlay) {
e.stopPropagation(); // events stop at the lowest document that is active. if right dragging, we let it go through though to allow for context menu clicks. PointerMove callbacks should remove themselves if the move event gets stopPropagated by a lower-level handler (e.g, marquee drag);
@@ -992,7 +991,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
return typeof fallback === "string" ? fallback : "layout";
}
rootSelected = (outsideReaction?: boolean) => {
- return this.isSelected(outsideReaction) || (this.rootDoc && this.props.rootSelected?.(outsideReaction));
+ return this.isSelected(outsideReaction) || (this.props.Document.rootDocument && this.props.rootSelected?.(outsideReaction));
}
childScaling = () => (this.layoutDoc._fitWidth ? this.props.PanelWidth() / this.nativeWidth : this.props.ContentScaling());
panelWidth = () => this.props.PanelWidth();