diff --git a/src/js/prefs.js b/src/js/prefs.js index dab4183990..fe0ba3b3cf 100644 --- a/src/js/prefs.js +++ b/src/js/prefs.js @@ -38,7 +38,8 @@ const defaultPrefs = { skipBlankBoards: true }, - enableBoardAudition: true + enableBoardAudition: true, + disablePenEraserDetection: false } // For slow computers, override the defaults here. diff --git a/src/js/window/storyboarder-sketch-pane.js b/src/js/window/storyboarder-sketch-pane.js index 7f52f32719..e9ff858727 100644 --- a/src/js/window/storyboarder-sketch-pane.js +++ b/src/js/window/storyboarder-sketch-pane.js @@ -15,6 +15,7 @@ const { LAYER_NAME_BY_INDEX } = require('../constants') const prefsModule = require('electron').remote.require('./prefs') const enableBrushCursor = prefsModule.getPrefs('main')['enableBrushCursor'] const enableStabilizer = prefsModule.getPrefs('main')['enableStabilizer'] +const disablePenEraserDetection = prefsModule.getPrefs('main')['disablePenEraserDetection'] /** * Wrap the SketchPane component with features Storyboarder needs @@ -790,7 +791,7 @@ class DrawingStrategy { this.container.isPointerDown = true // via https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events#Determining_button_states - if (e.buttons == 32 || e.buttons == 2) { + if (!disablePenEraserDetection && (e.buttons == 32 || e.buttons == 2)) { this.container.isEraseButtonActive = true } else { this.container.isEraseButtonActive = false @@ -819,7 +820,7 @@ class DrawingStrategy { this.container.isPointerDown = false // via https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events#Determining_button_states - if (e.buttons == 32 || e.buttons == 2) { + if (!disablePenEraserDetection && (e.buttons == 32 || e.buttons == 2)) { this.container.isEraseButtonActive = true } else { this.container.isEraseButtonActive = false diff --git a/src/preferences.html b/src/preferences.html index 6ed207c759..7c234334c1 100644 --- a/src/preferences.html +++ b/src/preferences.html @@ -238,6 +238,23 @@

Performance Enhancements

+
+

Compatibility settings

+
+ Advanced settings for compatibility issues with your hardware. +
+
+ + + +
+
+