mirror of
https://github.com/penpot/penpot.git
synced 2025-07-26 10:07:13 +02:00
✨ Improved resize/rotation handlers for shapes with tiny height/width
This commit is contained in:
parent
f4be3aa9de
commit
9332d6f36c
5 changed files with 69 additions and 56 deletions
|
@ -9,13 +9,13 @@
|
|||
[app.common.geom.point :as gpt]
|
||||
[app.common.geom.shapes :as gsh]))
|
||||
|
||||
(defn- selrect-snap-points [{:keys [x y width height]}]
|
||||
(defn selrect-snap-points [{:keys [x y width height]}]
|
||||
#{(gpt/point x y)
|
||||
(gpt/point (+ x width) y)
|
||||
(gpt/point (+ x width) (+ y height))
|
||||
(gpt/point x (+ y height))})
|
||||
|
||||
(defn- frame-snap-points [{:keys [x y width height] :as selrect}]
|
||||
(defn frame-snap-points [{:keys [x y width height] :as selrect}]
|
||||
(into (selrect-snap-points selrect)
|
||||
#{(gpt/point (+ x (/ width 2)) y)
|
||||
(gpt/point (+ x width) (+ y (/ height 2)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue