mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Added RDP integration mouse wheel support.
This commit is contained in:
		
							parent
							
								
									9131f43562
								
							
						
					
					
						commit
						b301efc207
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -161,6 +161,17 @@ var CreateRDPDesktop = function (canvasid) {
 | 
			
		|||
        e.preventDefault();
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    obj.m.mousewheel = function (e) {
 | 
			
		||||
        if (!obj.socket || (obj.State != 3)) return;
 | 
			
		||||
        var m = getMousePosition(e);
 | 
			
		||||
        if ((m.x < 0) || (m.y < 0) || (m.x > obj.ScreenWidth) || (m.y > obj.ScreenHeight)) return;
 | 
			
		||||
        if (obj.mouseNagleTimer != null) { clearTimeout(obj.mouseNagleTimer); obj.mouseNagleTimer = null; }
 | 
			
		||||
        var delta = 0;
 | 
			
		||||
        if (e.detail) { delta = (e.detail * 120); } else if (e.wheelDelta) { delta = (e.wheelDelta * 3); }
 | 
			
		||||
        if (delta != 0) { obj.socket.send(JSON.stringify(['wheel', m.x, m.y, delta, false, false])); }
 | 
			
		||||
        e.preventDefault();
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    obj.m.mousedblclick = function () { }
 | 
			
		||||
    obj.m.handleKeyPress = function () { }
 | 
			
		||||
    obj.m.setRotation = function () { }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue