From 5afcdfb9c48cc57198e2db98c033946908622a9e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 26 Mar 2018 20:02:58 +0300 Subject: [PATCH] notes and cleanup... Signed-off-by: Alex A. Naanou --- ui (gen4)/imagegrid/data.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ui (gen4)/imagegrid/data.js b/ui (gen4)/imagegrid/data.js index 334279c9..c87b1a1a 100755 --- a/ui (gen4)/imagegrid/data.js +++ b/ui (gen4)/imagegrid/data.js @@ -2384,8 +2384,10 @@ var DataPrototype = { // NOTE: this will merge the items in-place, into the method's object; // if it is needed to keep the original intact, just .clone() it... // - // XXX test more complex cases... - // XXX add a 'gid' align mode... + // XXX add a 'gid' align mode... (???) + // ...or should this be a .merge(..) action??? + // XXX do we need to take care of gid conflicts between merged data sets??? + // ...now images with matching gids will simply be overwritten. join: function(...args){ var align = typeof(args[0]) == typeof('str') || args[0] == null ? args.shift() @@ -2409,18 +2411,15 @@ var DataPrototype = { var d = base.ribbon_order.length - data.ribbon_order.length } - var t = 0 - // merge order... - // XXX need to take care of gid conflicts... + // XXX need to take care of gid conflicts... (???) base.order = base.order.concat(data.order) // merge .ribbons and .ribbon_order... - // // NOTE: this is a special case, so we do not handle it in // the .eachImageList(..) below. the reason being that // ribbons can be merged in different ways. - // NOTE: we will reuse gids of some ribbons... (XXX???) + // NOTE: we will reuse gids of ribbons that did not change... var n_base = d > 0 ? base.getRibbonOrder('base') : data.getRibbonOrder('base') @@ -2453,15 +2452,14 @@ var DataPrototype = { } // do the actual merge... - // NOTE: the tails will take care of themselves via the - // defaults... + // + // NOTE: the tails will take care of themselves here... n_ribbons[gid] = (base.ribbons[bg] || []) .concat(data.ribbons[dg] || []) n_ribbon_order.push(gid) i++ } - // set the new data... base.ribbon_order = n_ribbon_order base.ribbons = n_ribbons