From 871402bd84218f1b325c61461fb4b87d2213654f Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Wed, 24 Jul 2024 14:07:42 +0200 Subject: [PATCH] Fix overriding of existing radius-4 --- frontend/src/app/main/ui/workspace/tokens/core.cljs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/core.cljs b/frontend/src/app/main/ui/workspace/tokens/core.cljs index 55f18bdf29..f92d73a674 100644 --- a/frontend/src/app/main/ui/workspace/tokens/core.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/core.cljs @@ -24,8 +24,7 @@ [beicon.v2.core :as rx] [cuerdas.core :as str] [potok.v2.core :as ptk] - [promesa.core :as p] - [cljs.pprint :as pprint])) + [promesa.core :as p])) ;; Helpers --------------------------------------------------------------------- @@ -51,11 +50,13 @@ ;; Shape Update Functions ------------------------------------------------------ -(defn update-shape-radius-single-corner [value shape-ids attribute] +(defn update-shape-radius-single-corner [value shape-ids attributes] (dch/update-shapes shape-ids (fn [shape] (when (ctsr/has-radius? shape) - (ctsr/set-radius-4 shape (first attribute) value))) + (cond-> shape + (:rx shape) (ctsr/switch-to-radius-4) + :always (ctsr/set-radius-4 (first attributes) value)))) {:reg-objects? true :attrs [:rx :ry :r1 :r2 :r3 :r4]}))