🐛 Fix problems with data-value keyword

This commit is contained in:
alonso.torres 2024-01-11 15:45:12 +01:00 committed by Andrey Antukh
parent 189d0c107c
commit 6ef85ef0e8
18 changed files with 57 additions and 53 deletions

View file

@ -57,8 +57,10 @@
(mf/deps exports) (mf/deps exports)
(fn [event] (fn [event]
(let [index (-> (dom/get-current-target event) (let [index (-> (dom/get-current-target event)
(dom/get-data "value"))] (dom/get-data "value")
(swap! exports update-in [index :enabled] not)))) (d/parse-integer))]
(when (some? index)
(swap! exports update-in [index :enabled] not)))))
change-all change-all
(fn [_] (fn [_]
@ -104,7 +106,7 @@
[:div {:class (stl/css :selection-row) [:div {:class (stl/css :selection-row)
:key (:id shape)} :key (:id shape)}
[:button {:class (stl/css :selection-btn) [:button {:class (stl/css :selection-btn)
:data-value index :data-value (str index)
:on-click on-toggle-enabled} :on-click on-toggle-enabled}
[:span {:class (stl/css :checkbox-wrapper)} [:span {:class (stl/css :checkbox-wrapper)}
(if (:enabled export) (if (:enabled export)

View file

@ -126,6 +126,7 @@
} }
.selection-title { .selection-title {
@include titleTipography; @include titleTipography;
color: $df-primary;
} }
} }
.selection-wrapper { .selection-wrapper {

View file

@ -56,8 +56,7 @@
(fn [event] (fn [event]
(let [mode (-> (dom/get-target event) (let [mode (-> (dom/get-target event)
(dom/get-data "value") (dom/get-data "value")
(boolean)) (boolean))]
_ (prn mode)]
(st/emit! (dcm/update-options {:show-sidebar? (not mode)})))))] (st/emit! (dcm/update-options {:show-sidebar? (not mode)})))))]
[:div {:class (stl/css :view-options) [:div {:class (stl/css :view-options)
@ -71,7 +70,7 @@
[:ul {:class (stl/css :dropdown)} [:ul {:class (stl/css :dropdown)}
[:li {:class (stl/css-case :dropdown-element true [:li {:class (stl/css-case :dropdown-element true
:selected (or (= :all cmode) (nil? cmode))) :selected (or (= :all cmode) (nil? cmode)))
:data-value :all :data-value "all"
:on-click update-mode} :on-click update-mode}
[:span {:class (stl/css :label)} (tr "labels.show-all-comments")] [:span {:class (stl/css :label)} (tr "labels.show-all-comments")]
@ -80,7 +79,7 @@
[:li {:class (stl/css-case :dropdown-element true [:li {:class (stl/css-case :dropdown-element true
:selected (= :yours cmode)) :selected (= :yours cmode))
:data-value :yours :data-value "yours"
:on-click update-mode} :on-click update-mode}
[:span {:class (stl/css :label)} [:span {:class (stl/css :label)}
@ -94,7 +93,7 @@
[:li {:class (stl/css-case :dropdown-element true [:li {:class (stl/css-case :dropdown-element true
:selected (= :pending cshow)) :selected (= :pending cshow))
:data-value (if (= :pending cshow) :all :pending) :data-value (if (= :pending cshow) "all" "pending")
:on-click update-show} :on-click update-show}
[:span {:class (stl/css :label)} [:span {:class (stl/css :label)}
@ -107,7 +106,7 @@
[:li {:class (stl/css-case :dropdown-element true [:li {:class (stl/css-case :dropdown-element true
:selected show-sidebar?) :selected show-sidebar?)
:data-value show-sidebar? :data-value (str show-sidebar?)
:on-click update-options} :on-click update-options}
[:span {:class (stl/css :label)} (tr "labels.show-comments-list")] [:span {:class (stl/css :label)} (tr "labels.show-comments-list")]

View file

@ -302,7 +302,7 @@
[:div {:class (stl/css :mode-zone)} [:div {:class (stl/css :mode-zone)}
[:button {:on-click navigate [:button {:on-click navigate
:data-value :interactions :data-value "interactions"
:class (stl/css-case :mode-zone-btn true :class (stl/css-case :mode-zone-btn true
:selected (= section :interactions)) :selected (= section :interactions))
:title (tr "viewer.header.interactions-section" (sc/get-tooltip :open-interactions))} :title (tr "viewer.header.interactions-section" (sc/get-tooltip :open-interactions))}
@ -311,7 +311,7 @@
(when (or (:can-edit permissions) (when (or (:can-edit permissions)
(= (:who-comment permissions) "all")) (= (:who-comment permissions) "all"))
[:button {:on-click navigate [:button {:on-click navigate
:data-value :comments :data-value "comments"
:class (stl/css-case :mode-zone-btn true :class (stl/css-case :mode-zone-btn true
:selected (= section :comments)) :selected (= section :comments))
:title (tr "viewer.header.comments-section" (sc/get-tooltip :open-comments))} :title (tr "viewer.header.comments-section" (sc/get-tooltip :open-comments))}

View file

@ -258,7 +258,7 @@
[:li {:class (stl/css-case :dropdown-element true [:li {:class (stl/css-case :dropdown-element true
:selected (= interactions-mode :hide)) :selected (= interactions-mode :hide))
:on-click select-mode :on-click select-mode
:data-mode :hide} :data-mode "hide"}
[:span {:class (stl/css :label)} (tr "viewer.header.dont-show-interactions")] [:span {:class (stl/css :label)} (tr "viewer.header.dont-show-interactions")]
(when (= interactions-mode :hide) (when (= interactions-mode :hide)
@ -267,7 +267,7 @@
[:li {:class (stl/css-case :dropdown-element true [:li {:class (stl/css-case :dropdown-element true
:selected (= interactions-mode :show)) :selected (= interactions-mode :show))
:on-click select-mode :on-click select-mode
:data-mode :show} :data-mode "show"}
[:span {:class (stl/css :label)} (tr "viewer.header.show-interactions")] [:span {:class (stl/css :label)} (tr "viewer.header.show-interactions")]
(when (= interactions-mode :show) (when (= interactions-mode :show)
[:span {:class (stl/css :icon)} i/tick-refactor])] [:span {:class (stl/css :icon)} i/tick-refactor])]
@ -277,7 +277,7 @@
[:li {:class (stl/css-case :dropdown-element true [:li {:class (stl/css-case :dropdown-element true
:selected (= interactions-mode :show-on-click)) :selected (= interactions-mode :show-on-click))
:on-click select-mode :on-click select-mode
:data-mode :show-on-click} :data-mode "show-on-click"}
[:span {:class (stl/css :label)} (tr "viewer.header.show-interactions-on-click")] [:span {:class (stl/css :label)} (tr "viewer.header.show-interactions-on-click")]
(when (= interactions-mode :show-on-click) (when (= interactions-mode :show-on-click)

View file

@ -86,12 +86,12 @@
[:div {:class (stl/css :links)} [:div {:class (stl/css :links)}
[:div {:class (stl/css :link-entry)} [:div {:class (stl/css :link-entry)}
[:a {:on-click set-section [:a {:on-click set-section
:data-value :recovery-request} :data-value "recovery-request"}
(tr "auth.forgot-password")]] (tr "auth.forgot-password")]]
[:div {:class (stl/css :link-entry)} [:div {:class (stl/css :link-entry)}
[:span (tr "auth.register") " "] [:span (tr "auth.register") " "]
[:a {:on-click set-section [:a {:on-click set-section
:data-value :register} :data-value "register"}
(tr "auth.register-submit")]]]] (tr "auth.register-submit")]]]]
:register :register
@ -101,7 +101,7 @@
[:div {:class (stl/css :link-entry)} [:div {:class (stl/css :link-entry)}
[:span (tr "auth.already-have-account") " "] [:span (tr "auth.already-have-account") " "]
[:a {:on-click set-section [:a {:on-click set-section
:data-value :login} :data-value "login"}
(tr "auth.login-here")]]]] (tr "auth.login-here")]]]]
:register-validate :register-validate
@ -111,7 +111,7 @@
[:div {:class (stl/css :links)} [:div {:class (stl/css :links)}
[:div {:class (stl/css :link-entry)} [:div {:class (stl/css :link-entry)}
[:a {:on-click set-section [:a {:on-click set-section
:data-value :register} :data-value "register"}
(tr "labels.go-back")]]]] (tr "labels.go-back")]]]]
:recovery-request :recovery-request

View file

@ -139,7 +139,7 @@
(fn [event] (fn [event]
(let [offset (-> (dom/get-current-target event) (let [offset (-> (dom/get-current-target event)
(dom/get-data "value") (dom/get-data "value")
(int))] (d/parse-integer))]
(st/emit! (dc/select-colorpicker-gradient-stop offset))))) (st/emit! (dc/select-colorpicker-gradient-stop offset)))))
on-select-library-color on-select-library-color

View file

@ -30,7 +30,7 @@
(for [{:keys [offset hex r g b alpha] :as value} stops] (for [{:keys [offset hex r g b alpha] :as value} stops]
[:button {:class (stl/css-case :gradient-stop true [:button {:class (stl/css-case :gradient-stop true
:selected (= editing-stop offset)) :selected (= editing-stop offset))
:data-value offset :data-value (str offset)
:on-click on-select-stop :on-click on-select-stop
:style {:left (dm/str (* offset 100) "%") :style {:left (dm/str (* offset 100) "%")
:backgroundColor hex} :backgroundColor hex}

View file

@ -36,7 +36,8 @@
(defn calculate-palette-padding [rulers?] (defn calculate-palette-padding [rulers?]
(let [left-sidebar (dom/get-element "left-sidebar-aside") (let [left-sidebar (dom/get-element "left-sidebar-aside")
left-sidebar-size (d/parse-integer (dom/get-data left-sidebar "size")) left-sidebar-size (-> (dom/get-data left-sidebar "size")
(d/parse-integer))
rulers-width (if rulers? 22 0) rulers-width (if rulers? 22 0)
min-left-sidebar-width 275 min-left-sidebar-width 275
left-padding 4 left-padding 4

View file

@ -59,7 +59,7 @@
[:aside {:ref parent-ref [:aside {:ref parent-ref
:id "left-sidebar-aside" :id "left-sidebar-aside"
:data-size size :data-size (str size)
:class (stl/css-case :left-settings-bar true :class (stl/css-case :left-settings-bar true
:global/two-row (<= size 300) :global/two-row (<= size 300)
:global/three-row (and (> size 300) (<= size 400)) :global/three-row (and (> size 300) (<= size 400))
@ -153,7 +153,7 @@
:expanded (> size 276)) :expanded (> size 276))
:id "right-sidebar-aside" :id "right-sidebar-aside"
:data-size size :data-size (str size)
:style #js {"--width" (when can-be-expanded? (dm/str size "px"))}} :style #js {"--width" (when can-be-expanded? (dm/str size "px"))}}
(when can-be-expanded? (when can-be-expanded?
[:div {:class (stl/css :resize-area) [:div {:class (stl/css :resize-area)

View file

@ -18,7 +18,7 @@
[] []
(let [on-click (mf/use-fn #(st/emit! (dw/toggle-layout-flag :collapse-left-sidebar)))] (let [on-click (mf/use-fn #(st/emit! (dw/toggle-layout-flag :collapse-left-sidebar)))]
[:div {:id "left-sidebar-aside" [:div {:id "left-sidebar-aside"
:data-size 0 :data-size "0"
:class (stl/css :collapsed-sidebar)} :class (stl/css :collapsed-sidebar)}
[:div {:class (stl/css :collapsed-title)} [:div {:class (stl/css :collapsed-title)}
[:button {:class (stl/css :collapsed-button) [:button {:class (stl/css :collapsed-button)

View file

@ -48,7 +48,7 @@
:disabled disabled-align) :disabled disabled-align)
:disabled disabled-align :disabled disabled-align
:title (tr "workspace.align.hleft" (sc/get-tooltip :align-left)) :title (tr "workspace.align.hleft" (sc/get-tooltip :align-left))
:data-value :hleft :data-value "hleft"
:on-click align-objects} :on-click align-objects}
i/align-left-refactor] i/align-left-refactor]
@ -56,7 +56,7 @@
:disabled disabled-align) :disabled disabled-align)
:disabled disabled-align :disabled disabled-align
:title (tr "workspace.align.hcenter" (sc/get-tooltip :align-hcenter)) :title (tr "workspace.align.hcenter" (sc/get-tooltip :align-hcenter))
:data-value :hcenter :data-value "hcenter"
:on-click align-objects} :on-click align-objects}
i/align-horizontal-center-refactor] i/align-horizontal-center-refactor]
@ -64,7 +64,7 @@
:disabled disabled-align) :disabled disabled-align)
:disabled disabled-align :disabled disabled-align
:title (tr "workspace.align.hright" (sc/get-tooltip :align-right)) :title (tr "workspace.align.hright" (sc/get-tooltip :align-right))
:data-value :hright :data-value "hright"
:on-click align-objects} :on-click align-objects}
i/align-right-refactor] i/align-right-refactor]
@ -72,7 +72,7 @@
:disabled disabled-distribute) :disabled disabled-distribute)
:disabled disabled-distribute :disabled disabled-distribute
:title (tr "workspace.align.hdistribute" (sc/get-tooltip :h-distribute)) :title (tr "workspace.align.hdistribute" (sc/get-tooltip :h-distribute))
:data-value :horizontal :data-value "horizontal"
:on-click distribute-objects} :on-click distribute-objects}
i/distribute-horizontally-refactor]] i/distribute-horizontally-refactor]]
@ -81,7 +81,7 @@
:disabled disabled-align) :disabled disabled-align)
:disabled disabled-align :disabled disabled-align
:title (tr "workspace.align.vtop" (sc/get-tooltip :align-top)) :title (tr "workspace.align.vtop" (sc/get-tooltip :align-top))
:data-value :vtop :data-value "vtop"
:on-click align-objects} :on-click align-objects}
i/align-top-refactor] i/align-top-refactor]
@ -89,7 +89,7 @@
:disabled disabled-align) :disabled disabled-align)
:disabled disabled-align :disabled disabled-align
:title (tr "workspace.align.vcenter" (sc/get-tooltip :align-vcenter)) :title (tr "workspace.align.vcenter" (sc/get-tooltip :align-vcenter))
:data-value :vcenter :data-value "vcenter"
:on-click align-objects} :on-click align-objects}
i/align-vertical-center-refactor] i/align-vertical-center-refactor]
@ -97,7 +97,7 @@
:disabled disabled-align) :disabled disabled-align)
:disabled disabled-align :disabled disabled-align
:title (tr "workspace.align.vbottom" (sc/get-tooltip :align-bottom)) :title (tr "workspace.align.vbottom" (sc/get-tooltip :align-bottom))
:data-value :vbottom :data-value "vbottom"
:on-click align-objects} :on-click align-objects}
i/align-bottom-refactor] i/align-bottom-refactor]
@ -105,7 +105,7 @@
:class (stl/css-case :align-button true :class (stl/css-case :align-button true
:disabled disabled-distribute) :disabled disabled-distribute)
:disabled disabled-distribute :disabled disabled-distribute
:data-value :vertical :data-value "vertical"
:on-click distribute-objects} :on-click distribute-objects}
i/distribute-vertical-spacing-refactor]]]))) i/distribute-vertical-spacing-refactor]]])))

View file

@ -168,7 +168,7 @@
[:button {:class (stl/css-case :constraint-btn true [:button {:class (stl/css-case :constraint-btn true
:active (or (= constraints-v :top) :active (or (= constraints-v :top)
(= constraints-v :topbottom))) (= constraints-v :topbottom)))
:data-value :top :data-value "top"
:on-click on-constraint-button-clicked} :on-click on-constraint-button-clicked}
[:span {:class (stl/css :resalted-area)}]]] [:span {:class (stl/css :resalted-area)}]]]
[:div {:class (stl/css :constraints-left)} [:div {:class (stl/css :constraints-left)}
@ -176,19 +176,19 @@
:constraint-btn-rotated true :constraint-btn-rotated true
:active (or (= constraints-h :left) :active (or (= constraints-h :left)
(= constraints-h :leftright))) (= constraints-h :leftright)))
:data-value :left :data-value "left"
:on-click on-constraint-button-clicked} :on-click on-constraint-button-clicked}
[:span {:class (stl/css :resalted-area)}]]] [:span {:class (stl/css :resalted-area)}]]]
[:div {:class (stl/css :constraints-center)} [:div {:class (stl/css :constraints-center)}
[:button {:class (stl/css-case :constraint-btn true [:button {:class (stl/css-case :constraint-btn true
:active (= constraints-h :center)) :active (= constraints-h :center))
:data-value :centerh :data-value "centerh"
:on-click on-constraint-button-clicked} :on-click on-constraint-button-clicked}
[:span {:class (stl/css :resalted-area)}]] [:span {:class (stl/css :resalted-area)}]]
[:button {:class (stl/css-case :constraint-btn-special true [:button {:class (stl/css-case :constraint-btn-special true
:constraint-btn-rotated true :constraint-btn-rotated true
:active (= constraints-v :center)) :active (= constraints-v :center))
:data-value :centerv :data-value "centerv"
:on-click on-constraint-button-clicked} :on-click on-constraint-button-clicked}
[:span {:class (stl/css :resalted-area)}]]] [:span {:class (stl/css :resalted-area)}]]]
[:div {:class (stl/css :constraints-right)} [:div {:class (stl/css :constraints-right)}
@ -196,14 +196,14 @@
:constraint-btn-rotated true :constraint-btn-rotated true
:active (or (= constraints-h :right) :active (or (= constraints-h :right)
(= constraints-h :leftright))) (= constraints-h :leftright)))
:data-value :right :data-value "right"
:on-click on-constraint-button-clicked} :on-click on-constraint-button-clicked}
[:span {:class (stl/css :resalted-area)}]]] [:span {:class (stl/css :resalted-area)}]]]
[:div {:class (stl/css :constraints-bottom)} [:div {:class (stl/css :constraints-bottom)}
[:button {:class (stl/css-case :constraint-btn true [:button {:class (stl/css-case :constraint-btn true
:active (or (= constraints-v :bottom) :active (or (= constraints-v :bottom)
(= constraints-v :topbottom))) (= constraints-v :topbottom)))
:data-value :bottom :data-value "bottom"
:on-click on-constraint-button-clicked} :on-click on-constraint-button-clicked}
[:span {:class (stl/css :resalted-area)}]]]] [:span {:class (stl/css :resalted-area)}]]]]
[:div {:class (stl/css :contraints-selects)} [:div {:class (stl/css :contraints-selects)}

View file

@ -128,7 +128,7 @@
(let [value (dom/get-target-val event) (let [value (dom/get-target-val event)
index (-> (dom/get-current-target event) index (-> (dom/get-current-target event)
(dom/get-data "value") (dom/get-data "value")
(int))] (d/parse-integer))]
(st/emit! (dch/update-shapes ids (st/emit! (dch/update-shapes ids
(fn [shape] (fn [shape]
(assoc-in shape [:exports index :suffix] value))))))) (assoc-in shape [:exports index :suffix] value)))))))
@ -216,7 +216,7 @@
:type "text" :type "text"
:value (:suffix export) :value (:suffix export)
:placeholder (tr "workspace.options.export.suffix") :placeholder (tr "workspace.options.export.suffix")
:data-value index :data-value (str index)
:on-change on-suffix-change :on-change on-suffix-change
:on-key-down manage-key-down}]]] :on-key-down manage-key-down}]]]

View file

@ -518,57 +518,57 @@
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:center-btn true :center-btn true
:active (= overlay-pos-type :center)) :active (= overlay-pos-type :center))
:data-value :center :data-value "center"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:top-left-btn true :top-left-btn true
:active (= overlay-pos-type :top-left)) :active (= overlay-pos-type :top-left))
:data-value :top-left :data-value "top-left"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:top-right-btn true :top-right-btn true
:active (= overlay-pos-type :top-right)) :active (= overlay-pos-type :top-right))
:data-value :top-right :data-value "top-right"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:top-center-btn true :top-center-btn true
:active (= overlay-pos-type :top-center)) :active (= overlay-pos-type :top-center))
:data-value :top-center :data-value "top-center"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:bottom-left-btn true :bottom-left-btn true
:active (= overlay-pos-type :bottom-left)) :active (= overlay-pos-type :bottom-left))
:data-value :bottom-left :data-value "bottom-left"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:bottom-left-btn true :bottom-left-btn true
:active (= overlay-pos-type :bottom-left)) :active (= overlay-pos-type :bottom-left))
:data-value :bottom-left :data-value "bottom-left"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:bottom-left-btn true :bottom-left-btn true
:active (= overlay-pos-type :bottom-left)) :active (= overlay-pos-type :bottom-left))
:data-value :bottom-left :data-value "bottom-left"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:bottom-right-btn true :bottom-right-btn true
:active (= overlay-pos-type :bottom-right)) :active (= overlay-pos-type :bottom-right))
:data-value :bottom-right :data-value "bottom-right"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]] [:span {:class (stl/css :rectangle)}]]
[:button {:class (stl/css-case :direction-btn true [:button {:class (stl/css-case :direction-btn true
:bottom-center-btn true :bottom-center-btn true
:active (= overlay-pos-type :bottom-center)) :active (= overlay-pos-type :bottom-center))
:data-value :bottom-center :data-value "bottom-center"
:on-click toggle-overlay-pos-type} :on-click toggle-overlay-pos-type}
[:span {:class (stl/css :rectangle)}]]]] [:span {:class (stl/css :rectangle)}]]]]

