Commit 74cd2705 authored by Romain Loth's avatar Romain Loth

utils added for tstamp and edgeinfos

parent f1b8f01a
......@@ -22,6 +22,11 @@ function isNumeric(a) {
return parseFloat(a) == a ;
}
// seconds since page load
function tstamp() {
return parseInt(performance.now()) ;
}
//python range(a,b) | range(a)
function calc_range(begin, end) {
if (typeof end === "undefined") {
......
......@@ -219,7 +219,7 @@ SigmaUtils = function () {
// active edges look well with no opacity
color = `rgb(${baseRGB})`
// edge.customAttrs.activeEdge = false // for one-time
// console.debug(`t=${tstamp()} curve render activeedge: ${edgeInfos(edge)})`)
}
else if (edge.customAttrs.grey) {
color = TW.edgeGreyColor
......@@ -692,6 +692,11 @@ function getArrSubkeys(arr,id) {
return result;
}
// for logs
function edgeInfos(anEdge) {
return `${anEdge.id} (${TW.Nodes[anEdge.source].label} -> ${TW.Nodes[anEdge.target].label})` ;
}
function clustersBy(daclass) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment