Permalink
Browse files

fixed rotation examples to comply with w3c css

  • Loading branch information...
fisherwebdev committed Apr 11, 2013
1 parent fc87eef commit e3970e401902d058ea40135f4bf2e9ef9bc27ac0
Showing with 12 additions and 12 deletions.
  1. +11 −11 examples/wheel-inertia.html
  2. +1 −1 examples/wheel.html
@@ -2,16 +2,16 @@
<html>
<head>
<meta charset="utf-8">
<title>Touchy : Wheel with Inertia</title>
<meta name="description" content="An example use of the touchy.js jQuery plugin. In this example we create a wheel interface that may be manipulated intuitively by a single finger gesture.">
<meta name="author" content="Bill Fisher">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="author" content="Bill Fisher">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="HandheldFriendly" content="true" />
<style type="text/css">
* {
-webkit-touch-callout: none;
@@ -60,15 +60,15 @@
<h1>Wheel : Single Finger Rotation with Inertia</h1>
<div id="wheel"></div>
</div>
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write("<script src='../lib/jquery-1.7.2.min.js'>\x3C/script>")</script>
<script src="../jquery.touchy.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var degs = 0,
@@ -84,13 +84,13 @@ <h1>Wheel : Single Finger Rotation with Inertia</h1>
break;
case 'move':
degs += data.degreeDelta;
$target.css('webkitTransform','rotate3d(0,0,0,'+ degs +'deg)');
rotate(degs);
break;
case 'end':
inertiaMotion = true;
velocity = data.velocity;
releaseRadius =
spin(velocity);
releaseRadius =
spin(velocity);
}
};
@@ -110,7 +110,7 @@ <h1>Wheel : Single Finger Rotation with Inertia</h1>
};
var rotate = function (degrees) {
$target.css('webkitTransform','rotate3d(0,0,0,'+ degrees +'deg)');
$target.css('webkitTransform','rotate3d(0,0,1,'+ degrees +'deg)');
};
$('#wheel').bind('touchy-rotate', handleTouchyRotate);
View
@@ -74,7 +74,7 @@ <h1>Wheel : Single Finger Rotation</h1>
var handleTouchyRotate = function (e, phase, $target, data) {
if (phase === 'move') {
degs += data.degreeDelta;
$target.css('webkitTransform','rotate3d(0,0,0,'+ degs +'deg)'); // 3d transforms are not working on the galaxy tab 7" ?
$target.css('webkitTransform','rotate3d(0,0,1,'+ degs +'deg)'); // 3d transforms are not working on the galaxy tab 7" ?
//$target.css('webkitTransform','rotate('+ degs +'deg) transformZ(0)'); // check this out. much worse on motorola xoom.
}

0 comments on commit e3970e4

Please sign in to comment.