mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 15:39:50 -05:00
💩 🐛 Use scroll for colorpalette until better fix
This commit is contained in:
parent
5ed4ef907b
commit
4e636ba51f
2 changed files with 7 additions and 12 deletions
|
@ -97,6 +97,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
transition: all .6s ease;
|
transition: all .6s ease;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
overflow-x: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-cell {
|
.color-cell {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
(mx/defc palette-item
|
(mx/defc palette-item
|
||||||
{:mixins [mx/static]}
|
{:mixins [mx/static]}
|
||||||
[color position]
|
[color]
|
||||||
(letfn [(select-color [event]
|
(letfn [(select-color [event]
|
||||||
(let [attrs (if (kbd/shift? event)
|
(let [attrs (if (kbd/shift? event)
|
||||||
{:stroke-color color}
|
{:stroke-color color}
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
(let [dom (mx/ref-node own "container")
|
(let [dom (mx/ref-node own "container")
|
||||||
width (.-clientWidth dom)]
|
width (.-clientWidth dom)]
|
||||||
(when (not= (:width @local) width)
|
(when (not= (:width @local) width)
|
||||||
(swap! local assoc :width width))
|
(swap! local assoc :width :width width))
|
||||||
own))
|
own))
|
||||||
|
|
||||||
(defn- document-width
|
(defn- document-width
|
||||||
|
@ -88,12 +88,9 @@
|
||||||
[:div.btn-palette.create i/close]]]
|
[:div.btn-palette.create i/close]]]
|
||||||
|
|
||||||
[:span.left-arrow {}
|
[:span.left-arrow {}
|
||||||
;;(if (> (:position @local) 0)
|
;; FIXME
|
||||||
;; {:on-click #(swap! local update :position dec)}
|
|
||||||
;; {:class :disabled})
|
|
||||||
;; FIXME Objects are not valid as a React child (found: :on-click).
|
|
||||||
(when (> offset 0)
|
(when (> offset 0)
|
||||||
{:on-click #(swap! local update :offset (fnil dec 1))})
|
{:on-click #(swap! local (fnil dec 1) offset)})
|
||||||
i/arrow-slide]
|
i/arrow-slide]
|
||||||
|
|
||||||
[:div.color-palette-content {:ref "container"}
|
[:div.color-palette-content {:ref "container"}
|
||||||
|
@ -104,12 +101,9 @@
|
||||||
(mx/with-key color)))]]
|
(mx/with-key color)))]]
|
||||||
|
|
||||||
[:span.right-arrow
|
[:span.right-arrow
|
||||||
;;(if (< (* (+ 1 (:position @local)) 10) (count (:colors selected-coll)))
|
;; FIXME
|
||||||
;; {:on-click #(swap! local update :position inc)}
|
|
||||||
;; {:class :disabled})
|
|
||||||
;; FIXME Objects are not valid as a React child (found: :on-click).
|
|
||||||
(if (< offset invisible)
|
(if (< offset invisible)
|
||||||
{:on-click #(swap! local update :offset (fnil inc 0))}
|
{:on-click #(swap! local (fnil inc 0) offset)}
|
||||||
{})
|
{})
|
||||||
i/arrow-slide]
|
i/arrow-slide]
|
||||||
[:span.close-palette {:on-click close}
|
[:span.close-palette {:on-click close}
|
||||||
|
|
Loading…
Add table
Reference in a new issue