mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Start using apply-rotation in the container-rect function.
This commit is contained in:
parent
a1ee857caa
commit
b6f459372b
1 changed files with 2 additions and 9 deletions
|
@ -93,15 +93,8 @@
|
|||
x2 (- (+ x width) center-x)
|
||||
y2 (- y center-y)
|
||||
|
||||
rx1 (- (* x1 (mth/cos angle))
|
||||
(* y1 (mth/sin angle)))
|
||||
ry1 (+ (* x1 (mth/sin angle))
|
||||
(* y1 (mth/cos angle)))
|
||||
|
||||
rx2 (- (* x2 (mth/cos angle))
|
||||
(* y2 (mth/sin angle)))
|
||||
ry2 (+ (* x2 (mth/sin angle))
|
||||
(* y2 (mth/cos angle)))
|
||||
[rx1 ry1] (apply-rotation [x1 y1] rotation)
|
||||
[rx2 ry2] (apply-rotation [x2 y2] rotation)
|
||||
|
||||
[d1 d2] (cond
|
||||
(and (>= rotation 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue