未验证 提交 9af2284d 编写于 作者: J Jan Kučera 提交者: GitHub

Use alignment for GetLineIndexFromPoint (#7730)

Co-authored-by: Nmiloush <miloush@users.noreply.github.com>
上级 11f5a047
......@@ -1680,10 +1680,13 @@ private int GetLineIndexFromPoint(Point point, bool snapToText)
}
else
{
if (!snapToText &&
(point.X < 0 || point.X >= record.Width))
if (!snapToText)
{
index = -1;
double alignmentOffset = GetContentOffset(record.Width, CalculatedTextAlignment);
if (point.X < alignmentOffset || point.X >= record.Width + alignmentOffset)
{
index = -1;
}
}
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册