From 284ee4b68fd35cbd1401164827625b41a75cd48b Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 16 Apr 2020 14:27:56 +0200 Subject: [PATCH] :sparkles: Enable color update when externaly changed. --- frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs | 3 +++ frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs | 3 +++ .../src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs index 2e991cb9b..4fbc63399 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs @@ -65,6 +65,9 @@ [:div.color-info [:input {:default-value (:fill-color shape) + :ref (fn [el] + (when el + (set! (.-value el) (:fill-color shape)))) :pattern "^#(?:[0-9a-fA-F]{3}){1,2}$" :on-change on-color-input-change}]] diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs index 1c1f3296f..e8750ae48 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/page.cljs @@ -91,6 +91,9 @@ :on-click show-color-picker}] [:div.color-info [:input {:default-value (:grid-color options) + :ref (fn [el] + (when el + (set! (.-value el) (:grid-color options)))) :pattern "^#(?:[0-9a-fA-F]{3}){1,2}$" :on-change on-color-input-change}]]]]])) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs index ec28a6515..dde427c5c 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs @@ -93,6 +93,9 @@ :on-click show-color-picker}] [:div.color-info [:input {:default-value (:stroke-color shape) + :ref (fn [el] + (when el + (set! (.-value el) (:stroke-color shape)))) :pattern "^#(?:[0-9a-fA-F]{3}){1,2}$" :on-change on-color-input-change}]]