mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 22:49:01 -05:00
🐛 Export shapes that are rotated act a bit strange when reimported
This commit is contained in:
parent
d527184dfc
commit
b668fed1c8
2 changed files with 9 additions and 3 deletions
|
@ -46,6 +46,7 @@
|
||||||
- Workspace-palette items stay hidden when opening with keyboard-shortcut [Taiga #7489](https://tree.taiga.io/project/penpot/issue/7489)
|
- Workspace-palette items stay hidden when opening with keyboard-shortcut [Taiga #7489](https://tree.taiga.io/project/penpot/issue/7489)
|
||||||
- Fix SVG attrs are not handled correctly when exporting/importing in .zip [Taiga #7920](https://tree.taiga.io/project/penpot/issue/7920)
|
- Fix SVG attrs are not handled correctly when exporting/importing in .zip [Taiga #7920](https://tree.taiga.io/project/penpot/issue/7920)
|
||||||
- Fix validation error when detaching with two nested copies and a swap [Taiga #8095](https://tree.taiga.io/project/penpot/issue/8095)
|
- Fix validation error when detaching with two nested copies and a swap [Taiga #8095](https://tree.taiga.io/project/penpot/issue/8095)
|
||||||
|
- Export shapes that are rotated act a bit strange when reimported [Taiga #7585](https://tree.taiga.io/project/penpot/issue/7585)
|
||||||
|
|
||||||
## 2.0.3
|
## 2.0.3
|
||||||
|
|
||||||
|
|
|
@ -471,9 +471,14 @@
|
||||||
|
|
||||||
(defn setup-rect
|
(defn setup-rect
|
||||||
"Initializes the selrect and points for a shape."
|
"Initializes the selrect and points for a shape."
|
||||||
[{:keys [selrect points] :as shape}]
|
[{:keys [selrect points transform] :as shape}]
|
||||||
(let [selrect (or selrect (gsh/shape->rect shape))
|
(let [selrect (or selrect (gsh/shape->rect shape))
|
||||||
points (or points (grc/rect->points selrect))]
|
center (grc/rect->center selrect)
|
||||||
|
transform (or transform (gmt/matrix))
|
||||||
|
points (or points
|
||||||
|
(-> selrect
|
||||||
|
(grc/rect->points)
|
||||||
|
(gsh/transform-points center transform)))]
|
||||||
(-> shape
|
(-> shape
|
||||||
(assoc :selrect selrect)
|
(assoc :selrect selrect)
|
||||||
(assoc :points points))))
|
(assoc :points points))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue