aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2023-11-09 13:33:13 -0500
committergeireann <geireann.lindfield@gmail.com>2023-11-09 13:33:13 -0500
commit220d5bff52c6a1adc10cb17109020802e03c9252 (patch)
tree86b95e754a9a30ba9ac6816a338aacaf04788ade /src
parent634e2e3264a7199fc420909da8b5ab1b98d64705 (diff)
scroll mode fixes.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index bb6740260..17490e68e 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -649,7 +649,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
this._downX = this._lastX = e.pageX;
this._downY = this._lastY = e.pageY;
this._downTime = Date.now();
- if (e.button === 0 && !e.altKey && !e.ctrlKey && this.props.isContentActive(true)) {
+ if (e.button === 0 && !e.altKey && (!(e.ctrlKey && !e.metaKey) || Doc.UserDoc().freeformScrollMode === freeformScrollMode.Zoom) && this.props.isContentActive(true)) {
if (
!this.props.Document._isGroup && // group freeforms don't pan when dragged -- instead let the event go through to allow the group itself to drag
!InteractionUtils.IsType(e, InteractionUtils.TOUCHTYPE) &&
@@ -837,9 +837,9 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
};
@action
- pan = (e: PointerEvent | { clientX: number; clientY: number }): void => {
- const ctrlKey = (e as any).ctrlKey;
- const shiftKey = (e as any).shiftKey;
+ pan = (e: PointerEvent): void => {
+ const ctrlKey = e.ctrlKey && !e.shiftKey;
+ const shiftKey = e.shiftKey && !e.ctrlKey;
PresBox.Instance?.pauseAutoPres();
this.props.DocumentView?.().clearViewTransition();
const [dx, dy] = this.getTransform().transformDirection(e.clientX - this._lastX, e.clientY - this._lastY);