mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 05:06:39 +02:00
🚧 Track FIXME for color palette
This commit is contained in:
parent
e6e9f5160e
commit
fd9adca1a9
2 changed files with 9 additions and 5 deletions
|
@ -98,6 +98,7 @@
|
||||||
transition: all .6s ease;
|
transition: all .6s ease;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-cell {
|
.color-cell {
|
||||||
|
|
|
@ -87,25 +87,28 @@
|
||||||
[:div.btn-palette.edit.current i/pencil]
|
[:div.btn-palette.edit.current i/pencil]
|
||||||
[:div.btn-palette.create i/close]]]
|
[:div.btn-palette.create i/close]]]
|
||||||
|
|
||||||
|
;; FIXME Scroll on click does not work
|
||||||
[:span.left-arrow {}
|
[:span.left-arrow {}
|
||||||
;; FIXME
|
|
||||||
(when (> offset 0)
|
(when (> offset 0)
|
||||||
{:on-click #(swap! local (fnil dec 1) offset)})
|
{:on-click #(.scrollBy (dom/get-element "color-palette-inside") (- offset) 0)})
|
||||||
i/arrow-slide]
|
i/arrow-slide]
|
||||||
|
|
||||||
[:div.color-palette-content {:ref "container"}
|
[:div.color-palette-content {:ref "container"}
|
||||||
[:div.color-palette-inside {:style {:position "relative"
|
[:div.color-palette-inside {:id "color-palette-inside"
|
||||||
|
:ref "color-palette-inside"
|
||||||
|
:style {:position "relative"
|
||||||
:right (str (* 86 offset) "px")}}
|
:right (str (* 86 offset) "px")}}
|
||||||
(mx/doseq [color colors]
|
(mx/doseq [color colors]
|
||||||
(-> (palette-item color)
|
(-> (palette-item color)
|
||||||
(mx/with-key color)))]]
|
(mx/with-key color)))]]
|
||||||
|
|
||||||
|
;; FIXME Scroll on click does not work
|
||||||
[:span.right-arrow
|
[:span.right-arrow
|
||||||
;; FIXME
|
|
||||||
(if (< offset invisible)
|
(if (< offset invisible)
|
||||||
{:on-click #(swap! local (fnil inc 0) offset)}
|
{:on-click #(.scrollBy (dom/get-element "color-palette-inside") offset 0)}
|
||||||
{})
|
{})
|
||||||
i/arrow-slide]
|
i/arrow-slide]
|
||||||
|
|
||||||
[:span.close-palette {:on-click close}
|
[:span.close-palette {:on-click close}
|
||||||
i/close]])))
|
i/close]])))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue