added delete on key press...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e061166600
commit
ef53686e0a
@ -171,6 +171,14 @@ var keyboard = {
|
||||
: gallery.unmark_current ?
|
||||
(gallery.current = null)
|
||||
: null },
|
||||
Delete: function(evt){
|
||||
if(gallery.current){
|
||||
var remove = gallery.current
|
||||
gallery.next()
|
||||
// XXX this is a bit crude...
|
||||
gallery.current === remove
|
||||
&& gallery.prev()
|
||||
gallery.remove(remove) } },
|
||||
// selection...
|
||||
' ': function(evt){
|
||||
gallery.current
|
||||
@ -728,7 +736,7 @@ var Gallery = {
|
||||
typeof(img) == 'number' ?
|
||||
this.images.at(img)?.remove()
|
||||
: img instanceof Element ?
|
||||
(this.images.contains(img)
|
||||
(this.images.includes(img)
|
||||
&& img.remove())
|
||||
: null }
|
||||
return this
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user