automaticValuePosition method
Implementation
ValuePosition automaticValuePosition(
PdfPoint point,
PdfPoint size,
PdfPoint? previous,
PdfPoint? next,
) {
// Usually on top, except on the edges
if (point.x - size.x / 2 < box!.left) {
return ValuePosition.right;
}
if (point.x + size.x / 2 > box!.right) {
return ValuePosition.left;
}
if (point.y + size.y + delta > box!.top) {
return ValuePosition.bottom;
}
return ValuePosition.top;
}