feat(ui): 实现全卡堆叠趋势与单页资源进程布局
This commit is contained in:
@@ -27,14 +27,14 @@ import SwiftUI
|
||||
precondition(plots.count == 1)
|
||||
let plot = plots[0]
|
||||
precondition(abs(host.bounds.width - width) < 1, "AppKit may round fractional content sizes to a point")
|
||||
precondition(abs(plot.bounds.width - host.bounds.width) < 0.5 && plot.bounds.height == 48,
|
||||
"The background chart must occupy the full card width, without axes or plot insets")
|
||||
precondition(abs(plot.bounds.width - host.bounds.width) < 0.5 && abs(plot.bounds.height - host.bounds.height) < 0.5,
|
||||
"The background chart must occupy the full card width and height, without axes or plot insets")
|
||||
let graph = topRect(plot, in: host)
|
||||
precondition(abs(graph.maxY - host.bounds.height) < 0.5,
|
||||
precondition(abs(graph.minY) < 0.5 && abs(graph.maxY - host.bounds.height) < 0.5,
|
||||
"The background chart must end at the card bottom")
|
||||
let detail = topRect(probe.view!, in: host)
|
||||
precondition(detail.maxY <= graph.minY + 0.5 && detail.width <= host.bounds.width - 20 + 0.5,
|
||||
"Foreground details must stay above the graph, including narrow/localized cards")
|
||||
precondition(detail.minY >= 0 && detail.maxY <= host.bounds.height && detail.width <= host.bounds.width - 20 + 0.5,
|
||||
"Foreground details must overlay the full-height graph within card bounds, including narrow/localized cards")
|
||||
precondition(plot.grid.isHidden && plot.input?.visibleSeriesCount == 1)
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ import SwiftUI
|
||||
try? await Task.sleep(for: .milliseconds(100))
|
||||
precondition(descendants(host).allSatisfy { !($0 is NativePanelCurve.PlotView) })
|
||||
window.orderOut(nil); window.contentView = nil; window.close()
|
||||
print("PASS: production card geometry at 190/205⅓/400pt, light/dark, three languages, foreground separation, memory distribution pixels and unmount")
|
||||
print("PASS: production card geometry at 190/205⅓/400pt, light/dark, three languages, full-height chart overlay, memory distribution pixels and unmount")
|
||||
NSApp.terminate(nil)
|
||||
}
|
||||
NSApp.run()
|
||||
|
||||
Reference in New Issue
Block a user