Resize filepicker on window size change

* add 20 px space to each direction -> 10px padding to left, right, top and bottom
* fixes #16100
This commit is contained in:
Morris Jobke 2015-05-06 11:00:23 +02:00
parent f1903f61a1
commit e0640a0232
1 changed files with 5 additions and 1 deletions

View File

@ -78,8 +78,12 @@
var pos = self.parent.position();
self.$dialog.css({
left: pos.left + ($(window).innerWidth() - self.$dialog.outerWidth())/2,
top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2
top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2,
width: Math.min(self.options.width, $(window).innerWidth() - 20 ),
height: Math.min(self.options.height, $(window).innerHeight() - 20)
});
// set sizes of content
self._setSizes();
});
this._setOptions(this.options);