]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Rename function for adding resize handlers
authorSamuel Mannehed <samuel@cendio.se>
Mon, 23 Jan 2017 13:53:12 +0000 (14:53 +0100)
committerSamuel Mannehed <samuel@cendio.se>
Fri, 27 Jan 2017 15:20:53 +0000 (16:20 +0100)
Moves the one handler for the status out of the function as well. It
didn't fit in with the function's old name either.

app/ui.js

index 8c208eb8e9ac23ae362dae6d57cdaea23b659526..4b9b27d4f03c01b61eedf4f768c1ffad10294848 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -146,7 +146,7 @@ var UI;
             UI.initFullscreen();
 
             // Setup event handlers
-            UI.setupWindowEvents();
+            UI.addResizeHandlers();
             UI.addControlbarHandlers();
             UI.addTouchSpecificHandlers();
             UI.addExtraKeysHandlers();
@@ -154,6 +154,8 @@ var UI;
             UI.addConnectionControlHandlers();
             UI.addClipboardHandlers();
             UI.addSettingsHandlers();
+            document.getElementById("noVNC_status")
+                .addEventListener('click', UI.hideStatus);
 
             UI.openControlbar();
 
@@ -235,13 +237,10 @@ var UI;
             UI.initSetting('reconnect_delay', 5000);
         },
 
-        setupWindowEvents: function() {
+        addResizeHandlers: function() {
             window.addEventListener('resize', UI.applyResizeMode);
             window.addEventListener('resize', UI.updateViewClip);
             window.addEventListener('resize', UI.updateViewDrag);
-
-            document.getElementById("noVNC_status")
-                .addEventListener('click', UI.hideStatus);
         },
 
         addControlbarHandlers: function() {