OSDN Git Service

タッチモードでのグリッパーの移動を改善した
authorkonekoneko <test2214@hotmail.co.jp>
Sun, 3 May 2015 16:35:47 +0000 (01:35 +0900)
committerkonekoneko <test2214@hotmail.co.jp>
Sun, 3 May 2015 16:35:47 +0000 (01:35 +0900)
Metro/FooEditEngine/GripperManager.cs

index cc05fd3..a26f045 100644 (file)
@@ -54,19 +54,20 @@ namespace FooEditEngine
 
         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;