Remove intercom, fix iris
This commit is contained in:
@@ -20,7 +20,7 @@ function calculateDistance(source, target, properties, normArgs) {
|
|||||||
for (var i = 0; i < properties.length; i++) {
|
for (var i = 0; i < properties.length; i++) {
|
||||||
property = properties[i];
|
property = properties[i];
|
||||||
if (source.hasOwnProperty(property) && target.hasOwnProperty(property)
|
if (source.hasOwnProperty(property) && target.hasOwnProperty(property)
|
||||||
&& property.toLowerCase() !== "index" ) {
|
&& property.toLowerCase() !== "index" && property.toLowerCase() !== "type") {
|
||||||
var s = source[property],
|
var s = source[property],
|
||||||
t = target[property];
|
t = target[property];
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ svg.append("g")
|
|||||||
.attr("class", "brush")
|
.attr("class", "brush")
|
||||||
.call(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
|
var nodes, // as in Data points
|
||||||
node, // as in SVG object that have all small circles on screen
|
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
|
// Calculate normalization parameters for distance fns
|
||||||
norm = calculateNormalization(nodes);
|
norm = calculateNormalization(nodes);
|
||||||
props = Object.keys(nodes[0]); // Properties to consider by distance fn
|
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];
|
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.add(new Option(d, d, (d === COLOR_ATTRIBUTE) ? true : false));
|
||||||
});
|
});
|
||||||
opts.selectedIndex = props.length-1;
|
opts.selectedIndex = props.length-1;
|
||||||
|
//props.pop(); //Hide Iris index / last column from the distance function
|
||||||
|
|
||||||
|
|
||||||
//Put the nodes at (0,0)
|
//Put the nodes at (0,0)
|
||||||
nodes.forEach(function (d) {
|
nodes.forEach(function (d) {
|
||||||
@@ -192,9 +193,9 @@ function ticked() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Legacy: Emit the distribution data to allow the drawing of the bar graph
|
// Legacy: Emit the distribution data to allow the drawing of the bar graph
|
||||||
if (springForce) {
|
//if (springForce) {
|
||||||
intercom.emit("passedData", simulation.force(forceName).distributionData());
|
// intercom.emit("passedData", simulation.force(forceName).distributionData());
|
||||||
}
|
//}
|
||||||
if(manualStop && alreadyRanIterations == ITERATIONS) {
|
if(manualStop && alreadyRanIterations == ITERATIONS) {
|
||||||
ended();
|
ended();
|
||||||
}
|
}
|
||||||
@@ -244,7 +245,7 @@ function brushEnded() {
|
|||||||
results = sel.map(function (a) { return a.index; });
|
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);
|
d3.select(".brush").call(brush.move, null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user