fixed a bug introduced in the last several commits...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-09-14 03:30:01 +04:00
parent 62fe751973
commit 3f8f7eb45f
2 changed files with 9 additions and 3 deletions

View File

@ -1535,6 +1535,8 @@ function getAllData(){
// NOTE: this will not update .current state...
// NOTE: when keep_ribbons is set, this may generate empty ribbons...
//
// XXX should this set the .current to anything but null or the first elem???
function makeCroppedData(gids, keep_ribbons){
var res = {
@ -1563,14 +1565,17 @@ function makeCroppedData(gids, keep_ribbons){
}
// NOTE: if keep_ribbons is not set this will ALWAYS build a single ribbon
// data-set...
function cropDataTo(gids, keep_ribbons){
var prev_state = DATA
var cur = DATA.current
var r = getRibbonIndex()
CROP_STACK.push(prev_state)
DATA = makeCroppedData(gids, keep_ribbons)
cur = getGIDBefore(cur)
cur = getGIDBefore(cur, keep_ribbons ? r : 0)
cur = cur == null ? gids[0] : cur
DATA.current = cur

View File

@ -115,6 +115,7 @@ function flashIndicator(direction){
}
// XXX need to get the real base ribbon....
function showRibbonIndicator(){
var cls = '.ribbon-indicator'
var indicator = $(cls)
@ -150,8 +151,8 @@ function flashRibbonIndicator(){
return flashing_indicator
.show()
.delay(100)
.fadeOut(300)
.delay(200)
.fadeOut(500)
}