From c966d9b1ebb12386ac876d93f377fe3a470c6976 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 3 Jun 2022 17:11:32 -0400 Subject: Touch and pen input updates (#2172) * Remove unnecessary return * Move touch start input filtering * Refactor * Add scanOnTouchPress * Add preventPenScrolling * Rename scanOnPenPress to scanOnPenMove * Rename scanOnPenRelease to scanOnPenReleaseHover * Simplify * Refactor _searchAtFromPen early exit * Merge _penPointerPressed and _penPointerReleased into a single variable * Add more options * Simplify pen pointer coordinates * Implement scanOnPenPress and scanOnPenRelease * Implement scanOnTouchRelease * Fix tests * Don't search on touch cancel * Cancel touch if the touch action is used for scrolling or other gestures * Fix incorrect scroll prevention options being used * Organize options * Fix typos --- test/test-options-util.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test-options-util.js b/test/test-options-util.js index c4f9a3a9..16660fd0 100644 --- a/test/test-options-util.js +++ b/test/test-options-util.js @@ -367,10 +367,15 @@ function createProfileOptionsUpdatedTestData1() { searchTerms: true, searchKanji: true, scanOnTouchMove: true, + scanOnTouchPress: true, + scanOnTouchRelease: false, + scanOnPenMove: true, scanOnPenHover: true, + scanOnPenReleaseHover: false, scanOnPenPress: true, scanOnPenRelease: false, - preventTouchScrolling: true + preventTouchScrolling: true, + preventPenScrolling: true } }, { @@ -386,10 +391,15 @@ function createProfileOptionsUpdatedTestData1() { searchTerms: true, searchKanji: true, scanOnTouchMove: true, + scanOnTouchPress: true, + scanOnTouchRelease: false, + scanOnPenMove: true, scanOnPenHover: true, + scanOnPenReleaseHover: false, scanOnPenPress: true, scanOnPenRelease: false, - preventTouchScrolling: true + preventTouchScrolling: true, + preventPenScrolling: true } }, { @@ -405,10 +415,15 @@ function createProfileOptionsUpdatedTestData1() { searchTerms: true, searchKanji: true, scanOnTouchMove: true, + scanOnTouchPress: true, + scanOnTouchRelease: false, + scanOnPenMove: true, scanOnPenHover: true, + scanOnPenReleaseHover: false, scanOnPenPress: true, scanOnPenRelease: false, - preventTouchScrolling: true + preventTouchScrolling: true, + preventPenScrolling: true } } ] -- cgit v1.2.3