You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For vertical text boxes like japanese, it'd be cool if you could center the tip along the center vertical axis.
This would involve doing some black magic on cross axis code of vertical|horizontal PositionDependentBox function. Namely, we'd likely pass through an alignment and do it based off that. The code below favors the left margin I think
// HORIZONTAL DIRECTIONdouble x;
if (size.width - margin.horizontal < childSize.width) {
x = (size.width - childSize.width) /2.0;
} else {
final normalizedTargetX =
target.dx.clamp(margin.left, size.width - margin.right);
final edge = margin.left + childSize.width /2.0;
if (normalizedTargetX < edge) {
x = margin.left;
} elseif (normalizedTargetX > size.width - edge) {
x = size.width - margin.left - childSize.width;
} else {
x = normalizedTargetX - childSize.width /2.0;
}
}
The text was updated successfully, but these errors were encountered:
For vertical text boxes like japanese, it'd be cool if you could center the tip along the center vertical axis.
This would involve doing some black magic on cross axis code of vertical|horizontal PositionDependentBox function. Namely, we'd likely pass through an
alignment
and do it based off that. The code below favors the left margin I thinkThe text was updated successfully, but these errors were encountered: