Test readme linking

This commit is contained in:
Pitchaya Boonsarngsuk
2018-01-31 20:00:31 +00:00
parent f89b3e5e88
commit 2ca7a61dc7
2 changed files with 26 additions and 10 deletions

View File

@@ -118,7 +118,7 @@ function processData(data, error) {
});
opts.selectedIndex = props.length-1;
props.pop(); //Hide Iris index / last column from distance function
//props.pop(); //Hide Iris index / last column from distance function
//Put the nodes in random starting positions
//TODO Change this back
@@ -138,6 +138,8 @@ function processData(data, error) {
simulation
.nodes(nodes)
.stop();
ticked();
};
function addNodesToDOM(data) {
@@ -152,7 +154,7 @@ function addNodesToDOM(data) {
// it is a CLASS property).
.attr("fill", function (d) {
return color(d[COLOR_ATTRIBUTE]);
})
})/*
.on("mouseover", function (d) {
div.transition()
.duration(200)
@@ -171,6 +173,7 @@ function addNodesToDOM(data) {
node.attr("opacity", 1);
})
.on("click", function (d) {
console.log("click", clickedIndex);
if (clickedIndex !== d.index) {
if (springForce) {
highlightNeighbours(Array.from(simulation.force(forceName).nodeNeighbours(d.index).keys()));
@@ -180,13 +183,13 @@ function addNodesToDOM(data) {
node.attr("r", NODE_SIZE).attr("stroke-width", 0);
clickedIndex = -1;
}
});
})*/;
if (selectedData)
unSelectNodes(selectedData);
}
function ticked() {
console.log("ticked");
//console.log("ticked");
alreadyRanIterations++;
// If rendering is selected, then draw at every iteration.
if (rendering === true) {
@@ -236,6 +239,7 @@ function ended() {
}
function brushEnded() {
console.log("brushEnded");
var s = d3.event.selection,
results = [];
@@ -269,6 +273,7 @@ function brushEnded() {
* @param {*} node
*/
function formatTooltip(node) {
console.log("formatTooltip", node);
var textString = "",
temp = "";
@@ -287,6 +292,7 @@ function formatTooltip(node) {
* Halt the execution.
*/
function stopSimulation() {
console.log("stopSimulation");
simulation.stop();
if (typeof hybridSimulation !== 'undefined') {
hybridSimulation.stop();
@@ -299,6 +305,7 @@ function stopSimulation() {
* @return {number} the mean of the array.
*/
function getAverage(array) {
console.log("getAverage", array);
var total = 0;
for (var i = 0; i < array.length; i++) {
total += array[i];
@@ -311,7 +318,7 @@ function getAverage(array) {
* @param {*} data
*/
function unSelectNodes(data) {
console.log("unSelectNodes", data);
selectedData = data;
if (fileName === data.name && nodes) {
node
@@ -369,7 +376,7 @@ function colorToAttribute() {
/**
* Update the distance range.
*/
function updateDistanceRange() {
if (springForce) {
simulation.force(forceName).distanceRange(SELECTED_DISTANCE);
@@ -401,7 +408,7 @@ function pauseUnPause() {
* @param {*} dataNodes
* @param {*} properties
* @param {*} normalization
*/
function calculateAverageDistance(dataNodes, properties, normalization) {
var sum = 0,
n = nodes.length;
@@ -418,4 +425,4 @@ function calculateAverageDistance(dataNodes, properties, normalization) {
}
return sum / n;
}
}*/