mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-02 12:20:08 +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
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// normalize the list to a sparse list of gids...
|
// normalize the list to a sparse list of gids...
|
||||||
list = list == null ?
|
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 ?
|
: list.constructor === Array ?
|
||||||
this.makeSparseImages(list)
|
this.makeSparseImages(list)
|
||||||
: this.ribbons[this.getRibbon(list)]
|
: this.ribbons[this.getRibbon(list)]
|
||||||
@ -2065,12 +2070,19 @@ var DataPrototype = {
|
|||||||
var r = this.getRibbon()
|
var r = this.getRibbon()
|
||||||
// if current ribbon is not empty get the closest image in it...
|
// if current ribbon is not empty get the closest image in it...
|
||||||
if(r in crop.ribbons && crop.ribbons[r].length > 0){
|
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...
|
// if ribbon got deleted, get the closest loaded image...
|
||||||
} else {
|
} 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 ???
|
// XXX ???
|
||||||
//crop.parent = this
|
//crop.parent = this
|
||||||
|
|||||||
@ -254,17 +254,13 @@ $(function(){
|
|||||||
'experiments',
|
'experiments',
|
||||||
])
|
])
|
||||||
|
|
||||||
// this publishes all the actions...
|
|
||||||
//module.GLOBAL_KEYBOARD.__proto__ = a
|
|
||||||
|
|
||||||
// setup the viewer...
|
// setup the viewer...
|
||||||
a.load({
|
a.load({
|
||||||
viewer: $('.viewer'),
|
viewer: $('.viewer'),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// load some testing data...
|
// load some testing data...
|
||||||
// NOTE: we can load this in parts...
|
// NOTE: we can (and do) load this in parts...
|
||||||
a
|
a
|
||||||
.setEmptyMsg('Loading...')
|
.setEmptyMsg('Loading...')
|
||||||
.load({
|
.load({
|
||||||
|
|||||||
@ -1276,7 +1276,8 @@ actions.Actions({
|
|||||||
collapseGroup: [ reloadAfter(true) ],
|
collapseGroup: [ reloadAfter(true) ],
|
||||||
|
|
||||||
|
|
||||||
crop: [ reloadAfter() ],
|
// XXX BUG? reloadAfter() here does not remove some images...
|
||||||
|
crop: [ reloadAfter(true) ],
|
||||||
// XXX BUG? reloadAfter() produces an align error...
|
// XXX BUG? reloadAfter() produces an align error...
|
||||||
uncrop: [ reloadAfter(true) ],
|
uncrop: [ reloadAfter(true) ],
|
||||||
// XXX might be a good idea to do this in a new viewer in an overlay...
|
// 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