mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
respect direction of selection in Gallery
This commit is contained in:
committed by
psychedelicious
parent
2496ac19c4
commit
ee6a2a6603
@@ -118,7 +118,10 @@ const buildOnClick =
|
||||
const start = Math.min(lastClickedIndex, currentClickedIndex);
|
||||
const end = Math.max(lastClickedIndex, currentClickedIndex);
|
||||
const imagesToSelect = imageNames.slice(start, end + 1);
|
||||
dispatch(selectionChanged(uniq(selection.concat(imagesToSelect))));
|
||||
if(currentClickedIndex < lastClickedIndex) {
|
||||
imagesToSelect.reverse();
|
||||
}
|
||||
dispatch(selectionChanged(imagesToSelect));
|
||||
}
|
||||
} else if (ctrlKey || metaKey) {
|
||||
if (selection.some((n) => n === imageName) && selection.length > 1) {
|
||||
|
||||
Reference in New Issue
Block a user