some tuning, cleaning and refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-07-08 02:32:19 +04:00
parent 37d89854b8
commit 5e5d4cd5c8

View File

@ -482,9 +482,6 @@ function loadRawDir(path, prefix){
res.notify(prefix, 'Loaded', 'Images.')
IMAGES_CREATED = true
// XXX need to make basic previews (screen-size-ish and ribbon-size-ish)...
// XXX
DATA = dataFromImages(IMAGES)
res.notify(prefix, 'Loaded', 'Data.')
@ -495,6 +492,10 @@ function loadRawDir(path, prefix){
reloadViewer()
// XXX is this the correct place for this???
updateImagesOrientationQ()
//makeImagesPreviewsQ()
return res.resolve()
}
@ -643,9 +644,18 @@ function updateImageOrientation(gid, no_update_loaded){
return getImageOrientation(normalizePath(img.path))
.done(function(o){
var o_o = img.orientation
var o_f = img.flipped
img.orientation = o.orientation
img.flipped = o.flipped
// mark image dirty...
if((o_o != o.orientation || o_f != o.flipped )
&& IMAGES_UPDATED.indexOf(gid) < 0){
IMAGES_UPDATED.push(gid)
}
// update loaded images...
if(!no_update_loaded){
var o = getImage(gid)