mirror of
https://github.com/penpot/penpot.git
synced 2026-03-01 15:53:53 +00:00
🐛 Fixes problem when changing type
This commit is contained in:
@@ -67,7 +67,9 @@
|
||||
(fn [type]
|
||||
(let [defaults (type default-grid-params)
|
||||
keys (keys defaults)
|
||||
params (->> @state :changes params (select-keys keys) (merge defaults))
|
||||
current-changes (-> @state :changes :params (select-keys keys))
|
||||
;; We give more priority to the current changes
|
||||
params (merge defaults current-changes)
|
||||
to-merge {:type type :params params}]
|
||||
(emit-changes! #(d/deep-merge % to-merge))))
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
|
||||
(defn hex->rgb
|
||||
[v]
|
||||
(into [] (gcolor/hexToRgb v)))
|
||||
(try
|
||||
(into [] (gcolor/hexToRgb v))
|
||||
(catch js/Object e [0 0 0])))
|
||||
|
||||
(defn rgb->hex
|
||||
[[r g b]]
|
||||
|
||||
Reference in New Issue
Block a user