From 6d202e7e96eb5d5e4bdee8cdd3f1256a2c5b40a9 Mon Sep 17 00:00:00 2001 From: Pitchaya Boonsarngsuk Date: Wed, 14 Mar 2018 18:01:24 +0000 Subject: [PATCH] Remove intercom, fix iris --- examples/js/distances/distance.js | 2 +- examples/js/example-papaparsing.js | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/js/distances/distance.js b/examples/js/distances/distance.js index 14d26ac..c019527 100644 --- a/examples/js/distances/distance.js +++ b/examples/js/distances/distance.js @@ -20,7 +20,7 @@ function calculateDistance(source, target, properties, normArgs) { for (var i = 0; i < properties.length; i++) { property = properties[i]; if (source.hasOwnProperty(property) && target.hasOwnProperty(property) - && property.toLowerCase() !== "index" ) { + && property.toLowerCase() !== "index" && property.toLowerCase() !== "type") { var s = source[property], t = target[property]; diff --git a/examples/js/example-papaparsing.js b/examples/js/example-papaparsing.js index f7ccc00..319d2aa 100644 --- a/examples/js/example-papaparsing.js +++ b/examples/js/example-papaparsing.js @@ -20,9 +20,9 @@ svg.append("g") .attr("class", "brush") .call(brush); -var intercom = Intercom.getInstance(); +//var intercom = Intercom.getInstance(); -intercom.on("select", unSelectNodes); +//intercom.on("select", unSelectNodes); var nodes, // as in Data points node, // as in SVG object that have all small circles on screen @@ -106,7 +106,6 @@ function processData(data, error) { // Calculate normalization parameters for distance fns norm = calculateNormalization(nodes); props = Object.keys(nodes[0]); // Properties to consider by distance fn - props.pop(); //Hide Iris index / last column from the distance function COLOR_ATTRIBUTE = props[props.length-1]; @@ -116,6 +115,8 @@ function processData(data, error) { opts.add(new Option(d, d, (d === COLOR_ATTRIBUTE) ? true : false)); }); opts.selectedIndex = props.length-1; + //props.pop(); //Hide Iris index / last column from the distance function + //Put the nodes at (0,0) nodes.forEach(function (d) { @@ -192,9 +193,9 @@ function ticked() { }); } // Legacy: Emit the distribution data to allow the drawing of the bar graph - if (springForce) { - intercom.emit("passedData", simulation.force(forceName).distributionData()); - } + //if (springForce) { + // intercom.emit("passedData", simulation.force(forceName).distributionData()); + //} if(manualStop && alreadyRanIterations == ITERATIONS) { ended(); } @@ -244,7 +245,7 @@ function brushEnded() { results = sel.map(function (a) { return a.index; }); } - intercom.emit("select", { name: fileName, indices: results }); + //intercom.emit("select", { name: fileName, indices: results }); d3.select(".brush").call(brush.move, null); }