Skip to content

Commit

Permalink
reorganising demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jairajs89 committed Feb 17, 2012
1 parent e8e00aa commit 767206f
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
background: #000;
border-radius: 12px;
}

.line {
z-index: 2;
position: absolute;
width: 25px;
background: #000;
border-radius: 12px;
}
</style>
</head>

Expand All @@ -37,15 +45,15 @@

var touchMe = document.getElementById('touch-me');

Touchy(touchMe, function (hand, finger) {
function drawPoint (point) {
var elem = document.createElement('div');
elem.className = 'point';
elem.style.top = point.y + 'px';
elem.style.left = point.x + 'px';
touchMe.appendChild(elem);
}
function drawPoint (point) {
var elem = document.createElement('div');
elem.className = 'point';
elem.style.top = point.y + 'px';
elem.style.left = point.x + 'px';
touchMe.appendChild(elem);
}

Touchy(touchMe, function (hand, finger) {
finger.on('start', drawPoint);
finger.on('move' , drawPoint);
finger.on('end' , drawPoint);
Expand Down

0 comments on commit 767206f

Please sign in to comment.