Fix bug causing the wrong media load event to be dispatched.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
// TODO Live scrolling nav buttons disappearing
|
// TODO Live scrolling nav buttons disappearing
|
||||||
// TODO Media loading events appear wrong for snapshot viewer
|
|
||||||
// TODO can I do away with clip/snapshot-specific?
|
// TODO can I do away with clip/snapshot-specific?
|
||||||
// TODO Live carousel chevron/icons style
|
// TODO Live carousel chevron/icons style
|
||||||
// TODO call change-event in viewer
|
// TODO call change-event in viewer
|
||||||
|
|||||||
@@ -709,7 +709,17 @@ export class FrigateCardViewerCarousel extends FrigateCardMediaCarousel {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@load="${(e: Event) => {
|
@load="${(e: Event) => {
|
||||||
|
if (
|
||||||
|
// This handler will be called on the empty image (including
|
||||||
|
// an updated empty image that is the same dimensions large as
|
||||||
|
// the previously fully loaded image -- see the note on dummy
|
||||||
|
// images in media-carousel.ts). Here we need to only call the
|
||||||
|
// media load handler on a 'real' load.
|
||||||
|
!lazyLoad ||
|
||||||
|
this._slideHasBeenLazyLoaded[slideIndex]
|
||||||
|
) {
|
||||||
this._mediaLoadedHandler(slideIndex, createMediaShowInfo(e));
|
this._mediaLoadedHandler(slideIndex, createMediaShowInfo(e));
|
||||||
|
}
|
||||||
}}"
|
}}"
|
||||||
/>`}
|
/>`}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user