mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
more tweaking and minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2d19efaef7
commit
38f26e0c28
@ -15,9 +15,6 @@ var core = require('features/core')
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
// XXX do we need to do most of the work here on in imagegrid/data.js???
|
||||
// ...another question would be if we can do this using existing
|
||||
// functionality?
|
||||
|
||||
var PartialRibbonsActions = actions.Actions({
|
||||
config: {
|
||||
@ -31,11 +28,9 @@ var PartialRibbonsActions = actions.Actions({
|
||||
'ribbon-resize-threshold': 2,
|
||||
|
||||
// Sets size of ribbons in single image mode...
|
||||
'ribbons-resize-single-image': 13,
|
||||
'ribbons-resize-single-image': 21,
|
||||
},
|
||||
|
||||
// XXX preload???
|
||||
|
||||
updateRibbon: ['- Interface/Update partial ribbon size',
|
||||
function(target, w, size, threshold){
|
||||
target = target instanceof jQuery
|
||||
@ -87,7 +82,7 @@ var PartialRibbonsActions = actions.Actions({
|
||||
|| (loaded < size && na + pa > loaded)
|
||||
// ribbon too long...
|
||||
|| loaded > size * threshold){
|
||||
console.log('RESIZE')
|
||||
//console.log('RESIZE')
|
||||
this.resizeRibbon(target, size)
|
||||
//*/
|
||||
|
||||
@ -133,9 +128,11 @@ var PartialRibbonsActions = actions.Actions({
|
||||
|| (pl < update_threshold && pa > pl)
|
||||
// loaded more than we need by threshold...
|
||||
|| nl + pl + 1 > size + update_threshold){
|
||||
console.log('UPDATE')
|
||||
r.length == 0 ?
|
||||
// ribbon not loaded...
|
||||
//console.log('UPDATE')
|
||||
(r.length == 0
|
||||
|| (this.toggleSingleImage
|
||||
&& this.toggleSingleImage('?') == 'on')) ?
|
||||
// resize...
|
||||
this.resizeRibbon(target, size)
|
||||
// simply update...
|
||||
: this.ribbons
|
||||
|
||||
@ -1638,6 +1638,8 @@ 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)
|
||||
@ -1665,8 +1667,9 @@ var RibbonsPrototype = {
|
||||
}
|
||||
|
||||
// update gids...
|
||||
$(gids.slice(0, loaded.length))
|
||||
.each(function(i, gid){
|
||||
gids
|
||||
.slice(0, loaded.length)
|
||||
.forEach(function(gid, i){
|
||||
gid && that.setElemGID(loaded.eq(i), gid) })
|
||||
|
||||
// update images...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user