mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 12:28:54 -05:00
🐛 Fix imposters loading rect
This commit is contained in:
parent
a6662f2774
commit
a76e5940af
1 changed files with 3 additions and 3 deletions
|
@ -118,12 +118,12 @@
|
|||
|
||||
tries-ref (mf/use-ref 0)
|
||||
imposter-ref (mf/use-ref nil)
|
||||
imposter-loaded-ref (mf/use-ref false)
|
||||
imposter-loaded (mf/use-state false)
|
||||
task-ref (mf/use-ref nil)
|
||||
|
||||
on-load (mf/use-fn (fn []
|
||||
(mf/set-ref-val! tries-ref 0)
|
||||
(mf/set-ref-val! imposter-loaded-ref true)))
|
||||
(reset! imposter-loaded true)))
|
||||
on-error (mf/use-fn
|
||||
(fn []
|
||||
(let [current-tries (mf/ref-val tries-ref)
|
||||
|
@ -158,7 +158,7 @@
|
|||
:opacity (when ^boolean hidden? 0)}
|
||||
|
||||
;; When there is no thumbnail, we generate a empty rect.
|
||||
(when (and (not ^boolean content-visible?) (not (mf/ref-val imposter-loaded-ref)))
|
||||
(when (and (not ^boolean content-visible?) (not @imposter-loaded))
|
||||
[:g.frame-placeholder
|
||||
[:rect {:x x
|
||||
:y y
|
||||
|
|
Loading…
Add table
Reference in a new issue