From b6f459372bf6b21d7a359003e2a037513c646b61 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 23 Jan 2016 22:09:23 +0200 Subject: [PATCH] Start using apply-rotation in the container-rect function. --- src/uxbox/shapes.cljs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/uxbox/shapes.cljs b/src/uxbox/shapes.cljs index 609a8c12fe..06829446c5 100644 --- a/src/uxbox/shapes.cljs +++ b/src/uxbox/shapes.cljs @@ -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)