mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUAC-642: Control display of scroll bars directly.
This commit is contained in:
		| @@ -785,11 +785,19 @@ GuacUI.Client.setScale = function(new_scale) { | ||||
|  | ||||
|     GuacUI.Client.zoom_state.textContent = Math.round(new_scale * 100) + "%"; | ||||
|  | ||||
|     // Auto-fit is enabled iff minimum zoom level | ||||
|     GuacUI.Client.auto_fit.checked = (new_scale === GuacUI.Client.min_zoom); | ||||
|     // If at minimum zoom level, auto fit is ON | ||||
|     if (new_scale === GuacUI.Client.min_zoom) { | ||||
|         GuacUI.Client.main.style.overflow = "hidden"; | ||||
|         GuacUI.Client.auto_fit.checked = true; | ||||
|         GuacUI.Client.auto_fit.disabled = (GuacUI.Client.min_zoom >= 1); | ||||
|     } | ||||
|  | ||||
|     // Disable auto-fit if zoom is required | ||||
|     GuacUI.Client.auto_fit.disabled = (GuacUI.Client.min_zoom >= 1 && new_scale === GuacUI.Client.min_zoom); | ||||
|     // If at minimum zoom level, auto fit is OFF | ||||
|     else { | ||||
|         GuacUI.Client.main.style.overflow = "auto"; | ||||
|         GuacUI.Client.auto_fit.checked = false; | ||||
|         GuacUI.Client.auto_fit.disabled = false; | ||||
|     } | ||||
|  | ||||
| }; | ||||
|  | ||||
| @@ -1524,17 +1532,11 @@ GuacUI.Client.attach = function(guac) { | ||||
|      * Send size events on resize | ||||
|      */ | ||||
|  | ||||
|     var resize_timeout = null; | ||||
|  | ||||
|     window.onresize = function() { | ||||
|  | ||||
|         // Remove scrollbars during resize | ||||
|         GuacUI.Client.main.style.overflow = "hidden"; | ||||
|  | ||||
|         // Wait for resize to settle before updating | ||||
|         window.clearTimeout(resize_timeout); | ||||
|         resize_timeout = window.setTimeout(function() { | ||||
|  | ||||
|         var pixel_density = window.devicePixelRatio || 1; | ||||
|         var width = window.innerWidth * pixel_density; | ||||
|         var height = window.innerHeight * pixel_density; | ||||
| @@ -1546,8 +1548,6 @@ GuacUI.Client.attach = function(guac) { | ||||
|  | ||||
|         GuacUI.Client.updateDisplayScale(); | ||||
|  | ||||
|         }, 10); | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     GuacamoleSessionStorage.addChangeListener(function(name, value) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user