我在Node上面加入touchstart和touchmove, 一切顺利 但是我的触点移出Node的范围, 还是会被触动,怎么办?
touchmove 指的就是 touch之后的move 不管是不是hover的状态 都算是move 只有 松开touch才没有的
那有没有touch enter node的方法? 好像mouse enter的一样
touch 本身没有像mouse enter的事件 可以自己在touchmove时候 用hittest 去做吧
hit test 是什么?能给例子吗?
node.on(“touchmove”, function(event) {
let hit = node._hitTest(touch.getLocation());
if (hit) {
//move到了该node里面
} else {
//move 到了该node外面
}
}, this);