Skip to content

Commit

Permalink
Use padding variable
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Sep 24, 2012
1 parent 7f2884b commit 8c7a6ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/public/base/javascript/modules/data-viewer.js
Expand Up @@ -27,13 +27,14 @@ this.ckan.module('data-viewer', function (jQuery) {
// save reference to this to use in timeout
var that = this;
var MIN_HEIGHT = 400;
var PADDING = 16;

resizeTimer = setTimeout(function() {
var height = that.el.contents().height();
height = Math.max(height, MIN_HEIGHT);
var deltaHeight = height - that.el.height();
if (deltaHeight > 0 || deltaHeight < -10) {
that.el.animate({height: height+20}, Math.min(700, height*2));
that.el.animate({height: height+PADDING}, Math.min(700, height*2));
}
}, 100);
},
Expand Down

0 comments on commit 8c7a6ff

Please sign in to comment.