From 8d847a9ac466b1f9164c3676897b9df4d7b04b67 Mon Sep 17 00:00:00 2001 From: captainill Date: Mon, 9 Nov 2015 22:21:39 -0800 Subject: [PATCH] fix sticker footer --- website/source/assets/javascripts/docs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/source/assets/javascripts/docs.js b/website/source/assets/javascripts/docs.js index 3247af6585..5f35a8cd74 100644 --- a/website/source/assets/javascripts/docs.js +++ b/website/source/assets/javascripts/docs.js @@ -2,7 +2,7 @@ var Init = { - start: function(){ + start: function(){ var classname = this.hasClass(document.body, 'page-sub'); if (classname) { @@ -25,7 +25,7 @@ var Init = { resizeImage: function(){ var header = document.getElementById('header'), - footer = document.getElementById('footer-wrap'), + footer = document.getElementById('footer'), main = document.getElementById('main-content'), vp = window.innerHeight, bodyHeight = document.body.clientHeight, @@ -33,10 +33,10 @@ var Init = { fHeight = footer.clientHeight, withMinHeight = hHeight + fHeight + 830; - if(withMinHeight > bodyHeight ){ + if(withMinHeight < vp && bodyHeight < vp){ var newHeight = (vp - (hHeight+fHeight)) + 'px'; main.style.height = newHeight; - } + } } };