mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge pull request #7982 from minrk/window-height
use $(window).height() instead of window.innerHeight
This commit is contained in:
commit
86e131d478
@ -56,7 +56,7 @@ define([
|
||||
|
||||
Page.prototype._resize_site = function() {
|
||||
// Update the site's size.
|
||||
$('div#site').height(window.innerHeight - $('#header').height());
|
||||
$('div#site').height($(window).height() - $('#header').height());
|
||||
};
|
||||
|
||||
// Register self in the global namespace for convenience.
|
||||
|
@ -36,7 +36,7 @@ require([
|
||||
|
||||
var header = $("#header")[0]
|
||||
function calculate_size() {
|
||||
var height = window.innerHeight - header.offsetHeight;
|
||||
var height = $(window).height() - header.offsetHeight;
|
||||
var width = $('#terminado-container').width();
|
||||
var rows = Math.min(1000, Math.max(20, Math.floor(height/termRowHeight())-1));
|
||||
var cols = Math.min(1000, Math.max(40, Math.floor(width/termColWidth())-1));
|
||||
@ -57,7 +57,7 @@ require([
|
||||
var geom = calculate_size();
|
||||
terminal.term.resize(geom.cols, geom.rows);
|
||||
terminal.socket.send(JSON.stringify(["set_size", geom.rows, geom.cols,
|
||||
window.innerHeight, window.innerWidth]));
|
||||
$(window).height(), $(window).width()]));
|
||||
};
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user