mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 10:21:39 +02:00
✨ Allows rotation for shapes
This commit is contained in:
parent
5636881463
commit
84007e6ad1
10 changed files with 105 additions and 49 deletions
|
@ -13,7 +13,6 @@
|
|||
[rumext.alpha :as mf]
|
||||
[app.main.ui.shapes.attrs :as attrs]
|
||||
[app.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]]
|
||||
[app.common.geom.shapes :as geom]
|
||||
[app.util.object :as obj]
|
||||
[app.util.geom.path :as ugp]))
|
||||
|
||||
|
@ -24,14 +23,11 @@
|
|||
[props]
|
||||
(let [shape (unchecked-get props "shape")
|
||||
background? (unchecked-get props "background?")
|
||||
;; {:keys [id x y width height]} (geom/shape->rect-shape shape)
|
||||
{:keys [id x y width height]} (:selrect shape)
|
||||
transform (geom/transform-matrix shape)
|
||||
pdata (ugp/content->path (:content shape))
|
||||
props (-> (attrs/extract-style-attrs shape)
|
||||
(obj/merge!
|
||||
#js {:transform transform
|
||||
:d pdata}))]
|
||||
#js {:d pdata}))]
|
||||
(if background?
|
||||
[:g
|
||||
[:path {:stroke "transparent"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue