mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 11:45:24 +03:00
Improve margin and remove lazy image loading to reduce jumping
This commit is contained in:
parent
8992a5f8c0
commit
ac5b8b4f9f
@ -77,7 +77,7 @@ export default function PreviewThumbnailPlayer({
|
|||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ threshold: [0.0, 1.0], rootMargin: "25% 0% 25% 0%" }
|
{ threshold: [0.0, 1.0], rootMargin: "25% 0% 50% 0%" }
|
||||||
);
|
);
|
||||||
if (node) observer.current.observe(node);
|
if (node) observer.current.observe(node);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -93,7 +93,6 @@ export default function PreviewThumbnailPlayer({
|
|||||||
content = (
|
content = (
|
||||||
<img
|
<img
|
||||||
className={`${getPreviewWidth(camera, config)}`}
|
className={`${getPreviewWidth(camera, config)}`}
|
||||||
loading="lazy"
|
|
||||||
src={`${apiHost}api/preview/${camera}/${startTs}/thumbnail.jpg`}
|
src={`${apiHost}api/preview/${camera}/${startTs}/thumbnail.jpg`}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -102,7 +101,6 @@ export default function PreviewThumbnailPlayer({
|
|||||||
content = (
|
content = (
|
||||||
<img
|
<img
|
||||||
className="w-[160px]"
|
className="w-[160px]"
|
||||||
loading="lazy"
|
|
||||||
src={`${apiHost}api/events/${eventId}/thumbnail.jpg`}
|
src={`${apiHost}api/events/${eventId}/thumbnail.jpg`}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user