forked from Github/frigate
Implement recordings fullscreen and rework recordings layout size calculation (#11318)
* Implement fullscreen button * wrap items on mobile * control based on width * refresh * Implement basic fullscreen * Fix scrolling * Add observer to detect of row overflows * Use cn to simplify classnames * dynamically respond to layout sizing * Simplify listener * Simplify layout * Handle tall browser
This commit is contained in:
@@ -43,5 +43,19 @@ export function useResizeObserver(...refs: RefType[]) {
|
||||
};
|
||||
}, [refs, resizeObserver]);
|
||||
|
||||
return dimensions;
|
||||
if (dimensions.length == refs.length) {
|
||||
return dimensions;
|
||||
} else {
|
||||
const items = [...dimensions];
|
||||
for (let i = dimensions.length; i < refs.length; i++) {
|
||||
items.push({
|
||||
width: 0,
|
||||
height: 0,
|
||||
x: -Infinity,
|
||||
y: -Infinity,
|
||||
});
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user