mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 08:41:39 +02:00
🐛 Fix thumbnail not taking frame blending mode
This commit is contained in:
parent
6090cf6c68
commit
5f3c381f88
4 changed files with 22 additions and 26 deletions
|
@ -8,6 +8,7 @@
|
|||
(:require
|
||||
[app.main.ui.shapes.attrs :as attrs]
|
||||
[app.util.object :as obj]
|
||||
[debug :refer [debug?]]
|
||||
[rumext.alpha :as mf]))
|
||||
|
||||
(defn frame-clip-id
|
||||
|
@ -26,6 +27,21 @@
|
|||
[:clipPath {:id (frame-clip-id shape render-id) :class "frame-clip"}
|
||||
[:rect {:x x :y y :width width :height height}]])))
|
||||
|
||||
(mf/defc frame-thumbnail
|
||||
{::mf/wrap-props false}
|
||||
[props]
|
||||
(let [shape (obj/get props "shape")]
|
||||
(when (:thumbnail shape)
|
||||
[:image.frame-thumbnail
|
||||
{:id (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)")}}])))
|
||||
|
||||
(defn frame-shape
|
||||
[shape-wrapper]
|
||||
(mf/fnc frame-shape
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue