Add proper resizing of scrollable Notebook area
Resizing needed to be 100% of the height, but css would not work. Jquery is now used.
This commit is contained in:
parent
54d64cc124
commit
03238ad179
4 changed files with 85 additions and 18 deletions
22
index.html
22
index.html
|
|
@ -13,6 +13,8 @@
|
|||
<div id="main">
|
||||
</div>
|
||||
<script>
|
||||
window.$ = window.jQuery = require('./app/static/jquery-1.12.0.min.js');
|
||||
$(document).ready(function(){
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (e.which === 123) {
|
||||
require('remote').getCurrentWindow().toggleDevTools();
|
||||
|
|
@ -20,15 +22,19 @@
|
|||
location.reload();
|
||||
}
|
||||
});
|
||||
function resize()
|
||||
{
|
||||
var heights = window.innerHeight;
|
||||
document.getElementById("main").style.height = heights + "px";
|
||||
}
|
||||
function resize()
|
||||
{
|
||||
var heights = window.innerHeight;
|
||||
$("#main").height(heights+"px");
|
||||
var h = $('#main-nav').outerHeight(true);
|
||||
var subheaderHeight = $('#nblist > div:first-child').outerHeight(true);
|
||||
$('#notebook-list').height(heights-h-subheaderHeight);
|
||||
}
|
||||
resize();
|
||||
$(window).resize(function() {
|
||||
resize();
|
||||
window.onresize = function() {
|
||||
resize();
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="dist/bundle.js"></script>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue