public Point AdjustPoint(Point p)
{
+ Rectangle gripperRect = this.GetGripperRect(type, HitAreaWidth, HitAreaWidth);
if (this.type == GripperPostion.Upper)
{
- if (this.Rectangle.IsHit(p))
- p.Y = this.Rectangle.Bottom + 1;
+ if (gripperRect.IsHit(p))
+ p.Y = gripperRect.Bottom + 1;
else
- p.Y += this.Rectangle.Height;
+ p.Y += gripperRect.Height;
}
else
{
- if (this.Rectangle.IsHit(p))
- p.Y = this.Rectangle.Y - 1;
+ if (gripperRect.IsHit(p))
+ p.Y = gripperRect.Y - 1;
else
- p.Y -= this.Rectangle.Height;
+ p.Y -= gripperRect.Height;
}
if (p.Y < this.Render.TextArea.Y)
p.Y = this.Render.TextArea.Y;