View file

@ -930,7 +930,7 @@
[:button {:class (stl/css :layout-option) :on-click set-grid} "Grid layout"]]]] [:button {:class (stl/css :layout-option) :on-click set-grid} "Grid layout"]]]]
[:button {:class (stl/css :add-layout) [:button {:class (stl/css :add-layout)
:data-value :flex :data-value "flex"
:on-click on-set-layout} :on-click on-set-layout}
i/add-refactor]) i/add-refactor])
[:button {:class (stl/css :remove-layout) [:button {:class (stl/css :remove-layout)

View file

@ -365,8 +365,8 @@
[:li {:key (:name size-preset) [:li {:key (:name size-preset)
:class (stl/css-case :dropdown-element true :class (stl/css-case :dropdown-element true
:match preset-match) :match preset-match)
:data-width (:width size-preset) :data-width (str (:width size-preset))
:data-height (:height size-preset) :data-height (str (:height size-preset))
:on-click on-preset-selected} :on-click on-preset-selected}
[:div {:class (stl/css :name-wrapper)} [:div {:class (stl/css :name-wrapper)}
[:span {:class (stl/css :preset-name)} (:name size-preset)] [:span {:class (stl/css :preset-name)} (:name size-preset)]

View file

@ -462,7 +462,8 @@
(when (dom/left-mouse? event) (when (dom/left-mouse? event)
(dom/stop-propagation event) (dom/stop-propagation event)
(let [target (dom/get-current-target event) (let [target (dom/get-current-target event)
position (keyword (dom/get-data target "position"))] position (-> (dom/get-data target "position")
(keyword))]
(st/emit! (dw/start-resize position #{shape-id} shape)))))) (st/emit! (dw/start-resize position #{shape-id} shape))))))
on-rotate on-rotate