From c9e7be28af0085e25770a88b7a76a20e74954458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 17 May 2021 14:19:44 +0200 Subject: [PATCH] :tada: Use shift instead of ctrl/cmd to fix aspect ratio --- CHANGES.md | 3 ++- frontend/src/app/main/data/workspace/drawing/box.cljs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 640f17c7f..00d7a12c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,8 @@ ### :sparkles: New features -- Transform shapes to path on double click +- Transform shapes to path on double click. +- Use shift instead of ctrl/cmd to keep aspect ratio [Taiga 1697](https://tree.taiga.io/project/penpot/issue/1697). ### :bug: Bugs fixed ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/data/workspace/drawing/box.cljs b/frontend/src/app/main/data/workspace/drawing/box.cljs index 6e37c1d93..d9e3879a7 100644 --- a/frontend/src/app/main/data/workspace/drawing/box.cljs +++ b/frontend/src/app/main/data/workspace/drawing/box.cljs @@ -87,14 +87,14 @@ (->> ms/mouse-position (rx/filter #(> (gpt/distance % initial) 2)) - (rx/with-latest vector ms/mouse-position-ctrl) + (rx/with-latest vector ms/mouse-position-shift) (rx/switch-map (fn [[point :as current]] (->> (snap/closest-snap-point page-id [shape] layout zoom point) (rx/map #(conj current %))))) (rx/map - (fn [[_ ctrl? point]] - #(update-drawing % point ctrl?))) + (fn [[_ shift? point]] + #(update-drawing % point shift?))) (rx/take-until stoper)) (rx/of common/handle-finish-drawing))))))