Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ test("uses the horizontal renderer envelope for x-facing labels", () => {
expect(horizontalBounds.minY).toBeCloseTo(2.9)
expect(horizontalBounds.maxY).toBeCloseTo(3.1)

const horizontalPlusBounds = getAnchoredNetLabelRenderedBounds(
createPlacement({
orientation: "x+",
anchorPoint: { x: 2, y: 3 },
center: { x: 2.21, y: 3 },
}),
)
expect(horizontalPlusBounds.minX).toBeCloseTo(2)
expect(horizontalPlusBounds.maxX).toBeCloseTo(3.2)
expect(horizontalPlusBounds.minY).toBeCloseTo(2.9)
expect(horizontalPlusBounds.maxY).toBeCloseTo(3.1)

const verticalBounds = getAnchoredNetLabelRenderedBounds(
createPlacement({
orientation: "y+",
Expand Down
Loading