mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 05:26:11 +02:00
✨ Improvements after review
This commit is contained in:
parent
517751c116
commit
cf78861396
1 changed files with 6 additions and 8 deletions
|
@ -11,6 +11,7 @@
|
||||||
(:require
|
(:require
|
||||||
[rumext.alpha :as mf]
|
[rumext.alpha :as mf]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
|
[app.common.data :as d]
|
||||||
[app.util.object :as obj]
|
[app.util.object :as obj]
|
||||||
[app.main.ui.context :as muc]
|
[app.main.ui.context :as muc]
|
||||||
[app.util.svg :as usvg]))
|
[app.util.svg :as usvg]))
|
||||||
|
@ -121,15 +122,12 @@
|
||||||
attrs)))
|
attrs)))
|
||||||
|
|
||||||
(defn add-layer-props [attrs shape]
|
(defn add-layer-props [attrs shape]
|
||||||
(let [layer-attrs
|
(cond-> attrs
|
||||||
(cond-> {}
|
(:opacity shape)
|
||||||
(:opacity shape)
|
(obj/set! "opacity" (:opacity shape))
|
||||||
(assoc :opacity (:opacity shape))
|
|
||||||
|
|
||||||
(and (:blend-mode shape) (not= (:blend-mode shape) :normal))
|
(and (:blend-mode shape) (not= (:blend-mode shape) :normal))
|
||||||
(assoc :mixBlendMode (:blend-mode shape)))]
|
(obj/set! "mixBlendMode" (d/name (:blend-mode shape)))))
|
||||||
|
|
||||||
(obj/merge! attrs (clj->js layer-attrs))))
|
|
||||||
|
|
||||||
(defn extract-svg-attrs
|
(defn extract-svg-attrs
|
||||||
[render-id svg-defs svg-attrs]
|
[render-id svg-defs svg-attrs]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue