Closed
1 of 1 issue completedDescription
Interesting library! On my first attempt, wrapping three GroupBoxes that dynamically appear on model load, I saw
Thread 1: Fatal error: view origin is invalid: (407.25, nan), UnitPoint(x: 0.0, y: 0.0), (297.5, inf)
Apologies, I may not spend a lot of time debugging this, but I hope this stack trace and error report might be useful.

Text version, with ** starred line:
private func alignAndPlace(
_ item: Line.Element,
in line: Lines.Element,
at target: Size
) {
var position = target
let lineDepth = line.size.depth
let size = Size(breadth: item.size.breadth, depth: lineDepth)
let proposedSize = ProposedViewSize(size: size, axis: axis)
let itemDepth = item.size.depth
if itemDepth > 0 {
let dimensions = item.item.subview.dimensions(proposedSize)
let alignedPosition = alignmentOnDepth(dimensions)
position.depth += (alignedPosition / itemDepth) * (lineDepth - itemDepth)
}
let point = CGPoint(size: position, axis: axis)
** item.item.subview.place(at: point, anchor: .topLeading, proposal: proposedSize)
}
Stack trace:

Sub-issues
Metadata
Metadata
Assignees
Labels
No labels