From 043c038dae53cedfb2abf7dfaa72558ee124c961 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 17 Feb 2021 09:45:19 +0100 Subject: [PATCH] :bug: Fix radial gradients --- frontend/src/app/main/ui/shapes/gradients.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/shapes/gradients.cljs b/frontend/src/app/main/ui/shapes/gradients.cljs index cd8ab02e0..c9df9e474 100644 --- a/frontend/src/app/main/ui/shapes/gradients.cljs +++ b/frontend/src/app/main/ui/shapes/gradients.cljs @@ -36,7 +36,9 @@ (mf/defc radial-gradient [{:keys [id gradient shape]}] (let [{:keys [x y width height]} (:selrect shape) center (gsh/center-shape shape) - transform (when (= :path (:type shape)) (gsh/transform-matrix shape))] + transform (if (= :path (:type shape)) + (gsh/transform-matrix shape) + (gmt/matrix))] (let [[x y] (if (= (:type shape) :frame) [0 0] [x y]) translate-vec (gpt/point (+ x (* width (:start-x gradient))) (+ y (* height (:start-y gradient))))