about summary refs log tree commit diff
path: root/templates/cytoscape.html
diff options
context:
space:
mode:
authorHao Chen2019-05-09 15:47:10 -0500
committerHao Chen2019-05-09 15:47:10 -0500
commit23e5c27d83d545fb1155ae9c0d558abe9c828c91 (patch)
treeb790b263c6bada6e2f98a1d70c95a490976bcfeb /templates/cytoscape.html
parent888e95f82ec96129257ff9064e9860a275fb7b15 (diff)
downloadgenecup-23e5c27d83d545fb1155ae9c0d558abe9c828c91.tar.gz
links from nodes
Diffstat (limited to 'templates/cytoscape.html')
-rw-r--r--templates/cytoscape.html10
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');