-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathrealtaptest.html
More file actions
114 lines (78 loc) · 4.68 KB
/
realtaptest.html
File metadata and controls
114 lines (78 loc) · 4.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>DeepTissue.js - Tap Demo/Reference</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="A JavaScript Library to Abstract MSPointer and WebKit Touch APIs" name="description">
<meta content="Chris Love" name="author">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="favicon.ico" rel="shortcut icon">
<link href="img/h/apple-touch-icon.png" rel="apple-touch-icon-precomposed" sizes="114x114">
<link href="img/m/apple-touch-icon.png" rel="apple-touch-icon-precomposed" sizes="72x72">
<link href="img/l/apple-touch-icon-precomposed.png" rel="apple-touch-icon-precomposed">
<link href="img/l/apple-touch-icon.png" rel="shortcut icon">
<meta name="application-name" content="Deeptissue.js" />
<meta name="msapplication-TileColor" content="#0094ff" />
<meta name="msapplication-TileImage" content="msTouchIcon.png" />
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="google-site-verification" content="HfjA5xFE0XGLpBTctB2Vd6IglorXsjJpIImhE1H3yLU" />
<script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")</script>
<link href="img/l/splash.png" rel="apple-touch-startup-image">
<meta content="on" http-equiv="cleartype">
<link href="css/site.css?v=1" rel="stylesheet">
</head>
<body>
<header>
<a href="/" title="Deeptissue.js a Touch Library" class="no-decor">
<img src="img\m\apple-touch-icon.png" alt="deeptissue.js" class="site-logo" /><h1>Deeptissue.js</h1></a>
<h2>A Gesture Abstraction Library for both MSPointer and WebKit Touch APIs</h2>
<nav>
<a href="realtaptest.html" class="active">TAP</a>
<a href="realmovetest.html">MOVE</a>
<a href="realrotatetests.html">ROTATE</a>
<a href="realswipetest.html">SWIPE</a>
<a href="realscaletest.html">SCALE</a>
</nav>
</header>
<a class="touch-area sgl-tap">Single Tap</a>
<section class="touch-area dbl-tap"> Double Tap</section>
<section class="touch-area tap-hold">Tap Hold</section>
<section class="touch-log">Log Goes Here</section>
<script src="js/dev/mbp.js" type="text/javascript"></script>
<script src="js/dev/deeptissue.js" type="text/javascript"></script>
<script type="text/javascript">
var tl = document.querySelector(".touch-log"),
dt = deeptissue(document.querySelectorAll(".sgl-tap")),
dbt = deeptissue(document.querySelectorAll(".dbl-tap")),
th = deeptissue(document.querySelectorAll((".tap-hold")));
dt.tap(function (evt) {
tl.textContent = "Single Tap" + tl.textContent;
console.log(evt.type);
console.log(evt.screenX);
console.log(evt.screenY);
});
dbt.dblTap(function (evt){
tl.textContent = "Double Tap" + tl.textContent;
});
th.tapHold(function (evt) {
tl.textContent = "Tap Hold" + tl.textContent;
}, function (evt) {
tl.textContent = "Tap Hold End" + tl.textContent;
}, function (evt) {
tl.textContent = "Tap Hold Cancel" + tl.textContent;
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-83556-6']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>