/// <summary>
/// 指定した座標の一番近くにあるTextPointを取得する
/// </summary>
- /// <param name="p">ã\83\86ã\82ã\82¹ã\83\88エリアを左上とする相対位置</param>
+ /// <param name="p">ã\83\93ã\83¥ã\83¼エリアを左上とする相対位置</param>
/// <param name="searchRange">探索範囲</param>
/// <returns>レイアウトラインを指し示すTextPoint</returns>
public TextPoint GetTextPointFromPostion(Point p,TextPointSearchRange searchRange = TextPointSearchRange.TextAreaOnly)
}
else if(caret_y >= alignedHeight)
{
- double caretYFromTextArea = alignedHeight;
- var newsrc = this.GetNearstRowAndOffsetY(tp.row, -caretYFromTextArea);
+ var newsrc = this.GetNearstRowAndOffsetY(tp.row, -(alignedHeight - relPoint.Y));
if(newsrc == null)
this.Document.Src = new SrcPoint(this.Src.X, tp.row, 0);
else
this.Document.Src = new SrcPoint(this.Src.X, newsrc.Item1, -newsrc.Item2);
- y = caretYFromTextArea;
+ y = alignedHeight;
}
y += this.render.TextArea.Y;
result = true;