Skip to content

Commit

Permalink
small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Apr 29, 2024
1 parent 8615ac7 commit 67cf602
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/jquery.terminal-src.js
Expand Up @@ -5301,10 +5301,10 @@
var height = Math.round(window.visualViewport.height * scale);
callback(height);
window.visualViewport.addEventListener('resize', function() {
var newScale = window.visualViewport.scale;
var newHeight = Math.round(window.visualViewport.height * newScale);
if (height !== newHeight) {
height = newHeight;
var new_scale = window.visualViewport.scale;
var new_height = Math.round(window.visualViewport.height * new_scale);
if (height !== new_height) {
height = new_height;
callback(height);
}
});
Expand Down

0 comments on commit 67cf602

Please sign in to comment.