bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-12-29 23:06:55 +03:00
parent bead309555
commit c2bccd8ae8
3 changed files with 12 additions and 4 deletions

View File

@ -105,6 +105,8 @@ core.ImageGridFeatures.Feature('imagegrid-testing', [
'imagegrid-commandline',
'imagegrid-ui',
//'-ui-partial-ribbons',
// read-only mode...
// XXX at this point this needs some more tuneup, the following

View File

@ -610,9 +610,10 @@ actions.Actions({
? this.ribbons.elemGID(target)
// NOTE: data.getImage(..) can return null at start or end
// of ribbon, thus we need to account for this...
: (this.data.getImage(target)
: (this.data.getImage(target, 'before')
|| this.data.getImage(target, 'after'))
w = w || this.screenwidth
// get config data and normalize...
@ -712,7 +713,7 @@ core.ImageGridFeatures.Feature({
// NOTE: we have to do this as we are called BEFORE the
// actual focus change happens...
// XXX is there a better way to do this???
target = list != null ? target = this.data.getImage(target, list) : target
target = list != null ? this.data.getImage(target, list) : target
this.updateRibbon(target)
}],

View File

@ -892,7 +892,12 @@ var DataPrototype = {
offset = -1
} else {
var offset = 0
mode = mode == null ? 'before' : mode
// NOTE: this will set the default mode to 'before' but only
// when we are looking withing a specific set of images
// ...otherwise it will be left as is, i.e. strict mode.
mode = (mode == null && list != null) ?
'before'
: mode
}
// normalize the list to a sparse list of gids...
@ -1105,7 +1110,7 @@ var DataPrototype = {
this.makeSparseImages(ribbons[k], res)
}
list = res.compact()
target = null
target = null
// filter out the unloaded gids from given list...
} else if(target != null && target instanceof Array){