Commit a86e1357 authored by Romain Loth's avatar Romain Loth

tidy up

parent de26dc86
......@@ -86,7 +86,7 @@ function ChangeGraphAppearanceByAtt( manualflag ) {
if(att_s == "age") the_method = "colorsRelByBins"
div_info += '<li><a href="#" onclick=\''+the_method+'("'+att_s+'")\'>By '+att_s+'('+att_c+')'+'</a></li>'
console.log('<li><a href="#" onclick=\''+the_method+'("'+att_s+'")\'>By '+att_s+'('+att_c+')'+'</a></li>')
// console.log('<li><a href="#" onclick=\''+the_method+'("'+att_s+'")\'>By '+att_s+'('+att_c+')'+'</a></li>')
}
div_info += ' </ul>'
div_info += ' </li>'
......
// Function.prototype.index
(function(reComments, reParams, reNames) {
Function.prototype.index = function(arrParamNames) {
var fnMe = this;
arrParamNames = arrParamNames
|| (((fnMe + '').replace(reComments, '')
.match(reParams)[1] || '')
.match(reNames) || []);
return function(namedArgs) {
var args = [], i = arrParamNames.length;
args[i] = namedArgs;
while(i--) {
args[i] = namedArgs[arrParamNames[i]];
}
return fnMe.apply(this, args);
};
};
})(
/\/\*[\s\S]*?\*\/|\/\/.*?[\r\n]/g,
/\(([\s\S]*?)\)/,
/[$\w]+/g
);
// for new SigmaUtils
// new sigma.js: POSS to use autoResize global setting
......
// Function.prototype.index
// ---
// 'decorator'
// (used here and in Tinaweb.js for MultipleSelection2)
// ---
// transforms calls like foobar({arg1:a, arg2:b})
// into calls like foobar(a, b)
(function(reComments, reParams, reNames) {
Function.prototype.index = function(arrParamNames) {
var fnMe = this;
......@@ -390,14 +396,6 @@ if(RES["OK"]) {
// REFA new sigma.js
TW.partialGraph.camera.goTo({x:0, y:0, ratio:.8, angle: 0})
// TW.partialGraph.goTo(TW.partialGraph._core.width / 2, TW.partialGraph._core.height / 2, .8).draw();
// TW.partialGraph.zoomTo(
// TW.partialGraph._core.width / 2,
// TW.partialGraph._core.height / 2, TW.partialGraph.camera.ratio
// ).draw();
// fa2enabled=true; TW.partialGraph.zoomTo(TW.partialGraph._core.width / 2, TW.partialGraph._core.height / 2, 0.8).draw();
// $.doTimeout(1,function(){
......
......@@ -16,12 +16,14 @@ function cancelSelection (fromTagCloud) {
if (TW.partialGraph.settings('drawEdges')) {
e = TW.partialGraph.graph.edges();
for(i=0;i<e.length;i++){
// console.log("cancelSelection: edge", e[i])
if (e[i]) {
// e[i].color = e[i].customAttrs['grey'] ? e[i].customAttrs['true_color'] : e[i].color;
e[i].color = e[i].customAttrs['true_color'];
e[i].color = e[i].customAttrs['grey'] ? e[i].customAttrs['true_color'] : e[i].color;
// e[i].color = e[i].customAttrs['true_color'];
e[i].customAttrs['grey'] = 0;
}
}
}
......@@ -225,7 +227,7 @@ function htmlfied_alternodes(elems) {
function manualForceLabel(nodeid,active) {
// console.log("manual|"+nodeid+"|"+active)
TW.partialGraph.graph.nodes(nodeid).active=active;
TW.partialGraph.draw();
TW.partialGraph.refresh({skipIndexation:true});
}
function htmlfied_samenodes(elems) {
......@@ -579,7 +581,7 @@ function hideEverything(){
nodes[j].hidden=true;
}
if (TW.partialGraph.settings('drawEdges')) {
var edges = TW.partialGraph.edges()
var edges = TW.partialGraph.graph.edges()
for(var i in edges){
edges[i].hidden=true;
}
......
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