🐛 Fixes problem with picker

This commit is contained in:
alonso.torres 2020-09-16 12:13:49 +02:00 committed by Andrey Antukh
parent 8732407a7f
commit 2660e914fc
3 changed files with 4 additions and 3 deletions

View file

@ -229,5 +229,5 @@
(assoc-in [:workspace-local :picking-color?] true) (assoc-in [:workspace-local :picking-color?] true)
(assoc ::md/modal {:id (random-uuid) (assoc ::md/modal {:id (random-uuid)
:type :colorpicker :type :colorpicker
:props {:on-close handle-change-color} :props {:on-change handle-change-color}
:allow-click-outside true})))))) :allow-click-outside true}))))))

View file

@ -401,7 +401,8 @@
(when (or (not= new-value value) (not= new-opacity opacity)) (when (or (not= new-value value) (not= new-opacity opacity))
(reset! dirty? true)) (reset! dirty? true))
(reset! last-change [new-value new-opacity op1 op2]) (reset! last-change [new-value new-opacity op1 op2])
(on-change new-value new-opacity op1 op2))] (when on-change
(on-change new-value new-opacity op1 op2)))]
(mf/use-effect (mf/use-effect
(fn [] (fn []

View file

@ -224,7 +224,7 @@
;; Everytime we finish retrieving a new URL we redraw the canvas ;; Everytime we finish retrieving a new URL we redraw the canvas
;; so even if we're not finished the user can start to pick basic ;; so even if we're not finished the user can start to pick basic
;; shapes ;; shapes
(mf/deps props fetch-pending) (mf/deps fetch-pending)
(fn [] (fn []
(try (try
(let [canvas-node (mf/ref-val canvas-ref) (let [canvas-node (mf/ref-val canvas-ref)