Skip to content

Instantly share code, notes, and snippets.

View dusadrian's full-sized avatar

Adrian Dușa dusadrian

View GitHub Profile
@dusadrian
dusadrian / draginthebox.html
Created July 16, 2011 16:19 — forked from cjheath/draginthebox.html
Shows how to restrict Raphael's dragging to a specified region, in this case, the canvas
<html>
<head>
<script src="https://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<body>
<div id="container" style="position:absolute;left:25%;right:25%;top:25%;bottom:25%;background-color:#DDD">
</div>
<script type='text/javascript'>
var container = $('#container');
@dusadrian
dusadrian / draginthebox.html
Created July 14, 2011 13:57 — forked from cjheath/draginthebox.html
Shows how to restrict Raphael's dragging to a specified region, in this case, the canvas
<html>
<head>
<script src="https://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<body>
<div id="container" style="position:absolute;left:25%;right:25%;top:25%;bottom:25%;background-color:#DDD">
</div>
<script type='text/javascript'>
var container = $('#container');