add touch events
This commit is contained in:
		
							parent
							
								
									075b4e1140
								
							
						
					
					
						commit
						4acb6e701c
					
				@ -136,9 +136,11 @@
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    // bonzi cursor
 | 
			
		||||
    window.addEventListener('mousemove', (event) => {
 | 
			
		||||
        document.getElementById('cursor').style.top = event.clientY + 'px';
 | 
			
		||||
        document.getElementById('cursor').style.left = event.clientX + 'px';
 | 
			
		||||
    ['mousemove', 'touchstart', 'touchmove'].forEach(type => {
 | 
			
		||||
       window.addEventListener(type, event => {
 | 
			
		||||
           document.getElementById('cursor').style.top = event.clientY + 'px';
 | 
			
		||||
           document.getElementById('cursor').style.left = event.clientX + 'px';
 | 
			
		||||
       });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // remove stream if embedded
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user