int totalLine = pTextObject->GetTotalLineCount();
float totalHeight = pTextObject->GetTotalHeightF();
- float frstDisplayY = pTextObject->GetFirstDisplayPositionYF();
+ float firstDisplayY = pTextObject->GetFirstDisplayPositionYF();
FloatRectangle absTextObjectBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF();
FloatRectangle absEditBounds = pEdit->GetAbsoluteBoundsF();
pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, absCursorRect);
}
- if (absTextObjectBounds.height > (totalHeight - frstDisplayY))
+ if (absTextObjectBounds.height > (totalHeight - firstDisplayY))
{
- absTextObjectBounds.height = totalHeight - frstDisplayY;
- absTextObjectBounds.y += absCursorRect.height;
+ absTextObjectBounds.height = totalHeight - firstDisplayY;
+ absTextObjectBounds.y += absCursorRect.height/2.0f;
if (absTextObjectBounds.y > absoluteTouchMovedPoint.y || (absTextObjectBounds.y + absTextObjectBounds.height) < absoluteTouchMovedPoint.y)
{
needToFixYPosition = true;
}
else
{
- absTextObjectBounds.y += absCursorRect.height;
- if (frstDisplayY == 0.0f && absTextObjectBounds.y > absoluteTouchMovedPoint.y)
+ absTextObjectBounds.y += absCursorRect.height/2.0f;
+ if (firstDisplayY == 0.0f && absTextObjectBounds.y > absoluteTouchMovedPoint.y)
{
needToFixYPosition = true;
}
- else if ((totalHeight - frstDisplayY) == absTextObjectBounds.height && (absTextObjectBounds.y + absTextObjectBounds.height) < absoluteTouchMovedPoint.y)
+ else if ((totalHeight - firstDisplayY) == absTextObjectBounds.height && (absTextObjectBounds.y + absTextObjectBounds.height) < absoluteTouchMovedPoint.y)
{
needToFixYPosition = true;
}
__pEdit->CalculateAbsoluteCursorBounds(cursorPosition, cursorRect);
copyPastePoint.x = cursorRect.x;
copyPastePoint.y = cursorRect.y;
+
+ if (__editVisibleArea.y > copyPastePoint.y || __editVisibleArea.y + __editVisibleArea.height < copyPastePoint.y)
+ {
+ return;
+ }
+
if (copyPastePoint.y < __contextMenuHeight)
{
FloatRectangle cursorRect = GetCursorBoundsF(true);