mirror of
https://github.com/penpot/penpot.git
synced 2025-08-02 12:28:22 +02:00
🐛 Fix two runtime errors when creating shapes from library
This commit is contained in:
parent
200983fb7c
commit
ff5ec11bac
5 changed files with 20 additions and 15 deletions
|
@ -194,9 +194,10 @@
|
|||
(us/assert number? height)
|
||||
(-> shape
|
||||
(assoc :width width :height height)
|
||||
(update :selrect (fn [shape]
|
||||
(assoc :x2 (+ (:x1 shape) width)
|
||||
:y2 (+ (:y1 shape) height))))))
|
||||
(update :selrect (fn [selrect]
|
||||
(assoc selrect
|
||||
:x2 (+ (:x1 selrect) width)
|
||||
:y2 (+ (:y1 selrect) height))))))
|
||||
|
||||
;; --- Setup (Initialize)
|
||||
|
||||
|
|
|
@ -377,10 +377,10 @@
|
|||
:height 1
|
||||
:selrect {:x 0
|
||||
:x1 0
|
||||
:x2 0
|
||||
:x2 1
|
||||
:y 0
|
||||
:y1 0
|
||||
:y2 0
|
||||
:y2 1
|
||||
:width 1
|
||||
:height 1}
|
||||
:points []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue