perf(ui): 移除监控动效并精简原生图表绘制

This commit is contained in:
2026-11-07 14:39:27 +08:00
parent 10c73c6026
commit 80706fa52e
54 changed files with 264 additions and 778 deletions
-7
View File
@@ -6,13 +6,6 @@ nonisolated enum PanelCurveGeometry {
let value: Double
}
static func isAppend(from old: [Date], to new: [Date], maximumGap: TimeInterval = 5) -> Bool {
guard old.count > 1, let previous = old.last, let next = new.last,
next > previous, next.timeIntervalSince(previous) <= maximumGap else { return false }
if new.count == old.count + 1 { return Array(new.dropLast()) == old }
return new.count == old.count && Array(old.dropFirst()) == Array(new.dropLast())
}
static func allowedGap(at index: Int, intervals: [TimeInterval], fallback: TimeInterval) -> TimeInterval {
guard index > 0, index < intervals.count else { return fallback }
let pair = [intervals[index - 1], intervals[index]].filter { $0.isFinite && $0 > 0 }