Variation of e.touches, e.targetTouches and e.changedTouches
We have the following lists:
- touches: A list of information for every finger currently touching the screen
- targetTouches: Like touches, but is filtered to only the information for finger touches that started out within the same node
- changedTouches: A list of information for every finger involved in the event (see below) To better understand what might be in these lists, let’s go over some examples quickly
They vary in the following pattern:
- When I put a finger down, all three lists will have the same information. It will be in changedTouches because putting the finger down is what caused the event
- When I put a second finger down, touches will have two items, one for each finger. targetTouches will have two items only if the finger was placed in the same node as the first finger. changedTouches will have the information related to the second finger, because it’s what caused the event
- If I put two fingers down at exactly the same time, it’s possible to have two items in changedTouches, one for each finger
- If I move my fingers, the only list that will change is changedTouches and will contain information related to as many fingers as have moved (at least one).
- When I lift a finger, it will be removed from touches, targetTouches and will appear in changedTouches since it’s what caused the event
- Removing my last finger will leave touches and targetTouches empty, and changedTouches will contain information for the last finger
Variation of e.touches, e.targetTouches and e.changedTouches的更多相关文章
- touch事件中的touches、targetTouches和changedTouches详解
touches: 当前屏幕上所有触摸点的列表; targetTouches: 当前对象上所有触摸点的列表; changedTouches: 涉及当前(引发)事件的触摸点的列表 通过一个例子来区分一下触 ...
- 移动的 touch事件中的touches、targetTouches和changedTouches
touches: 当前屏幕上所有触摸点的列表; targetTouches: 当前对象上所有触摸点的列表; changedTouches: 涉及当前(引发)事件的触摸点的列表 通过一个例子来区分一下触 ...
- touch事件中的touches、targetTouches和changedTouches
touches: 当前屏幕上所有触摸点的列表; targetTouches: 当前对象上所有触摸点的列表; changedTouches: 涉及当前(引发)事件的触摸点的列表; 通过一个例子来区分一下 ...
- 触屏touch事件记录
一.chrome中的Remote Debugging 一开始并没有用这个调试,不过后面需要多点触碰,可chrome模拟器中我没看到这个功能.突然看到了Remote Debugging,网站需要FQ才能 ...
- touches, targetTouches, changedTouches 区别
1. touches: A list of information for every finger currently touching the screen2. targetTouches: Li ...
- Touch事件详解及区别,触屏滑动距离计算
移动端有四个关于触摸的事件,分别是touchstart.touchmove.touchend.touchcancel(比较少用), 它们的触发顺序是touchstart-->touchmove- ...
- js中触摸相关变量touches,targetTouches和changedTouches的区别
touches: 当前屏幕上所有触摸点的列表; targetTouches: 当前对象上所有触摸点的列表; changedTouches: 涉及当前事件的触摸点的列表 通过一个例子来区分一下触摸事件中 ...
- 【移动端兼容问题研究】javascript事件机制详解(涉及移动兼容)
前言 这篇博客有点长,如果你是高手请您读一读,能对其中的一些误点提出来,以免我误人子弟,并且帮助我提高 如果你是javascript菜鸟,建议您好好读一读,真的理解下来会有不一样的收获 在下才疏学浅, ...
- 【原】移动web资源整理
2013年初接触移动端,简单做下总结,首先了解下移动web带来的问题 设备更新换代快——低端机遗留下问题.高端机带来新挑战 浏览器厂商不统一——兼容问题多 网络更复杂——弱网络,页面打开慢 低端机性能 ...
随机推荐
- Android Studio没有导包快捷键怎么办
Android Studio没有导包快捷键,那怎么办呢? 在使用Eclipse开发Android应用时,开发者往往会使用Shift+Ctrl+O快捷键来快速导入所有的包,和移除未使用的包.但这个快捷键 ...
- ie用document.getElementsByName获取不到
document.getElementsByName('someName') 返回一个节点列表(数组) 注意:在IE下有些节点是没有name 属性的,就是用document.getElementsBy ...
- 【Android Demo】通过WebService获取今日天气情况--转
因为本身是在搞.NET方面的东东,现在在学习Android,所以想实现Android通过WebService接口来获取数据,网上很多例子还有有问题的.参考:Android 通过WebService进行 ...
- ida dump内存脚本
auto i,fp; fp = fopen("d:\\dump.dex","wb"); for(i=r0;i<r0+0x20;i++) fputc(Byt ...
- (转)mahout中k-means例子的运行
首先简单说明下,mahout下处理的文件必须是SequenceFile格式的,所以需要把txtfile转换成sequenceFile.SequenceFile是hadoop中的一个类,允 ...
- python标准库-日志logging
1.模块级别 先看一下logging模块的日志级别特点,共分6个等级. 可以手工设置当前日志的默认等级(warn),当日志输出的等级高于默认等级时,日志输出到屏幕,否则不输出. #!/usr/bin/ ...
- 解决Ubuntu系统中文乱码显示问题,终端打开文件及查看目录
解决Ubuntu系统中文乱码显示问题 [日期:2014-02-20] 来源:Linux社区 作者:njchenyi [字体:大 中 小] 我是先安装了Ubuntu 12.04 Server,然后 ...
- 基于Redis的在线用户列表解决方案
前言: 由于项目需求,需要在集群环境下实现在线用户列表的功能,并依靠在线列表实现用户单一登陆(同一账户只能一处登陆)功能: 在单机环境下,在线列表的实现方案可以采用SessionListener来完成 ...
- PAT (Advanced Level) 1012. The Best Rank (25)
简单排序题. 注意:分数相同的人排名相同. #include<iostream> #include<cstring> #include<cmath> #includ ...
- 常用HQL集锦
1.根据ID查询某"一个"实体类 方法1: String hql = "From ClassEntity as c where c.id=?"; ClassEn ...