mirror of
https://github.com/penpot/penpot.git
synced 2025-06-09 12:41:41 +02:00
🐛 Fix problem with outerstrokes for frames
This commit is contained in:
parent
0db2f87e3e
commit
baf3f7ea15
1 changed files with 31 additions and 13 deletions
|
@ -45,15 +45,32 @@
|
||||||
[props]
|
[props]
|
||||||
(let [shape (obj/get props "shape")]
|
(let [shape (obj/get props "shape")]
|
||||||
(when (:thumbnail shape)
|
(when (:thumbnail shape)
|
||||||
[:image.frame-thumbnail
|
(let [{:keys [x y width height]} shape
|
||||||
{:id (dm/str "thumbnail-" (:id shape))
|
transform (gsh/transform-matrix shape)
|
||||||
:xlinkHref (:thumbnail shape)
|
props (-> (attrs/extract-style-attrs shape)
|
||||||
:x (:x shape)
|
(obj/merge!
|
||||||
:y (:y shape)
|
#js {:x x
|
||||||
:width (:width shape)
|
:y y
|
||||||
:height (:height shape)
|
:transform (str transform)
|
||||||
;; DEBUG
|
:width width
|
||||||
:style {:filter (when (debug? :thumbnails) "sepia(1)")}}])))
|
:height height
|
||||||
|
:className "frame-background"}))
|
||||||
|
path? (some? (.-d props))]
|
||||||
|
[:*
|
||||||
|
[:image.frame-thumbnail
|
||||||
|
{:id (dm/str "thumbnail-" (:id shape))
|
||||||
|
:xlinkHref (:thumbnail shape)
|
||||||
|
:x (:x shape)
|
||||||
|
:y (:y shape)
|
||||||
|
:width (:width shape)
|
||||||
|
:height (:height shape)
|
||||||
|
;; DEBUG
|
||||||
|
:style {:filter (when (debug? :thumbnails) "sepia(1)")}}]
|
||||||
|
|
||||||
|
[:& shape-strokes {:shape shape}
|
||||||
|
(if path?
|
||||||
|
[:> :path props]
|
||||||
|
[:> :rect props])]]))))
|
||||||
|
|
||||||
(defn frame-shape
|
(defn frame-shape
|
||||||
[shape-wrapper]
|
[shape-wrapper]
|
||||||
|
@ -88,8 +105,9 @@
|
||||||
(for [item childs]
|
(for [item childs]
|
||||||
[:& shape-wrapper {:shape item
|
[:& shape-wrapper {:shape item
|
||||||
:key (dm/str (:id item))}])
|
:key (dm/str (:id item))}])
|
||||||
[:& shape-strokes {:shape shape}
|
]]
|
||||||
(if path?
|
[:& shape-strokes {:shape shape}
|
||||||
[:> :path props]
|
(if path?
|
||||||
[:> :rect props])]]]])))
|
[:> :path props]
|
||||||
|
[:> :rect props])]])))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue