🔧 Small refactors

This commit is contained in:
Andrés Moya 2022-03-08 15:17:02 +01:00
parent a13fb1f94f
commit aa1e3f59ed
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@
(defn has-radius? (defn has-radius?
[shape] [shape]
((get editable-attrs (:type shape)) :rx)) (contains? (get editable-attrs (:type shape)) :rx))
(defn radius-mode (defn radius-mode
[shape] [shape]

View file

@ -180,7 +180,7 @@
:shape (let [;; Get the editable attrs from the shape, ensuring that all attributes :shape (let [;; Get the editable attrs from the shape, ensuring that all attributes
;; are present, with value nil if they are not present in the shape. ;; are present, with value nil if they are not present in the shape.
shape-values (merge shape-values (merge
(into {} (map #(hash-map % nil) editable-attrs)) (into {} (map #(vector % nil)) editable-attrs)
(select-keys shape editable-attrs))] (select-keys shape editable-attrs))]
[(conj ids id) [(conj ids id)
(merge-attrs values shape-values)]) (merge-attrs values shape-values)])