Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: sky/examples/touch-demo.sky

Issue 847873003: Add support for touch events to sky_viewer (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/viewer/converters/input_event_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <sky>
2 <div id="log">Ready</div>
3 <script>
4 function logTouchEvent(evt) {
5 var message = "type=" + event.type;
6 if (evt.touches && evt.touches.length > 0)
7 message += " x=" + evt.touches[0].clientX + " y=" + evt.touches[0].clientY;
8 document.getElementById("log").textContent = message;
9 }
10
11 document.documentElement.addEventListener("touchstart", logTouchEvent);
12 document.documentElement.addEventListener("touchmove", logTouchEvent);
13 document.documentElement.addEventListener("touchend", logTouchEvent);
14 document.documentElement.addEventListener("touchcancel", logTouchEvent);
15 </script>
16 </sky>
OLDNEW
« no previous file with comments | « no previous file | sky/viewer/converters/input_event_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698