diff options
Diffstat (limited to 'templates/cytoscape.html')
-rw-r--r-- | templates/cytoscape.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/templates/cytoscape.html b/templates/cytoscape.html index fd2000e..c0c6bf6 100644 --- a/templates/cytoscape.html +++ b/templates/cytoscape.html @@ -22,7 +22,7 @@ css: { 'content': 'data(sentCnt)', 'curve-style': 'bezier', - 'opacity': '0.3' + 'opacity': 'mapData(sentCnt, 1, 50, 0.2, 0.3)', } }, { selector: 'node.highlight', @@ -50,6 +50,7 @@ name: 'circle' } }); + cy.on('tap', 'edge', function(){ try { // your browser may block popups window.open( this.data('url') ); @@ -57,6 +58,13 @@ window.location.href = this.data('url'); } }); + cy.on('tap', 'node', function(){ + try { // your browser may block popups + window.open( this.data('url') ); + } catch(e){ // fall back on url change + window.location.href = this.data('url'); + } + }); cy.on('mouseover', 'node', function(e){ var sel = e.target; cy.elements().difference(sel.outgoers()).not(sel).addClass('semitransp'); |