mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:48:09 +02:00
deselect when reselecting same entity, fix indents
This commit is contained in:
parent
adc2c9c6fc
commit
a04ffd969e
1 changed files with 396 additions and 390 deletions
|
@ -91,8 +91,14 @@ function loaded() {
|
|||
function onRowClicked(clickEvent) {
|
||||
var id = this.dataset.entityId;
|
||||
var selection = [this.dataset.entityId];
|
||||
if (clickEvent.ctrlKey && selectedEntities.indexOf(id) === -1) {
|
||||
if (clickEvent.ctrlKey) {
|
||||
var selectedIndex = selectedEntities.indexOf(id);
|
||||
if (selectedIndex >= 0) {
|
||||
selection = selectedEntities;
|
||||
selection.splice(selectedIndex, 1)
|
||||
} else {
|
||||
selection = selection.concat(selectedEntities);
|
||||
}
|
||||
} else if (clickEvent.shiftKey && selectedEntities.length > 0) {
|
||||
var previousItemFound = -1;
|
||||
var clickedItemFound = -1;
|
||||
|
|
Loading…
Reference in a new issue