mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-31 19:30:07 +00:00
several bugs fixed...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5e3d6ead54
commit
4aee44ce02
@ -643,10 +643,15 @@ var DataPrototype = {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
// normalize the list to a sparse list of gids...
|
||||
list = list == null ?
|
||||
this.ribbons[this.getRibbon(target)]
|
||||
this.ribbons[
|
||||
this.getRibbon(target)
|
||||
// target exists but is not loaded...
|
||||
|| this.getRibbon()
|
||||
// no current ribbon...
|
||||
|| this.getRibbon(this.getImage(target, 'before', this.getImages()))
|
||||
|| this.getRibbon(this.getImage(target, 'after', this.getImages()))]
|
||||
: list.constructor === Array ?
|
||||
this.makeSparseImages(list)
|
||||
: this.ribbons[this.getRibbon(list)]
|
||||
@ -2065,12 +2070,19 @@ var DataPrototype = {
|
||||
var r = this.getRibbon()
|
||||
// if current ribbon is not empty get the closest image in it...
|
||||
if(r in crop.ribbons && crop.ribbons[r].length > 0){
|
||||
crop.focusImage(this.current, 'after', this.getRibbon())
|
||||
// XXX is this the correct way to do this???
|
||||
// ...should we use direction???
|
||||
var target = crop.getImage(this.current, 'after', this.getRibbon())
|
||||
|| crop.getImage(this.current, 'before', this.getRibbon())
|
||||
|
||||
// if ribbon got deleted, get the closest loaded image...
|
||||
} else {
|
||||
crop.focusImage(this.current, list)
|
||||
// XXX is this the correct way to do this???
|
||||
// ...should we use direction???
|
||||
var target = crop.getImage(this.current, 'after', list)
|
||||
|| crop.getImage(this.current, 'before', list)
|
||||
}
|
||||
crop.focusImage(target)
|
||||
|
||||
// XXX ???
|
||||
//crop.parent = this
|
||||
|
||||
@ -254,17 +254,13 @@ $(function(){
|
||||
'experiments',
|
||||
])
|
||||
|
||||
// this publishes all the actions...
|
||||
//module.GLOBAL_KEYBOARD.__proto__ = a
|
||||
|
||||
// setup the viewer...
|
||||
a.load({
|
||||
viewer: $('.viewer'),
|
||||
})
|
||||
|
||||
|
||||
// load some testing data...
|
||||
// NOTE: we can load this in parts...
|
||||
// NOTE: we can (and do) load this in parts...
|
||||
a
|
||||
.setEmptyMsg('Loading...')
|
||||
.load({
|
||||
|
||||
@ -1276,7 +1276,8 @@ actions.Actions({
|
||||
collapseGroup: [ reloadAfter(true) ],
|
||||
|
||||
|
||||
crop: [ reloadAfter() ],
|
||||
// XXX BUG? reloadAfter() here does not remove some images...
|
||||
crop: [ reloadAfter(true) ],
|
||||
// XXX BUG? reloadAfter() produces an align error...
|
||||
uncrop: [ reloadAfter(true) ],
|
||||
// XXX might be a good idea to do this in a new viewer in an overlay...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user