From 1e67e9000e44c37d8798791aaef6164675a4ef4d Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 1 Jul 2016 07:27:04 +0300 Subject: [PATCH] another bug fixed... Signed-off-by: Alex A. Naanou --- ui (gen4)/imagegrid/data.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui (gen4)/imagegrid/data.js b/ui (gen4)/imagegrid/data.js index c3a3f315..367fe187 100755 --- a/ui (gen4)/imagegrid/data.js +++ b/ui (gen4)/imagegrid/data.js @@ -2051,8 +2051,6 @@ var DataPrototype = { // similar to .getImageOrder(..) default but different form // .getImage(..) // NOTE: if no target is given this will assume the current image. - // - // XXX do .eachImageList(..) split: function(target){ if(arguments.length > 1){ target = Array.apply(null, arguments) @@ -2073,9 +2071,10 @@ var DataPrototype = { n.base = tail.base n.ribbon_order = tail.ribbon_order.slice() n.order = tail.order.splice(0, i) - for(var k in tail.ribbons){ - n.ribbons[k] = tail.ribbons[k].splice(0, i) - } + tail.eachImageList(function(lst, key, set){ + n[set] = n[set] || {} + n[set][key] = lst.splice(0, i) + }) n.current = n.order.indexOf(tail.current) >= 0 ? tail.current : n.order[0] res.push(n)