minor revision...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-05-24 19:35:03 +04:00
parent c92b685ba8
commit 52442801a7

View File

@ -12,10 +12,27 @@
* helpers...
*/
function loadMarkedOnlyData(cmp){
// NOTE: to disable MARKED cleanout set no_cleanout_marks to true.
// NOTE: MARKED may contain both gids that are not loaded and that do
// not exist, as there is no way to distinguish between the two
// situations the cleanup is optional...
function loadMarkedOnlyData(cmp, no_cleanout_marks){
cmp = cmp == null ? imageDateCmp : cmp
var cur = DATA.current
var marked = MARKED.slice().sort(cmp)
// this will ignore any gid in marks that is not in IMAGES...
// NOTE: if IMAGES contains only part of the data loadable this will
// be wrong...
if(!no_cleanout_marks){
for(var i=0; i < marks.length;){
if(marks[i] in IMAGES){
i++
continue
}
// NOTE: we do not need to advance i here...
marks.splice(i, 1)
}
}
ALL_DATA = DATA
DATA = {
varsion: '2.0',