mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 03:11:38 +02:00
💄 Add minor cosmetic changes to measures menu
This commit is contained in:
parent
7fdb0873db
commit
b8c5a10551
1 changed files with 7 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue