diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-13 11:33:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-13 11:33:10 -0400 |
commit | 5b49cf439866cc742c0cda37eb3d8a7200fc6860 (patch) | |
tree | 970e3bc00a0373e675948a5d90f7f5f50ccf921f /ext/bg | |
parent | efd0de6bc070c0c1476fef9d5a5434dbc108901e (diff) |
Pointer events support (#819)
* Add option pointerEventsEnabled
* Add _pointerEventsEnabled option to TextScanner
* Add additional options
* Mouse pointer events
* Touch pointer events
* Pen pointer events
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/data/options-schema.json | 5 | ||||
-rw-r--r-- | ext/bg/js/options.js | 2 | ||||
-rw-r--r-- | ext/bg/settings.html | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json index 9cc8837d..240305b5 100644 --- a/ext/bg/data/options-schema.json +++ b/ext/bg/data/options-schema.json @@ -320,6 +320,7 @@ "required": [ "inputs", "touchInputEnabled", + "pointerEventsEnabled", "selectText", "alphanumeric", "autoHideResults", @@ -430,6 +431,10 @@ "type": "boolean", "default": true }, + "pointerEventsEnabled": { + "type": "boolean", + "default": false + }, "selectText": { "type": "boolean", "default": true diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 3470da58..89538b3e 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -505,6 +505,7 @@ class OptionsUtil { // Updated handlebars templates to include "clipboard-image" definition. // Added hideDelay. // Added inputs to profileOptions.scanning. + // Added pointerEventsEnabled to profileOptions.scanning. for (const {conditionGroups} of options.profiles) { for (const {conditions} of conditionGroups) { for (const condition of conditions) { @@ -526,6 +527,7 @@ class OptionsUtil { for (const {options: profileOptions} of options.profiles) { profileOptions.general.usePopupWindow = false; profileOptions.scanning.hideDelay = 0; + profileOptions.scanning.pointerEventsEnabled = false; const {modifier, middleMouse, touchInputEnabled} = profileOptions.scanning; const scanningInputs = []; diff --git a/ext/bg/settings.html b/ext/bg/settings.html index cc6f93e0..cc209c8a 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -407,6 +407,10 @@ </div> <div class="checkbox options-advanced"> + <label><input type="checkbox" data-setting="scanning.pointerEventsEnabled"> Pointer events input enabled</label> + </div> + + <div class="checkbox options-advanced"> <label><input type="checkbox" id="deep-dom-scan" data-setting="scanning.deepDomScan"> Deep content scan</label> </div> |