From cdd649ea3d3c933b571db1b00bc40162b4da8c01 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 27 Sep 2020 11:46:37 -0400 Subject: Add scan on touch move and prevent touch scroll options (#871) * Add scanOnTouchMove/preventTouchScrolling scanning input options * Add settings controls * Support scanOnTouchMove in TextScanner * Support preventTouchScrolling in TextScanner --- ext/bg/js/options.js | 4 +++- ext/bg/js/settings/scan-inputs-controller.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'ext/bg/js') diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index cf24645a..f83dad6d 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -522,11 +522,13 @@ class OptionsUtil { } const createInputDefaultOptions = () => ({ showAdvanced: false, + scanOnTouchMove: true, scanOnPenHover: true, scanOnPenPress: true, scanOnPenRelease: false, searchTerms: true, - searchKanji: true + searchKanji: true, + preventTouchScrolling: true }); for (const {options: profileOptions} of options.profiles) { profileOptions.general.usePopupWindow = false; diff --git a/ext/bg/js/settings/scan-inputs-controller.js b/ext/bg/js/settings/scan-inputs-controller.js index b6498d7c..0606d142 100644 --- a/ext/bg/js/settings/scan-inputs-controller.js +++ b/ext/bg/js/settings/scan-inputs-controller.js @@ -99,11 +99,13 @@ class ScanInputsController { types: {mouse: true, touch: false, pen: false}, options: { showAdvanced: false, + scanOnTouchMove: true, scanOnPenHover: true, scanOnPenPress: true, scanOnPenRelease: false, searchTerms: true, - searchKanji: true + searchKanji: true, + preventTouchScrolling: true } }] }]); -- cgit v1.2.3