Complete carousel refactor.

Reduces one layer of DOM nesting for simplication, uses the latest Embla
version, unittests for everything.
This commit is contained in:
Dermot Duffy
2023-09-04 16:25:32 -07:00
parent 48ece1e154
commit e830db1a77
56 changed files with 3561 additions and 1950 deletions
+3
View File
@@ -2,6 +2,9 @@
display: block;
height: 100%;
width: 100%;
// Keep carousel controls relative to the media carousel itself.
position: relative;
}
.embla {
+5 -1
View File
@@ -1,9 +1,13 @@
:host {
--video-max-height: none;
}
// If the carousel has an unselected attribute set on it, do not let the
// pointer interact (e.g. hover, scroll) with underlying elements. This is used
// when the carousel is part of a media-grid. Without this next/prev controls
// will enlarge on hover, and the wheel-gestures plugin may block scrolling.
// See matching in viewer-carousel.scss .
:host([unselected]) frigate-card-media-carousel {
:host([unselected]) frigate-card-carousel {
pointer-events: none;
}
-2
View File
@@ -2,6 +2,4 @@
width: 100%;
height: 100%;
display: block;
--video-max-height: none;
}
-9
View File
@@ -1,9 +0,0 @@
:host {
display: block;
width: 100%;
height: 100%;
--video-max-height: none;
// Keep the controls relative to the media carousel itself.
position: relative;
}
+6 -5
View File
@@ -1,6 +1,8 @@
:host {
// Center unseekable icon.
position: relative;
--video-max-height: none;
}
// If the carousel has an unselected attribute set on it, do not let the
@@ -8,17 +10,16 @@
// when the carousel is part of a media-grid. Without this next/prev controls
// will enlarge on hover, and the wheel-gestures plugin may block scrolling.
// See matching in live-carousel.scss .
:host([unselected]) frigate-card-media-carousel,
:host([unselected]) .seek-warning
{
:host([unselected]) frigate-card-carousel,
:host([unselected]) .seek-warning {
pointer-events: none;
}
:host([unseekable]) frigate-card-media-carousel {
:host([unseekable]) frigate-card-carousel {
filter: brightness(50%);
}
:host([unseekable]) .seek-warning {
display: block
display: block;
}
.seek-warning {