mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
more tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
81e66be661
commit
a9cf6f39b6
@ -144,6 +144,7 @@ var PartialRibbonsActions = actions.Actions({
|
||||
: this.ribbons
|
||||
.preventTransitions(r)
|
||||
.updateRibbonInPlace(
|
||||
//.updateRibbon(
|
||||
gids,
|
||||
r_gid,
|
||||
// XXX this makes the animation of the ribbon
|
||||
@ -157,8 +158,7 @@ var PartialRibbonsActions = actions.Actions({
|
||||
// jumpy but does not touch the indicator
|
||||
// animation...
|
||||
target)
|
||||
//.restoreTransitions(r, true)
|
||||
.restoreTransitions(r)
|
||||
.restoreTransitions(r, true)
|
||||
}
|
||||
}],
|
||||
})
|
||||
|
||||
@ -1638,8 +1638,6 @@ var RibbonsPrototype = {
|
||||
|
||||
// NOTE: reference must be both present in the loaded ribbon and in
|
||||
// the given gids...
|
||||
// XXX need to clean out marks of unloaded images...
|
||||
// XXX need to sync the offset and image loading...
|
||||
updateRibbonInPlace: function(gids, ribbon, reference){
|
||||
var that = this
|
||||
var r = this.getRibbon(ribbon)
|
||||
@ -1667,10 +1665,24 @@ var RibbonsPrototype = {
|
||||
}
|
||||
|
||||
// update gids...
|
||||
var unload_marks = []
|
||||
gids
|
||||
.slice(0, loaded.length)
|
||||
.forEach(function(gid, i){
|
||||
gid && that.setElemGID(loaded.eq(i), gid) })
|
||||
if(gid !== undefined){
|
||||
var img = loaded.eq(i)
|
||||
|
||||
// cleanup marks...
|
||||
var g = that.getElemGID(img)
|
||||
unload_marks = gids.indexOf(g) < 0 ?
|
||||
unload_marks.concat(that.getImageMarks(g).toArray())
|
||||
: unload_marks
|
||||
|
||||
gid && that.setElemGID(img, gid)
|
||||
}
|
||||
})
|
||||
$(unload_marks)
|
||||
.remove()
|
||||
|
||||
// update images...
|
||||
this.updateImage(loaded)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user