From d75741205a31fefd43e1ea16e67ff49ef1390e72 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 23 Aug 2013 04:20:47 +0400 Subject: [PATCH] alignDataToRibbon(...) working, needs more testing + identified a class of buggs (see TODO.otl)... Signed-off-by: Alex A. Naanou --- ui/TODO.otl | 2 ++ ui/data.js | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ui/TODO.otl b/ui/TODO.otl index ed570736..9f49174b 100755 --- a/ui/TODO.otl +++ b/ui/TODO.otl @@ -95,6 +95,8 @@ Roadmap [_] 29% Gen 3 current todo [_] 59% High priority + [_] BUG CLASS: everything should work with empty ribbons... + | currently some code breaks when seeing an empty ribbon... [_] add indicator to ribbon up/down navigation in full screen... | this might be a number or some kind of animation... [_] BUG: sometimes opening a dir (open dialog) does not do anything... diff --git a/ui/data.js b/ui/data.js index 71ab43a5..cbd6ae28 100755 --- a/ui/data.js +++ b/ui/data.js @@ -590,9 +590,12 @@ function getImageGIDs(from, count, ribbon, inclusive){ } }) } - // XXX check if this is empty... ribbon = DATA.ribbons[ribbon] + // ribbon this is empty... + if(ribbon.length == 0){ + return [] + } if(count > 0){ var c = inclusive == null ? 1 : 0 var start = ribbon.indexOf(from) + c @@ -850,7 +853,12 @@ function splitData(data, gid1){ // XXX revise... for(var j=0; j