egroupware/api/js/jquery/TouchSwipe/demos/Pinch_status.html

51 lines
2.3 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<!--
NOTE viewport is set so user can scale
-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
<link href="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css" rel="stylesheet" />
<link href="css/main.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<script type="text/javascript" src="../jquery.touchSwipe.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<title>touchSwipe</title>
</head>
<body>
<a href="https://github.com/mattbryson"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub"></a>
<div class="container">
<script id='code_1'>
$(function() {
$("#test").swipe( {
pinchStatus:function(event, phase, direction, distance , duration , fingerCount, pinchZoom, fingerData) {
$(this).html("Pinch zoom " + pinchZoom + " <br/>Distance pinched " + distance +" <br/>Direction " + direction);
},
fingers:2,
threshold:0
});
});
</script>
<span class='title'></span>
<h4>events: <span class='events'><code>pinchStatus</code></span></h4>
<p>You can also get the current status of a <code>pinch</code>, which can be used in place of the other pinch methods. The <code>pinchStatus</code> reports <code>phase</code>, <code>direction</code>, <code>distance</code>, <code>duration</code>, <code>fingerCount</code> and <code>pinchZoom</code>.</p>
<button class='btn btn-small btn-info example_btn'>Jump to Example</button>
<pre class="prettyprint" data-src='code_1'></pre>
<span class='navigation'></span>
<div id="test" class="box">Pinch me</div>
<span class='navigation'></span>
</div>
</body>
</html>