diff --git a/frontend/src/uxbox/main/data/workspace.cljs b/frontend/src/uxbox/main/data/workspace.cljs index 26fe7ffe3..14d3654db 100644 --- a/frontend/src/uxbox/main/data/workspace.cljs +++ b/frontend/src/uxbox/main/data/workspace.cljs @@ -200,6 +200,21 @@ :workspace-data data :workspace-page page))))) +;; --- Toggle layout flag + +(defn toggle-layout-flag + [flag] + (s/assert keyword? flag) + (ptk/reify ::toggle-layout-flag + ptk/UpdateEvent + (update [_ state] + (update state :workspace-layout + (fn [flags] + (if (contains? flags flag) + (disj flags flag) + (conj flags flag))))))) + + ;; --- Workspace Flags (defn activate-flag @@ -238,18 +253,6 @@ [txt] ::todo) -(defn toggle-layout-flag - [flag] - (s/assert keyword? flag) - (ptk/reify ::toggle-layout-flag - ptk/UpdateEvent - (update [_ state] - (update state :workspace-layout - (fn [flags] - (if (contains? flags flag) - (disj flags flag) - (conj flags flag))))))) - ;; --- Workspace Ruler (defrecord ActivateRuler [] diff --git a/frontend/src/uxbox/main/ui/workspace/shortcuts.cljs b/frontend/src/uxbox/main/ui/workspace/shortcuts.cljs index befba6acd..ec94ee7ef 100644 --- a/frontend/src/uxbox/main/ui/workspace/shortcuts.cljs +++ b/frontend/src/uxbox/main/ui/workspace/shortcuts.cljs @@ -22,20 +22,21 @@ ;; --- Shortcuts (defonce +shortcuts+ - {:shift+g #(st/emit! (dw/toggle-flag :grid)) - :ctrl+shift+m #(st/emit! (dw/toggle-flag :sitemap)) - :ctrl+shift+f #(st/emit! (dw/toggle-flag :drawtools)) - :ctrl+shift+i #(st/emit! (dw/toggle-flag :icons)) - :ctrl+shift+l #(st/emit! (dw/toggle-flag :layers)) + { + ;; :shift+g #(st/emit! (dw/toggle-flag :grid)) + :ctrl+shift+m #(st/emit! (dw/toggle-layout-flag :sitemap)) + :ctrl+shift+f #(st/emit! (dw/toggle-layout-flag :drawtools)) + :ctrl+shift+i #(st/emit! (dw/toggle-layout-flag :icons)) + :ctrl+shift+l #(st/emit! (dw/toggle-layout-flag :layers)) :ctrl+0 #(st/emit! (dw/reset-zoom)) - :ctrl+r #(st/emit! (dw/toggle-flag :ruler)) + ;; :ctrl+r #(st/emit! (dw/toggle-flag :ruler)) :ctrl+d #(st/emit! dw/duplicate-selected) - :ctrl+c #(st/emit! (dw/copy-to-clipboard)) - :ctrl+v #(st/emit! (dw/paste-from-clipboard)) - :ctrl+shift+v #(dl/open! :clipboard) - :ctrl+z #(st/emit! du/undo) - :ctrl+shift+z #(st/emit! du/redo) - :ctrl+y #(st/emit! du/redo) + ;; :ctrl+c #(st/emit! (dw/copy-to-clipboard)) + ;; :ctrl+v #(st/emit! (dw/paste-from-clipboard)) + ;; :ctrl+shift+v #(dl/open! :clipboard) + ;; :ctrl+z #(st/emit! du/undo) + ;; :ctrl+shift+z #(st/emit! du/redo) + ;; :ctrl+y #(st/emit! du/redo) :ctrl+b #(st/emit! (dw/select-for-drawing :rect)) :ctrl+e #(st/emit! (dw/select-for-drawing :circle)) :ctrl+t #(st/emit! (dw/select-for-drawing :text))