mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 12:17:15 +02: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)
|
tries-ref (mf/use-ref 0)
|
||||||
imposter-ref (mf/use-ref nil)
|
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)
|
task-ref (mf/use-ref nil)
|
||||||
|
|
||||||
on-load (mf/use-fn (fn []
|
on-load (mf/use-fn (fn []
|
||||||
(mf/set-ref-val! tries-ref 0)
|
(mf/set-ref-val! tries-ref 0)
|
||||||
(mf/set-ref-val! imposter-loaded-ref true)))
|
(reset! imposter-loaded true)))
|
||||||
on-error (mf/use-fn
|
on-error (mf/use-fn
|
||||||
(fn []
|
(fn []
|
||||||
(let [current-tries (mf/ref-val tries-ref)
|
(let [current-tries (mf/ref-val tries-ref)
|
||||||
|
@ -158,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 content-visible?) (not (mf/ref-val imposter-loaded-ref)))
|
(when (and (not ^boolean content-visible?) (not @imposter-loaded))
|
||||||
[:g.frame-placeholder
|
[:g.frame-placeholder
|
||||||
[:rect {:x x
|
[:rect {:x x
|
||||||
:y y
|
:y y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue