started work with real data...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-11-14 22:17:17 +03:00
parent 38ea605f00
commit 0a77873455
2 changed files with 59 additions and 40 deletions

View File

@ -4,6 +4,11 @@
* *
**********************************************************************/ **********************************************************************/
if(typeof(process) != 'undefined'){
var glob = require('glob')
}
//var DEBUG = DEBUG != null ? DEBUG : true //var DEBUG = DEBUG != null ? DEBUG : true
// //
define(function(require){ var module = {} define(function(require){ var module = {}
@ -89,6 +94,12 @@ module.setupActions = function(viewer){
} }
window.load2014 = function(){
return glob('l:/media/img/my/2014/*jpg')
.on('end', function(l){ window.a.loadURLs(l) })
}
/********************************************************************** /**********************************************************************
* vim:set ts=4 sw=4 : */ * vim:set ts=4 sw=4 : */

View File

@ -584,6 +584,8 @@ actions.Actions(Client, {
} else { } else {
this.ribbons.clear() this.ribbons.clear()
// XXX
this.ribbons.images = this.images
} }
this.reload() this.reload()
@ -639,30 +641,33 @@ actions.Actions(Client, {
.centerImage(gid) .centerImage(gid)
.centerRibbon(gid) .centerRibbon(gid)
// align other ribbons... var that = this
var ribbon = data.getRibbon(gid) //setTimeout(function(){
for(var r in data.ribbons){ // align other ribbons...
// skip the current ribbon... var ribbon = data.getRibbon(gid)
if(r == ribbon){ for(var r in data.ribbons){
continue // skip the current ribbon...
} if(r == ribbon){
// XXX skip off-screen ribbons...
// center...
// XXX is there a 'last' special case here???
var t = data.getImage(gid, r)
if(t == null){
var f = data.getImage('first', r)
// nothing found -- empty ribbon?
if(f == null){
continue continue
} }
this.centerImage(f, 'before')
} else { // XXX skip off-screen ribbons...
this.centerImage(t, 'after')
// center...
// XXX is there a 'last' special case here???
var t = data.getImage(gid, r)
if(t == null){
var f = data.getImage('first', r)
// nothing found -- empty ribbon?
if(f == null){
continue
}
that.centerImage(f, 'before')
} else {
that.centerImage(t, 'after')
}
} }
} //}, 0)
}], }],
// XXX these should also affect up/down navigation... // XXX these should also affect up/down navigation...
// ...navigate by proximity (closest to center) rather than by // ...navigate by proximity (closest to center) rather than by
@ -682,26 +687,29 @@ actions.Actions(Client, {
.centerRibbon(gid) .centerRibbon(gid)
.centerImage(gid) .centerImage(gid)
// align other ribbons... var that = this
var ribbon = data.getRibbon(gid) //setTimeout(function(){
for(var r in data.ribbons){ // align other ribbons...
// skip the current ribbon... var ribbon = data.getRibbon(gid)
if(r == ribbon){ for(var r in data.ribbons){
continue // skip the current ribbon...
if(r == ribbon){
continue
}
// XXX skip off-screen ribbons...
// XXX see if we need to do some loading...
// center...
var f = data.getImage('first', r)
// nothing found -- empty ribbon?
if(f == null){
continue
}
that.centerImage(f, 'before')
} }
//}, 0)
// XXX skip off-screen ribbons...
// XXX see if we need to do some loading...
// center...
var f = data.getImage('first', r)
// nothing found -- empty ribbon?
if(f == null){
continue
}
this.centerImage(f, 'before')
}
}], }],
// NOTE: this will align only a single image... // NOTE: this will align only a single image...