0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-18 10:41:29 -05:00

🐛 Fix black background while drawing a path

This commit is contained in:
Alejandro Alonso 2022-04-21 14:16:44 +02:00 committed by Alonso Torres
parent 202e7eb3f2
commit 9856da4a1f
2 changed files with 9 additions and 3 deletions

View file

@ -382,6 +382,14 @@
(some? style)
(obj/set! "style" style)))
(and (= :path (:type shape)) (empty? (:fills shape)))
(let [style
(-> (obj/get props "style")
(obj/clone)
(obj/set! "fill" "none"))]
(-> props
(obj/set! "style" style)))
:else
props)))

View file

@ -11,7 +11,6 @@
[app.common.math :as mth]
[app.main.ui.shapes.path :refer [path-shape]]
[app.main.ui.workspace.shapes :as shapes]
[app.main.ui.workspace.shapes.path.common :as pc]
[app.main.ui.workspace.shapes.path.editor :refer [path-editor]]
[rumext.alpha :as mf]))
@ -23,8 +22,7 @@
[:g.draw-area
[:g {:style {:pointer-events "none"}}
[:& shapes/shape-wrapper {:shape (-> (gsh/transform-shape shape)
(assoc :fills [{:fill-color pc/white-color :fill-opacity 0}]))}]]
[:& shapes/shape-wrapper {:shape (gsh/transform-shape shape)}]]
(case tool
:path [:& path-editor {:shape shape :zoom zoom}]