🐛 Fix snap imprecission.

This commit is contained in:
Andrey Antukh 2020-06-16 14:53:50 +02:00 committed by Andrés Moya
parent 1dfc604cf0
commit d3951f7f8f
12 changed files with 108 additions and 86 deletions

View file

@ -28,6 +28,8 @@
[shape]
(let [shape (gsh/transform-shape shape)
shape-center (gsh/center shape)]
(case (:type shape)
:frame (-> shape gsh/shape->rect-shape frame-snap-points)
(into #{shape-center} (-> shape :points)))))
(if (= :frame (:type shape))
(-> shape
(gsh/shape->rect-shape)
(frame-snap-points))
(into #{shape-center} (:points shape)))))