From ef2bc3c38c3b452a8efd30a5b58652ca5dab99fd Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 25 Nov 2013 05:22:31 +0400 Subject: [PATCH] more refactoring... Signed-off-by: Alex A. Naanou --- ui/data.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/data.js b/ui/data.js index 80db5b9c..402f6721 100755 --- a/ui/data.js +++ b/ui/data.js @@ -1261,7 +1261,7 @@ function updateImages(size){ // XXX Race condition: when this is called while DATA is not yet fully // loaded (old data), the from gid will not be present in // DATA.ribbons... -function getGIDsAfter(from, count, ribbon, inclusive){ +function getGIDsAfter(count, from, ribbon, inclusive){ if(count == 0){ return [] } @@ -1490,7 +1490,7 @@ function rollImages(n, ribbon, extend, no_compensate_shift){ var from = n > 0 ? getImageGID(ribbon.find('.image').last()) : getImageGID(ribbon.find('.image').first()) - var gids = getGIDsAfter(from, n, r) + var gids = getGIDsAfter(n, from, r) if(gids.length == 0){ return $([]) } @@ -1588,8 +1588,8 @@ function preCacheRibbonImages(ribbon){ var first = getImageGID(images.first()) var last = getImageGID(images.last()) - var gids = getGIDsAfter(first, -cache_frame_size) - .concat(getGIDsAfter(last, cache_frame_size)) + var gids = getGIDsAfter(-cache_frame_size, first) + .concat(getGIDsAfter(cache_frame_size, last)) var cache = [] IMAGE_CACHE[i] = cache