Skip to content

Commit b5c4f29

Browse files
committed
enhance transform render
1 parent 08f6f28 commit b5c4f29

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/renderer/tool/impl/base/transform.cljs

+8-9
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,10 @@
358358
pivot-point @(rf/subscribe [::s/pivot-point])
359359
hovered-ids @(rf/subscribe [::element.s/hovered])]
360360
[:<>
361-
(when (not= state :scale)
362-
(for [el selected-elements]
363-
(when (:bounds el)
364-
^{:key (str (:id el) "-bounds")}
365-
[overlay/bounding-box (:bounds el) false])))
361+
(for [el selected-elements]
362+
(when (:bounds el)
363+
^{:key (str (:id el) "-bounds")}
364+
[overlay/bounding-box (:bounds el) false]))
366365

367366
(for [el hovered-ids]
368367
(when (:bounds el)
@@ -375,10 +374,10 @@
375374
(when (seq bounds)
376375
[:<>
377376
[handle.v/wrapping-bounding-box bounds]
378-
(if (= state :scale)
379-
[overlay/size-label bounds]
380-
(when (not= state :translate)
381-
[handle.v/bounding-corners bounds]))])
377+
(case state
378+
:scale [overlay/size-label bounds]
379+
:idle [handle.v/bounding-corners bounds]
380+
nil)])
382381

383382
(when pivot-point
384383
[overlay/times pivot-point])]))

0 commit comments

Comments
 (0)