minor cleanup and tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-11-17 00:12:29 +03:00
parent f1c9bdce93
commit 435961d596
4 changed files with 27 additions and 9 deletions

View File

@ -235,12 +235,14 @@ module.makeImageSeqOrNameCmp = function(data, get, seq){
var ImagesClassPrototype =
module.ImagesClassPrototype = {
// XXX populate the image doc better...
fromArray: function(data){
var images = new this()
// XXX stub...
var i = 0
data.forEach(function(path){
var gid = hash('I'+i)
// XXX populate the image doc better...
images[gid] = {
id: gid,
path: path,

View File

@ -18,6 +18,7 @@
"dependencies": {
"fs.extra": "*",
"glob": "^4.0.6",
"promise": "^6.0.1",
"requirejs": "*"
}
}

View File

@ -270,7 +270,7 @@ module.RibbonsPrototype = {
// Get ribbon set scale...
//
getScale: function(){
return getElementScale(this.getRibbonSet())
return getElementScale(this.getRibbonSet()) || 1
},
// Set ribbon set scale...
@ -1113,7 +1113,9 @@ module.RibbonsPrototype = {
return false
})
// remove everything in one go...
unloaded.detach()
unloaded
.detach()
.removeClass('moving')
unloaded = unloaded.toArray()
$(gids).each(function(i, gid){

View File

@ -94,15 +94,28 @@ module.setupActions = function(viewer){
}
window.load2014 = function(){
return glob('l:/media/img/my/2014/*jpg')
.on('end', function(l){ window.a.loadURLs(l) })
}
/*********************************************************************/
// node.js specific stuff...
if(typeof(glob) != 'undefined'){
window.load2014 = function(){
return glob('l:/media/img/my/2014/*jpg')
.on('end', function(l){ window.a.loadURLs(l) })
}
window.loadInsta = function(){
return glob('l:/mnt/Dropbox/Instagram/fav/ALL/*+(jpg|png)')
.on('end', function(l){ window.a.loadURLs(l) })
window.loadInsta = function(){
return glob('l:/mnt/Dropbox/Instagram/fav/ALL/*+(jpg|png)')
.on('end', function(l){ window.a.loadURLs(l) })
}
/*
window.loadSaved = function(){
a.data.loadJSON(require('fs').readFileSync('insta.json', 'utf-8'))
}
*/
}