0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Fix recent colors

This commit is contained in:
Eva 2022-09-20 14:43:00 +02:00 committed by Alejandro Alonso
parent ac75d0cc1b
commit bea96cb586
4 changed files with 6 additions and 1 deletions

View file

@ -36,7 +36,9 @@
(mf/defc palette
[{:keys [current-colors recent-colors file-colors shared-libs selected on-select]}]
(let [state (mf/use-state {:show-menu false})
(let [;; We had to do this due to a bug that leave some bugged colors
current-colors (filter #(some? (:color %)) current-colors)
state (mf/use-state {:show-menu false})
width (:width @state 0)
visible (/ width 66)

View file

@ -131,6 +131,7 @@
:width canvas-side
:height canvas-side
:on-pointer-down handle-start-drag
:on-pointer-up handle-stop-drag
:on-lost-pointer-capture handle-stop-drag
:on-click calculate-pos
:on-mouse-move #(when @dragging? (calculate-pos %))}]

View file

@ -41,6 +41,7 @@
]
[:div.value-saturation-selector
{:on-pointer-down handle-start-drag
:on-pointer-up handle-stop-drag
:on-lost-pointer-capture handle-stop-drag
:on-click calculate-pos
:on-mouse-move #(when @dragging? (calculate-pos %))}

View file

@ -52,6 +52,7 @@
[:div.slider-selector
{:class (str (if vertical? "vertical " "") class)
:on-pointer-down handle-start-drag
:on-pointer-up handle-stop-drag
:on-lost-pointer-capture handle-stop-drag
:on-click calculate-pos
:on-mouse-move #(when @dragging? (calculate-pos %))}