Skip to content

Commit

Permalink
Merge pull request jupyter#5703 from Zsailer/revert-html-alignment
Browse files Browse the repository at this point in the history
Revert change in page alignment
  • Loading branch information
Zsailer authored Aug 28, 2020
2 parents a11d686 + 31fc47a commit 138b406
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions notebook/static/base/js/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define([
// - header change
// - page load
var _handle_resize = $.proxy(this._resize_site, this);

$(window).resize(_handle_resize);

// On document ready, resize codemirror.
Expand Down Expand Up @@ -61,8 +61,6 @@ define([
this._resize_site();
};



Page.prototype._resize_site = function(e) {
/**
* Update the site's size.
Expand All @@ -74,21 +72,7 @@ define([
if (!(e && e.target && e.target.tagName)) {
$('div#site').height($(window).height() - $('#header').height());
}
this._align_header_site();
};



Page.prototype._align_header_site = function(e) {
/**
* Align the site and header divs
*/
var header_div_element_width = this.header_div_element.outerWidth();
var header_container_width = $('div#header-container').outerWidth();
var margin_left = (header_div_element_width - header_container_width) / 2;

this.site_div_element.find('.container').css('margin-left', margin_left);
}

return {'Page': Page};
});

0 comments on commit 138b406

Please sign in to comment.