💄 Add minor cosmetic changes to measures menu

This commit is contained in:
Andrey Antukh 2025-03-19 15:11:54 +01:00
parent 7fdb0873db
commit b8c5a10551

View file

@ -175,7 +175,7 @@
show-in-viewer-ref (mf/use-ref nil)
;; PRESETS
preset-state* (mf/use-state false)
preset-state* (mf/use-state false)
show-presets-dropdown? (deref preset-state*)
open-presets
@ -205,11 +205,11 @@
;; ORIENTATION
orientation (when (= type :frame)
(cond (> (:width values) (:height values))
:horiz
:else
:vert))
orientation
(when (= type :frame)
(if (> (:width values) (:height values))
:horiz
:vert))
on-orientation-change
(mf/use-fn
@ -235,10 +235,8 @@
(run! #(st/emit! (udw/set-shape-proportion-lock % new-lock)) ids))))
;; POSITION
do-position-change
(mf/use-fn
(mf/deps ids)
(fn [shape' value attr]
(st/emit! (udw/update-position (:id shape') {attr value}))))
@ -248,7 +246,7 @@
(fn [value attr]
(st/emit! (udw/trigger-bounding-box-cloaking ids))
(binding [cts/*wasm-sync* true]
(doall (map #(do-position-change %1 value attr) shapes)))))
(run! #(do-position-change %1 value attr) shapes))))
;; ROTATION