toucheschangedTouchestargetTouchestouchend þá eru ekki lengur til touch upplýsingarnar í touches (farin af skjá)touchstart þá er bara einn touch object fyrir síðasti fingurinn sem snerti skjáinn í changedTouches (þó við hreyfum hann), fleiri fingur ef samtímistouchend þá geymir changedTouches upplýsingar um touch object af fingri sem fer af skjá (síðasti), fleiri ef samtímis.toucmove þá geymir changedTouches alla touch objecta sem eru á skjá og hafa fært sig (ný staða)element (target).
I put a finger down, all three lists touches, targetTouches, changedTouches 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.
Nánari upplýsingar og kóðadæmi um TouchList Interface
Stilltu á Mobile view í dev mode (F12) í vafra og hafðu console opið.
touches, changedTouches og targetTouches