Merge pull request #165 from mistercrunch/window_resize
Fixing window resize for explore and standalone
This commit is contained in:
commit
e39f7db0a3
|
|
@ -330,4 +330,5 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
$('div.toggle').addClass('pull-right');
|
||||
slice.bindResizeToWindowResize();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -217,6 +217,15 @@ var px = (function () {
|
|||
others += widget.find('.slice_header').height();
|
||||
return widget.height() - others;
|
||||
},
|
||||
bindResizeToWindowResize: function () {
|
||||
var resizeTimer;
|
||||
$(window).on('resize', function (e) {
|
||||
clearTimeout(resizeTimer);
|
||||
resizeTimer = setTimeout(function () {
|
||||
slice.resize();
|
||||
}, 500);
|
||||
});
|
||||
},
|
||||
render: function () {
|
||||
$('.btn-group.results span').attr('disabled', 'disabled');
|
||||
token.find("img.loading").show();
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@ $(document).ready(function () {
|
|||
var data = $('.slice').data('slice');
|
||||
slice = px.Slice(data);
|
||||
slice.render();
|
||||
slice.bindResizeToWindowResize();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue