mirror of
https://github.com/penpot/penpot.git
synced 2025-01-07 15:39:42 -05:00
Add default resize logic implementation for shapes.
This commit is contained in:
parent
8795173dc5
commit
c364e35292
1 changed files with 10 additions and 0 deletions
|
@ -41,6 +41,10 @@
|
|||
dispatch-by-type
|
||||
:hierarchy #'+hierarchy+)
|
||||
|
||||
(defmulti -resize
|
||||
dispatch-by-type
|
||||
:hierarchy #'+hierarchy+)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Implementation
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
@ -50,3 +54,9 @@
|
|||
(assoc shape
|
||||
:x (+ (:x shape) dx)
|
||||
:y (+ (:y shape) dy)))
|
||||
|
||||
(defmethod -resize ::shape
|
||||
[shape {:keys [width height] :as opts}]
|
||||
(assoc shape
|
||||
:width width
|
||||
:height height))
|
||||
|
|
Loading…
Reference in a new issue