mirror of
https://github.com/penpot/penpot.git
synced 2025-02-22 23:06:08 -05:00
🐛 Fix placeholder being visible behind content
This commit is contained in:
parent
bd2a3dc937
commit
503852f686
1 changed files with 3 additions and 2 deletions
|
@ -114,6 +114,7 @@
|
||||||
modifiers (mf/deref modifiers-ref)
|
modifiers (mf/deref modifiers-ref)
|
||||||
|
|
||||||
hidden? (true? (:hidden shape))
|
hidden? (true? (:hidden shape))
|
||||||
|
content-visible? (or (not ^boolean thumbnail?) (not ^boolean thumbnail-uri))
|
||||||
|
|
||||||
tries-ref (mf/use-ref 0)
|
tries-ref (mf/use-ref 0)
|
||||||
imposter-ref (mf/use-ref nil)
|
imposter-ref (mf/use-ref nil)
|
||||||
|
@ -157,7 +158,7 @@
|
||||||
:opacity (when ^boolean hidden? 0)}
|
:opacity (when ^boolean hidden? 0)}
|
||||||
|
|
||||||
;; When there is no thumbnail, we generate a empty rect.
|
;; When there is no thumbnail, we generate a empty rect.
|
||||||
(when (and (not ^boolean thumbnail-uri) (not (mf/ref-val imposter-loaded-ref)))
|
(when (and (not ^boolean content-visible?) (not (mf/ref-val imposter-loaded-ref)))
|
||||||
[:g.frame-placeholder
|
[:g.frame-placeholder
|
||||||
[:rect {:x x
|
[:rect {:x x
|
||||||
:y y
|
:y y
|
||||||
|
@ -188,7 +189,7 @@
|
||||||
:stroke-width 2}])]
|
:stroke-width 2}])]
|
||||||
|
|
||||||
;; When thumbnail is disabled.
|
;; When thumbnail is disabled.
|
||||||
(when (or (not ^boolean thumbnail?) (not ^boolean thumbnail-uri))
|
(when ^boolean content-visible?
|
||||||
[:g.frame-content
|
[:g.frame-content
|
||||||
{:id (dm/str "frame-content-" frame-id)
|
{:id (dm/str "frame-content-" frame-id)
|
||||||
:ref container-ref}
|
:ref container-ref}
|
||||||
|
|
Loading…
Add table
Reference in a new issue