Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (45 sloc) 1.69 KB
<!DOCTYPE HTML>
<html>
<head>
<title>Graphomatic</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.1.1/build/cssreset/reset-min.css">
<link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Molengo" rel="stylesheet" type="text/css">
<link href="{{static_url('css/graphomatic.css')}}" rel="stylesheet" type="text/css">
<script src="{{static_url('js/jquery-1.4.2.js')}}"></script>
<script src="{{static_url('js/raphael.js')}}"></script>
<script src="{{static_url('js/graphomatic.js')}}"></script>
</head>
<body>
<h1>Graphomatic</h1>
<div id="graph" width="800" height="600"></div>
This demonstrates an animated SVG graph, with data pushed to the client
using the <a href="http://dev.w3.org/html5/websockets/">WebSocket</a>
protocol. You&#8217;ll need a relatively bleeding-edge browser with
WebSocket support (this has been tested on Chrome 6 and a recent Firefox
nightly).
<br>
<button id="stop">connect</button>
<script type="text/javascript">
$(document).ready(function () {
G.initialize();
G.start_running();
var b = document.getElementById('stop');
b._running = true;
b.innerHTML = 'disconnect';
$('#stop').click(function (evt) {
evt.preventDefault();
if (b._running) {
G.stop_running();
b.innerHTML = 'connect'
b._running = false;
} else {
G.start_running();
b.innerHTML = 'disconnect'
b._running = true;
}
});
});
</script>
</body>
</html>