mirror of
https://github.com/penpot/penpot.git
synced 2025-04-01 01:21:21 -05:00
🐛 Fix black background while drawing a path
This commit is contained in:
parent
202e7eb3f2
commit
9856da4a1f
2 changed files with 9 additions and 3 deletions
|
@ -382,6 +382,14 @@
|
||||||
(some? style)
|
(some? style)
|
||||||
(obj/set! "style" 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
|
:else
|
||||||
props)))
|
props)))
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
[app.common.math :as mth]
|
[app.common.math :as mth]
|
||||||
[app.main.ui.shapes.path :refer [path-shape]]
|
[app.main.ui.shapes.path :refer [path-shape]]
|
||||||
[app.main.ui.workspace.shapes :as shapes]
|
[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]]
|
[app.main.ui.workspace.shapes.path.editor :refer [path-editor]]
|
||||||
[rumext.alpha :as mf]))
|
[rumext.alpha :as mf]))
|
||||||
|
|
||||||
|
@ -23,8 +22,7 @@
|
||||||
|
|
||||||
[:g.draw-area
|
[:g.draw-area
|
||||||
[:g {:style {:pointer-events "none"}}
|
[:g {:style {:pointer-events "none"}}
|
||||||
[:& shapes/shape-wrapper {:shape (-> (gsh/transform-shape shape)
|
[:& shapes/shape-wrapper {:shape (gsh/transform-shape shape)}]]
|
||||||
(assoc :fills [{:fill-color pc/white-color :fill-opacity 0}]))}]]
|
|
||||||
|
|
||||||
(case tool
|
(case tool
|
||||||
:path [:& path-editor {:shape shape :zoom zoom}]
|
:path [:& path-editor {:shape shape :zoom zoom}]
|
||||||
|
|
Loading…
Add table
Reference in a new issue