OSDN Git Service

領域外でダブルクリックした場合、行全体を選択できるようにした
[fooeditengine/FooEditEngine.git] / UWP / FooEditEngine.UWP / FooTextBox.cs
index 13deed5..412456a 100644 (file)
@@ -1085,11 +1085,14 @@ namespace FooEditEngine.UWP
             this.Document.SelectGrippers.BottomLeft.Enabled = false;
             this.Document.SelectGrippers.BottomRight.Enabled = touched;
             this.JumpCaret(e.Position);
-            if (e.TapCount == 2)
+            if(e.TapCount == 2)
             {
+                //タッチスクリーンでトリプルタップした場合、アンカーインデックスを単語の先頭にしないとバグる
                 this.Document.SelectGrippers.BottomLeft.Enabled = touched;
-                //タッチスクリーンでダブルタップした場合、アンカーインデックスを単語の先頭にしないとバグる
-                this.Document.SelectWord(this.Controller.SelectionStart, touched);
+                if (e.Position.X < this.Render.TextArea.X)
+                    this.Document.SelectLine(this.Controller.SelectionStart, touched);
+                else
+                    this.Document.SelectWord(this.Controller.SelectionStart, touched);
                 this.Refresh();
             }
         }