mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 17:26:11 +02:00
🐛 Fixes paste images to viewport
This commit is contained in:
parent
e0b6e74e5d
commit
aa2a09e073
1 changed files with 3 additions and 2 deletions
|
@ -1222,7 +1222,8 @@
|
||||||
(let [shape {:name (:name image)
|
(let [shape {:name (:name image)
|
||||||
:metadata {:width (:width image)
|
:metadata {:width (:width image)
|
||||||
:height (:height image)
|
:height (:height image)
|
||||||
:uri (:uri image)}}
|
:id (:id image)
|
||||||
|
:path (:path image)}}
|
||||||
aspect-ratio (/ (:width image) (:height image))]
|
aspect-ratio (/ (:width image) (:height image))]
|
||||||
(st/emit! (create-and-add-shape :image shape aspect-ratio))))
|
(st/emit! (create-and-add-shape :image shape aspect-ratio))))
|
||||||
|
|
||||||
|
@ -1231,7 +1232,7 @@
|
||||||
(ptk/reify ::paste-bin-impl
|
(ptk/reify ::paste-bin-impl
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state stream]
|
(watch [_ state stream]
|
||||||
(let [file-id (get-in state [:workspace-page :file-id])
|
(let [file-id (get-in state [:workspace-file :id])
|
||||||
params {:file-id file-id
|
params {:file-id file-id
|
||||||
:local? true
|
:local? true
|
||||||
:js-files [image]}]
|
:js-files [image]}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue