zoukankan      html  css  js  c++  java
  • 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

    http://stackoverflow.com/questions/7056026/variation-of-e-touches-e-targettouches-and-e-changedtouches

  • 相关阅读:
    Problem: 八中上厕所
    Problem: 最短路上的统计
    股票买卖问题
    Redis(十二)——Redis为什么是单线程的?
    链表题汇总
    Redis(十一)——集群模式
    Redis(十)——哨兵模式
    Redis(九)——主从复制
    Redis(八)——客户端与服务器
    Redis(七)——事件
  • 原文地址:https://www.cnblogs.com/human/p/3471936.html
Copyright © 2011-2022 走看看