mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
📎 Minor cosmetic fixes on workspace shape wrapper component.
This commit is contained in:
parent
76d8ca1e72
commit
5a17237015
1 changed files with 4 additions and 6 deletions
|
@ -90,23 +90,21 @@
|
|||
on-mouse-enter (use-mouse-enter shape)
|
||||
on-mouse-leave (use-mouse-leave shape)
|
||||
|
||||
alt? (hooks/use-rxsub ms/keyboard-alt)
|
||||
|
||||
moving-iref (mf/use-memo (mf/deps (:id shape))
|
||||
#(make-is-moving-ref (:id shape)))
|
||||
moving? (mf/deref moving-iref)]
|
||||
|
||||
(hooks/use-stream ms/keyboard-alt #(reset! alt? %))
|
||||
|
||||
(mf/use-effect
|
||||
(fn []
|
||||
(fn []
|
||||
(on-mouse-leave))))
|
||||
(constantly on-mouse-leave))
|
||||
|
||||
(when (and shape
|
||||
(or ghost? (not moving?))
|
||||
(not (:hidden shape)))
|
||||
[:g.shape-wrapper {:on-mouse-enter on-mouse-enter
|
||||
:on-mouse-leave on-mouse-leave
|
||||
:style {:cursor (if @alt? cur/duplicate nil)}}
|
||||
:style {:cursor (if alt? cur/duplicate nil)}}
|
||||
(case (:type shape)
|
||||
:path [:> path/path-wrapper opts]
|
||||
:text [:> text/text-wrapper opts]
|
||||
|
|
Loading…
Add table
Reference in a new issue