From aa2a09e0737e436daa8c29f08ba521946dfe8e43 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 11 Sep 2020 12:08:00 +0200 Subject: [PATCH] :bug: Fixes paste images to viewport --- frontend/src/app/main/data/workspace.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index 502fdc619..20145e549 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -1222,7 +1222,8 @@ (let [shape {:name (:name image) :metadata {:width (:width image) :height (:height image) - :uri (:uri image)}} + :id (:id image) + :path (:path image)}} aspect-ratio (/ (:width image) (:height image))] (st/emit! (create-and-add-shape :image shape aspect-ratio)))) @@ -1231,7 +1232,7 @@ (ptk/reify ::paste-bin-impl ptk/WatchEvent (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 :local? true :js-files [image]}]