Disable CTRL+Click and SHIFT+Click actions on tag panel

pull/21833/head
Travis Ralston 2020-08-20 19:45:22 -06:00
parent 0c80db8820
commit beb5c2627c
1 changed files with 4 additions and 2 deletions

View File

@ -115,9 +115,11 @@ class TagOrderStore extends Store {
break; break;
} }
case 'select_tag': { case 'select_tag': {
const allowMultiple = !SettingsStore.getValue("feature_communities_v2_prototypes")
let newTags = []; let newTags = [];
// Shift-click semantics // Shift-click semantics
if (payload.shiftKey) { if (payload.shiftKey && allowMultiple) {
// Select range of tags // Select range of tags
let start = this._state.orderedTags.indexOf(this._state.anchorTag); let start = this._state.orderedTags.indexOf(this._state.anchorTag);
let end = this._state.orderedTags.indexOf(payload.tag); let end = this._state.orderedTags.indexOf(payload.tag);
@ -135,7 +137,7 @@ class TagOrderStore extends Store {
this._state.orderedTags.slice(start, end + 1).concat(newTags), this._state.orderedTags.slice(start, end + 1).concat(newTags),
)]; )];
} else { } else {
if (payload.ctrlOrCmdKey) { if (payload.ctrlOrCmdKey && allowMultiple) {
// Toggle individual tag // Toggle individual tag
if (this._state.selectedTags.includes(payload.tag)) { if (this._state.selectedTags.includes(payload.tag)) {
newTags = this._state.selectedTags.filter((t) => t !== payload.tag); newTags = this._state.selectedTags.filter((t) => t !== payload.tag);