Skip to content

Instantly share code, notes, and snippets.

@maxkfranz
maxkfranz / code.js
Last active April 28, 2017 14:10
Initialisation
document.addEventListener('DOMContentLoaded', function(){ // on dom ready
var cy = cytoscape({
container: document.querySelector('#cy'),
boxSelectionEnabled: false,
autounselectify: true,
style: cytoscape.stylesheet()
.selector('node')
@maxkfranz
maxkfranz / tokyo-railways-style.cycss
Last active August 29, 2015 14:08
tokyo-railways-style.cycss
node {
background-color: white;
border-color: black;
content: data(station_name);
width: 20;
height: 20;
min-zoomed-font-size: 12;
color: #fff;
font-size: 16;
}
@maxkfranz
maxkfranz / tokyo-railways.json
Created October 27, 2014 17:47
tokyo-railways.json
This file has been truncated, but you can view the full file.
{
"format_version" : "1.0",
"generated_by" : "cytoscape-3.1.1",
"target_cytoscapejs_version" : "~2.1",
"data" : {
"selected" : true,
"__Annotations" : [ "" ],
"shared_name" : "main_islands_japan(1)",
"SUID" : 20760,
"name" : "tokyo_only"
@maxkfranz
maxkfranz / index.html
Last active April 11, 2017 18:30
Tokyo railways demo
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Tokyo railways]" />
<meta charset=utf-8 />
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">
<title>Tokyo railways</title>
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="http://cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.0/jquery.qtip.min.css" rel="stylesheet" />
<link href="style.css" rel="stylesheet">