You need to store the values on touchmove
and read it in touchend
.
var lastMove = null;
// Save the touchstart to always have a position
div.addEvent('touchstart', function(event) {
lastMove = event;
});
// Override with touchmove, which is triggered only on move
div.addEvent('touchmove', function(event) {
lastMove = event;
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…