mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 13:38:32 +02:00
🐛 Fix problem editing rotated texts
This commit is contained in:
parent
d6317297d7
commit
04d6e76c6c
4 changed files with 43 additions and 25 deletions
|
@ -17,16 +17,22 @@
|
|||
:width width
|
||||
:height height})
|
||||
|
||||
(defn position-data-points
|
||||
[{:keys [position-data] :as shape}]
|
||||
(let [points (->> position-data
|
||||
(mapcat (comp gpr/rect->points position-data->rect)))
|
||||
transform (gtr/transform-matrix shape)]
|
||||
(gco/transform-points points transform)))
|
||||
(defn position-data-selrect
|
||||
[shape]
|
||||
(let [points (->> shape
|
||||
:position-data
|
||||
(mapcat (comp gpr/rect->points position-data->rect)))]
|
||||
(-> points (gpr/points->selrect))))
|
||||
|
||||
(defn position-data-bounding-box
|
||||
[shape]
|
||||
(gpr/points->selrect (position-data-points shape)))
|
||||
(let [points (->> shape
|
||||
:position-data
|
||||
(mapcat (comp gpr/rect->points position-data->rect)))
|
||||
transform (gtr/transform-matrix shape)]
|
||||
(-> points
|
||||
(gco/transform-points transform)
|
||||
(gpr/points->selrect ))))
|
||||
|
||||
(defn overlaps-position-data?
|
||||
"Checks if the given position data is inside the shape"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue