0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 09:08:31 -05:00

Improvements after review

This commit is contained in:
alonso.torres 2021-03-08 17:37:37 +01:00
parent 517751c116
commit cf78861396

View file

@ -11,6 +11,7 @@
(:require
[rumext.alpha :as mf]
[cuerdas.core :as str]
[app.common.data :as d]
[app.util.object :as obj]
[app.main.ui.context :as muc]
[app.util.svg :as usvg]))
@ -121,15 +122,12 @@
attrs)))
(defn add-layer-props [attrs shape]
(let [layer-attrs
(cond-> {}
(:opacity shape)
(assoc :opacity (:opacity shape))
(cond-> attrs
(:opacity shape)
(obj/set! "opacity" (:opacity shape))
(and (:blend-mode shape) (not= (:blend-mode shape) :normal))
(assoc :mixBlendMode (:blend-mode shape)))]
(obj/merge! attrs (clj->js layer-attrs))))
(and (:blend-mode shape) (not= (:blend-mode shape) :normal))
(obj/set! "mixBlendMode" (d/name (:blend-mode shape)))))
(defn extract-svg-attrs
[render-id svg-defs svg-attrs]