-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Editor] Fix multi-selection on touch screens #15211
Conversation
I tested the patch with a touch screen and everything works nice now. |
src/display/editor/tools.js
Outdated
/** | ||
* Add an editor the current selection. | ||
* @param {AnnotationEditor} editor | ||
*/ | ||
addToSelection(editor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a slightly misleading method name, since it either adds or removes a selection below. So, how about the following instead?
/** | |
* Add an editor the current selection. | |
* @param {AnnotationEditor} editor | |
*/ | |
addToSelection(editor) { | |
/** | |
* Add or remove an editor in the current selection. | |
* @param {AnnotationEditor} editor | |
*/ | |
toggleSelected(editor) { |
src/display/editor/tools.js
Outdated
this.#selectedEditors.add(editor); | ||
editor.select(); | ||
this.#dispatchUpdateUI(editor.propertiesToUpdate); | ||
this.#dispatchUpdateStates({ | ||
hasSelectedEditor: this.hasSelection, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be simplified to just the following, since the add
-call above should guarantee that this.hasSelection === true
:
hasSelectedEditor: this.hasSelection, | |
hasSelectedEditor: true, |
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/27eebe327f1a7ec/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/aea35f64ba74e6a/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/27eebe327f1a7ec/output.txt Total script time: 4.76 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/aea35f64ba74e6a/output.txt Total script time: 7.09 mins
|
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/4f625d0c79ee766/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/cfd2462eae303ca/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/4f625d0c79ee766/output.txt Total script time: 4.62 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/cfd2462eae303ca/output.txt Total script time: 6.75 mins
|
No description provided.