mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-10-05 15:38:11 +08:00
Summary timeline (#10569)
* implement summary timeline * implement summary timeline * merge dev * conditionally attach listeners only when dragging * set up listeners with a ref
This commit is contained in:
@@ -58,11 +58,12 @@ export const useEventSegmentUtils = (
|
||||
);
|
||||
const highestSeverityValue = Math.max(...severityValues);
|
||||
|
||||
if (
|
||||
severityValues.includes(displaySeverityType) &&
|
||||
displaySeverityType !== highestSeverityValue
|
||||
) {
|
||||
return [displaySeverityType, highestSeverityValue];
|
||||
if (severityValues.includes(displaySeverityType)) {
|
||||
const otherSeverityValues = severityValues.filter(
|
||||
(severity) => severity !== displaySeverityType,
|
||||
);
|
||||
const highestOtherSeverityValue = Math.max(...otherSeverityValues);
|
||||
return [displaySeverityType, highestOtherSeverityValue];
|
||||
} else {
|
||||
return [highestSeverityValue];
|
||||
}
|
||||
|
Reference in New Issue
Block a user