diff --git a/frontend/resources/styles/main/partials/color-palette.scss b/frontend/resources/styles/main/partials/color-palette.scss index 02526610f9..5da928c756 100644 --- a/frontend/resources/styles/main/partials/color-palette.scss +++ b/frontend/resources/styles/main/partials/color-palette.scss @@ -97,6 +97,7 @@ display: flex; transition: all .6s ease; width: 100%; + overflow-x: scroll; } .color-cell { diff --git a/frontend/src/uxbox/main/ui/workspace/colorpalette.cljs b/frontend/src/uxbox/main/ui/workspace/colorpalette.cljs index 12ea634df8..a13f71c26f 100644 --- a/frontend/src/uxbox/main/ui/workspace/colorpalette.cljs +++ b/frontend/src/uxbox/main/ui/workspace/colorpalette.cljs @@ -31,7 +31,7 @@ (mx/defc palette-item {:mixins [mx/static]} - [color position] + [color] (letfn [(select-color [event] (let [attrs (if (kbd/shift? event) {:stroke-color color} @@ -50,7 +50,7 @@ (let [dom (mx/ref-node own "container") width (.-clientWidth dom)] (when (not= (:width @local) width) - (swap! local assoc :width width)) + (swap! local assoc :width :width width)) own)) (defn- document-width @@ -88,12 +88,9 @@ [:div.btn-palette.create i/close]]] [:span.left-arrow {} - ;;(if (> (:position @local) 0) - ;; {:on-click #(swap! local update :position dec)} - ;; {:class :disabled}) - ;; FIXME Objects are not valid as a React child (found: :on-click). + ;; FIXME (when (> offset 0) - {:on-click #(swap! local update :offset (fnil dec 1))}) + {:on-click #(swap! local (fnil dec 1) offset)}) i/arrow-slide] [:div.color-palette-content {:ref "container"} @@ -104,12 +101,9 @@ (mx/with-key color)))]] [:span.right-arrow - ;;(if (< (* (+ 1 (:position @local)) 10) (count (:colors selected-coll))) - ;; {:on-click #(swap! local update :position inc)} - ;; {:class :disabled}) - ;; FIXME Objects are not valid as a React child (found: :on-click). + ;; FIXME (if (< offset invisible) - {:on-click #(swap! local update :offset (fnil inc 0))} + {:on-click #(swap! local (fnil inc 0) offset)} {}) i/arrow-slide] [:span.close-palette {:on-click close}