mirror of
https://github.com/penpot/penpot.git
synced 2026-09-07 12:40:12 +00:00
📎 Add some code enhancements
This commit is contained in:
parent
20738545b8
commit
6b1ecfd89c
@ -14,6 +14,7 @@
|
|||||||
[app.common.geom.proportions :as gpr]
|
[app.common.geom.proportions :as gpr]
|
||||||
[app.common.geom.shapes :as gsh]
|
[app.common.geom.shapes :as gsh]
|
||||||
[app.common.geom.shapes.rect :as gpsr]
|
[app.common.geom.shapes.rect :as gpsr]
|
||||||
|
[app.common.logging :as log]
|
||||||
[app.common.pages.changes-builder :as pcb]
|
[app.common.pages.changes-builder :as pcb]
|
||||||
[app.common.pages.helpers :as cph]
|
[app.common.pages.helpers :as cph]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
@ -1649,15 +1650,15 @@
|
|||||||
(rx/merge-map dwm/svg->clj)
|
(rx/merge-map dwm/svg->clj)
|
||||||
(rx/merge-map upload-images)
|
(rx/merge-map upload-images)
|
||||||
(rx/map process-svg)
|
(rx/map process-svg)
|
||||||
(rx/catch #(js/console.error ; When error downloading media-obj, skip it and continue with next one
|
(rx/catch ; When error downloading media-obj, skip it and continue with next one
|
||||||
(str "Error downloading " (:name media-obj) " " path ":")
|
#(log/error :hint "error downloading file"
|
||||||
(clj->js %))))))
|
:path path
|
||||||
|
:name (:name media-obj)
|
||||||
|
:cause %)))))
|
||||||
|
|
||||||
(defn- create-shapes-img
|
(defn- create-shapes-img
|
||||||
[pos media-obj]
|
[pos {:keys [name width height id mtype] :as media-obj}]
|
||||||
(let [{:keys [name width height id mtype]} media-obj
|
(let [group-shape (cts/make-shape :group
|
||||||
|
|
||||||
group-shape (cts/make-shape :group
|
|
||||||
{:x (:x pos)
|
{:x (:x pos)
|
||||||
:y (:y pos)
|
:y (:y pos)
|
||||||
:width width
|
:width width
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user