mirror of
https://github.com/penpot/penpot.git
synced 2026-05-14 04:24:01 +00:00
🐛 Fix default constraints for migrated graphics
This commit is contained in:
parent
6fd30d50f4
commit
377d9682da
@ -1187,15 +1187,18 @@
|
||||
"Convert a media object that contains a bitmap image into shapes,
|
||||
one shape of type :image and one group that contains it."
|
||||
[{:keys [name width height id mtype]} frame-id position]
|
||||
(let [frame-shape (cts/setup-shape
|
||||
{:type :frame
|
||||
:x (:x position)
|
||||
:y (:y position)
|
||||
:width width
|
||||
:height height
|
||||
:name name
|
||||
:frame-id frame-id
|
||||
:parent-id frame-id})
|
||||
(let [frame-shape (-> (cts/setup-shape
|
||||
{:type :frame
|
||||
:x (:x position)
|
||||
:y (:y position)
|
||||
:width width
|
||||
:height height
|
||||
:name name
|
||||
:frame-id frame-id
|
||||
:parent-id frame-id})
|
||||
(assoc
|
||||
:proportion (/ width height)
|
||||
:proportion-lock true))
|
||||
|
||||
img-shape (cts/setup-shape
|
||||
{:type :image
|
||||
@ -1209,7 +1212,9 @@
|
||||
:mtype mtype}
|
||||
:name name
|
||||
:frame-id (:id frame-shape)
|
||||
:parent-id (:id frame-shape)})]
|
||||
:parent-id (:id frame-shape)
|
||||
:constraints-h :scale
|
||||
:constraints-v :scale})]
|
||||
[frame-shape [img-shape]]))
|
||||
|
||||
(defn- parse-datauri
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user