From 75c8d97a6ec6f2888b86fd192571dc455a3ed390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 25 Oct 2021 17:54:06 +0200 Subject: [PATCH] :bug: Fix vertical flip for nested shapes --- common/src/app/common/geom/shapes/transforms.cljc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/geom/shapes/transforms.cljc b/common/src/app/common/geom/shapes/transforms.cljc index 56e6534e15..0d014cf3a5 100644 --- a/common/src/app/common/geom/shapes/transforms.cljc +++ b/common/src/app/common/geom/shapes/transforms.cljc @@ -220,7 +220,6 @@ "Given a new set of points transformed, set up the rectangle so it keeps its properties. We adjust de x,y,width,height and create a custom transform" [shape transform round-coords?] - ;; (let [points (-> shape :points (gco/transform-points transform)) center (gco/center-points points) @@ -445,8 +444,10 @@ transform)) (defn- set-flip [shape modifiers] - (let [rx (get-in modifiers [:resize-vector :x]) - ry (get-in modifiers [:resize-vector :y])] + (let [rx (or (get-in modifiers [:resize-vector :x]) + (get-in modifiers [:resize-vector-2 :x])) + ry (or (get-in modifiers [:resize-vector :y]) + (get-in modifiers [:resize-vector-2 :y]))] (cond-> shape (and rx (< rx 0)) (-> (update :flip-x not) (update :rotation -))