add touch events
This commit is contained in:
parent
74573d8f7c
commit
1124bd9fb2
@ -139,7 +139,7 @@
|
||||
['mousemove', 'touchstart', 'touchmove'].forEach(type => {
|
||||
window.addEventListener(type, event => {
|
||||
document.getElementById('cursor').style.top = (event.clientY || event.touches[0].clientY) + 'px';
|
||||
document.getElementById('cursor').style.left = (event.clientY || event.touches[0].clientY) + 'px';
|
||||
document.getElementById('cursor').style.left = (event.clientX || event.touches[0].clientX) + 'px';
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user