Commit 0899803a authored by PkSM3's avatar PkSM3

bugfix for sliders-algo

parent efea6a63
...@@ -549,6 +549,22 @@ function changeLevel_old() { ...@@ -549,6 +549,22 @@ function changeLevel_old() {
// EdgeWeightFilter("#sliderAEdgeWeight", "label" , "nodes1", "weight"); // EdgeWeightFilter("#sliderAEdgeWeight", "label" , "nodes1", "weight");
// EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight"); // EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight");
function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) { function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
// console.log("")
// console.log("")
// console.log(" - - - - EdgeWeightFilter - - - ")
// console.log( "sliderDivID:" )
// console.log( sliderDivID )
// console.log( "type_attrb:" )
// console.log( type_attrb )
// console.log( "type:" )
// console.log( type )
// console.log( "criteria:" )
// console.log( criteria )
// console.log(" - - - - /EdgeWeightFilter - - - ")
// console.log("")
// console.log("")
// if ($(sliderDivID).html()!="") { // if ($(sliderDivID).html()!="") {
// pr("\t\t\t\t\t\t[[ algorithm not applied "+sliderDivID+" ]]") // pr("\t\t\t\t\t\t[[ algorithm not applied "+sliderDivID+" ]]")
// return; // return;
...@@ -858,7 +874,14 @@ function NodeWeightFilter( categories , sliderDivID , type_attrb , type , crit ...@@ -858,7 +874,14 @@ function NodeWeightFilter( categories , sliderDivID , type_attrb , type , crit
function getGraphElement(elem) { function getGraphElement(elem) {
if(elem.split(";").length==1) return partialGraph._core.graph.nodesIndex[elem]; if(elem.split(";").length==1) return partialGraph._core.graph.nodesIndex[elem];
else return partialGraph._core.graph.edgesIndex[elem] else {
if(!isUndef(partialGraph._core.graph.edgesIndex[elem]))
return partialGraph._core.graph.edgesIndex[elem]
else {
var newID = elem.split(";")
return partialGraph._core.graph.edgesIndex[newID[1]+";"+newID[0]]
}
}
} }
// Execution modes: // Execution modes:
// AlgorithmForSliders ( partialGraph._core.graph.edges , "label" , "nodes1" , "weight") // AlgorithmForSliders ( partialGraph._core.graph.edges , "label" , "nodes1" , "weight")
...@@ -866,6 +889,15 @@ function getGraphElement(elem) { ...@@ -866,6 +889,15 @@ function getGraphElement(elem) {
// AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "Document" , "size") // AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "Document" , "size")
// AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "NGram" , "size") // AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "NGram" , "size")
function AlgorithmForSliders( elements , type_attrb , type , criteria) { function AlgorithmForSliders( elements , type_attrb , type , criteria) {
// console.clear()
// console.log( "\t - - - - - AlgorithmForSliders - - - - -" )
// console.log( "" )
// console.log( "elements:" )
// console.log( elements )
// console.log( "type_attrb: " + type_attrb )
// console.log( "type: "+type )
// console.log( "criteria: "+criteria )
// // ( 1 ) // // ( 1 )
// // get visible sigma nodes|edges // // get visible sigma nodes|edges
if(isUndef(elements)) return {"steps":0 , "finalarray":[]}; if(isUndef(elements)) return {"steps":0 , "finalarray":[]};
......
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