Commit d5ebd7ae authored by Romain Loth's avatar Romain Loth

better filter sliders

use of edges(eid).hidden makes filters faster + rationalize function signatures + remove comments
parent 38b878f4
...@@ -751,7 +751,6 @@ var TinaWebJS = function ( sigmacanvas ) { ...@@ -751,7 +751,6 @@ var TinaWebJS = function ( sigmacanvas ) {
this.style.cursor = 'wait' this.style.cursor = 'wait'
// and waiting icon // and waiting icon
this.insertBefore(createWaitIcon('noverlapwait'), this.children[0]) this.insertBefore(createWaitIcon('noverlapwait'), this.children[0])
var listener = TW.partialGraph.startNoverlap(); var listener = TW.partialGraph.startNoverlap();
var noverButton = this var noverButton = this
listener.bind('stop', function(event) { listener.bind('stop', function(event) {
...@@ -1080,8 +1079,7 @@ var TinaWebJS = function ( sigmacanvas ) { ...@@ -1080,8 +1079,7 @@ var TinaWebJS = function ( sigmacanvas ) {
// for context: family/type prop value, // for context: family/type prop value,
// for values: the property to filter // for values: the property to filter
NodeWeightFilter ( `#slidercat${activeId}nodesweight` , NodeWeightFilter ( `#slidercat${activeId}nodesweight` ,
TW.categories[activeId] , TW.categories[activeId]
"size"
); );
// ex: #slidercat1edgesweight // ex: #slidercat1edgesweight
......
This diff is collapsed.
...@@ -52,7 +52,7 @@ TW.pushState = function( args ) { ...@@ -52,7 +52,7 @@ TW.pushState = function( args ) {
$(".for-nodecategory-0").show() $(".for-nodecategory-0").show()
$(".for-nodecategory-1").hide(); $(".for-nodecategory-1").hide();
NodeWeightFilter( "#slidercat0nodesweight" , TW.categories[0], "size"); NodeWeightFilter( "#slidercat0nodesweight" , TW.categories[0]);
EdgeWeightFilter("#slidercat0edgesweight", typesKey, "weight"); EdgeWeightFilter("#slidercat0edgesweight", typesKey, "weight");
} }
...@@ -61,7 +61,7 @@ TW.pushState = function( args ) { ...@@ -61,7 +61,7 @@ TW.pushState = function( args ) {
$(".for-nodecategory-0").hide() $(".for-nodecategory-0").hide()
$(".for-nodecategory-1").show(); $(".for-nodecategory-1").show();
NodeWeightFilter( "#slidercat1nodesweight" , TW.categories[1], "size"); NodeWeightFilter( "#slidercat1nodesweight" , TW.categories[1]);
EdgeWeightFilter("#slidercat1edgesweight", typesKey, "weight"); EdgeWeightFilter("#slidercat1edgesweight", typesKey, "weight");
} }
...@@ -69,10 +69,11 @@ TW.pushState = function( args ) { ...@@ -69,10 +69,11 @@ TW.pushState = function( args ) {
if(typesKey=="1|1") { if(typesKey=="1|1") {
$(".for-nodecategory-0").show() $(".for-nodecategory-0").show()
$(".for-nodecategory-1").show(); $(".for-nodecategory-1").show();
NodeWeightFilter( "#slidercat0nodesweight" , TW.categories[0], "size"); NodeWeightFilter( "#slidercat0nodesweight" , TW.categories[0]);
NodeWeightFilter( "#slidercat1nodesweight" , TW.categories[1], "size"); NodeWeightFilter( "#slidercat1nodesweight" , TW.categories[1]);
// only truly bipartite edges => only one GUI slider // only truly bipartite edges => only one GUI slider
showDisabledSlider("#slidercat0edgesweight")
EdgeWeightFilter("#slidercat1edgesweight", "1|1", "weight"); EdgeWeightFilter("#slidercat1edgesweight", "1|1", "weight");
} }
} }
......
...@@ -570,7 +570,9 @@ var SigmaUtils = function () { ...@@ -570,7 +570,9 @@ var SigmaUtils = function () {
this.toggleEdges(false) this.toggleEdges(false)
} }
TW.partialGraph.startForceAtlas2(); try {
TW.partialGraph.startForceAtlas2();
} catch(e) {return}
var icon = createWaitIcon('layoutwait') var icon = createWaitIcon('layoutwait')
var btn = document.querySelector('#layoutButton') var btn = document.querySelector('#layoutButton')
......
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