mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 21:49:25 +02:00
🎉 Changed the user origin for shapes to their corner
This commit is contained in:
parent
db4e0fc314
commit
7ab3d86bc6
19 changed files with 195 additions and 182 deletions
|
@ -15,7 +15,6 @@
|
|||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.util.interop :as itr]
|
||||
[uxbox.main.ui.shapes.bounding-box :refer [bounding-box]]
|
||||
[uxbox.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]]))
|
||||
|
||||
;; --- Rect Wrapper
|
||||
|
@ -26,7 +25,6 @@
|
|||
{::mf/wrap-props false}
|
||||
[props]
|
||||
(let [shape (unchecked-get props "shape")
|
||||
frame (unchecked-get props "frame")
|
||||
on-mouse-down (mf/use-callback
|
||||
(mf/deps shape)
|
||||
#(common/on-mouse-down % shape))
|
||||
|
@ -35,8 +33,7 @@
|
|||
#(common/on-context-menu % shape))]
|
||||
[:g.shape {:on-mouse-down on-mouse-down
|
||||
:on-context-menu on-context-menu}
|
||||
[:& rect-shape {:shape (geom/transform-shape frame shape) }]
|
||||
[:& bounding-box {:shape shape :frame frame}]]))
|
||||
[:& rect-shape {:shape shape}]]))
|
||||
|
||||
;; --- Rect Shape
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue