lots of tweeks and minor fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-05-20 02:49:14 +04:00
parent aebad0dc1f
commit 6fe78ddafa
5 changed files with 17 additions and 16 deletions

View File

@ -99,7 +99,7 @@ function flashIndicator(direction){
// rhythms... // rhythms...
.show() .show()
.delay(100) .delay(100)
.fadeOut(200) .fadeOut(300)
} }

View File

@ -7,9 +7,9 @@
//var DEBUG = DEBUG != null ? DEBUG : true //var DEBUG = DEBUG != null ? DEBUG : true
var LOAD_SCREENS = 4 var LOAD_SCREENS = 6
var LOAD_THRESHOLD = 1 var LOAD_THRESHOLD = 2
var DEFAULT_SCREEN_IMAGES = 5 var DEFAULT_SCREEN_IMAGES = 4
var MAX_SCREEN_IMAGES = 12 var MAX_SCREEN_IMAGES = 12
// A stub image, also here for documentation... // A stub image, also here for documentation...
@ -69,16 +69,16 @@ var SETTINGS = {
// NOTE: this expects gids... // NOTE: this expects gids...
function imageDateCmp(a, b, data){ function imageDateCmp(a, b, data){
data = data == null ? DATA : data data = data == null ? IMAGES : data
return data.images[b].ctime - data.images[a].ctime return data[b].ctime - data[a].ctime
} }
// NOTE: this expects gids... // NOTE: this expects gids...
function imageNameCmp(a, b, data){ function imageNameCmp(a, b, data){
data = data == null ? DATA : data data = data == null ? IMAGES : data
a = data.images[b].path.split('/')[-1] a = data[b].path.split('/')[-1]
b = data.images[a].path.split('/')[-1] b = data[a].path.split('/')[-1]
if(a == b){ if(a == b){
return 0 return 0
} else if(a < b){ } else if(a < b){
@ -534,7 +534,7 @@ function convertDataGen1(data, cmp){
} }
cmp = cmp == null ? cmp = cmp == null ?
function(a, b){ function(a, b){
return imageDateCmp(a, b, res) return imageDateCmp(a, b, res.images)
} }
: cmp : cmp
var ribbons = res.data.ribbons var ribbons = res.data.ribbons
@ -698,10 +698,11 @@ function saveFile(name){
// CEF // CEF
if(window.CEF_dumpJSON != null){ if(window.CEF_dumpJSON != null){
if(DATA.image_file == null){ if(DATA.image_file == null){
DATA.image_file = name + '-image.json' DATA.image_file = name + '-images.json'
} }
CEF_dumpJSON(DATA.image_file, IMAGES) CEF_dumpJSON(DATA.image_file, IMAGES)
CEF_dumpJSON(name + '-data.json', DATA) CEF_dumpJSON(name + '-data.json', DATA)
CEF_dumpJSON(name + '-marked.json', MARKED)
// PhoneGap // PhoneGap
} else if(false) { } else if(false) {
@ -770,6 +771,7 @@ function setupDataBindings(viewer){
// XXX need to maintain the correct number of images per ribbon // XXX need to maintain the correct number of images per ribbon
// per zoom setting -- things get really odd when a ribbon // per zoom setting -- things get really odd when a ribbon
// is smaller than it should be... // is smaller than it should be...
// XXX this does not get called on marking...
.on('preCenteringRibbon', function(evt, ribbon, image){ .on('preCenteringRibbon', function(evt, ribbon, image){
// NOTE: we do not need to worry about centering the ribbon // NOTE: we do not need to worry about centering the ribbon
// here, just ball-park-load the correct batch... // here, just ball-park-load the correct batch...

View File

@ -281,7 +281,7 @@ body {
} }
.dark.viewer { .dark.viewer {
background: black; background: #0a0a0a;
} }

View File

@ -25,10 +25,9 @@ function loadMarkedOnlyData(cmp){
], ],
//order: marked.slice(), //order: marked.slice(),
order: DATA.order, order: DATA.order,
images: DATA.images,
} }
DATA.current = getGIDBefore(cur, 0) DATA.current = getGIDBefore(cur, 0)
loadData(DATA) loadData()
toggleMarkesView('off') toggleMarkesView('off')
return DATA return DATA
} }
@ -37,7 +36,7 @@ function loadMarkedOnlyData(cmp){
// XXX name this in a better way... // XXX name this in a better way...
function loadAllImages(){ function loadAllImages(){
DATA = ALL_DATA DATA = ALL_DATA
loadData(DATA) loadData()
return DATA return DATA
} }

View File

@ -19,7 +19,7 @@ var toggleSingleImageMode = createCSSClassToggler('.viewer',
} else { } else {
TRANSITION_MODE_DEFAULT = 'animate' TRANSITION_MODE_DEFAULT = 'animate'
toggleImageProportions('square') toggleImageProportions('square')
fitNImages(5) fitNImages(DEFAULT_SCREEN_IMAGES)
} }
}) })