Use cmd on macOS and ctrl on Windows to trigger multi select of individual items
Using https://api.jquery.com/event.metakey/
This commit is contained in:
parent
4b08f7e6f0
commit
ff5637a7da
@ -57,8 +57,8 @@ multiselect.albumClick = function(e, albumObj) {
|
|||||||
|
|
||||||
let id = albumObj.attr('data-id')
|
let id = albumObj.attr('data-id')
|
||||||
|
|
||||||
if (e.shiftKey) multiselect.toggleItem(albumObj, id)
|
if (e.metaKey===true) multiselect.toggleItem(albumObj, id)
|
||||||
else lychee.goto(id)
|
else lychee.goto(id)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,8 +66,8 @@ multiselect.photoClick = function(e, photoObj) {
|
|||||||
|
|
||||||
let id = photoObj.attr('data-id')
|
let id = photoObj.attr('data-id')
|
||||||
|
|
||||||
if (e.shiftKey) multiselect.toggleItem(photoObj, id)
|
if (e.metaKey===true) multiselect.toggleItem(photoObj, id)
|
||||||
else lychee.goto(album.getID() + '/' + id)
|
else lychee.goto(album.getID() + '/' + id)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ multiselect.getSelection = function(e) {
|
|||||||
if (visible.contextMenu()) return false
|
if (visible.contextMenu()) return false
|
||||||
if (!visible.multiselect()) return false
|
if (!visible.multiselect()) return false
|
||||||
|
|
||||||
if (!e.shiftKey && (size.width==0 || size.height==0)) {
|
if (e.metaKey===false && (size.width==0 || size.height==0)) {
|
||||||
multiselect.close()
|
multiselect.close()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user