Changed default size of plugin window, debug resizing.
This commit is contained in:
parent
a518abfcae
commit
d1ea727e4c
|
@ -228,7 +228,7 @@ define([
|
||||||
arrBtns = variation.get_Buttons(),
|
arrBtns = variation.get_Buttons(),
|
||||||
newBtns = {},
|
newBtns = {},
|
||||||
size = variation.get_Size();
|
size = variation.get_Size();
|
||||||
if (!size || size.length<2) size = [400, 400];
|
if (!size || size.length<2) size = [800, 600];
|
||||||
|
|
||||||
if (_.isArray(arrBtns)) {
|
if (_.isArray(arrBtns)) {
|
||||||
_.each(arrBtns, function(b, index){
|
_.each(arrBtns, function(b, index){
|
||||||
|
|
|
@ -64,7 +64,7 @@ define([
|
||||||
initData: "",
|
initData: "",
|
||||||
isUpdateOleOnResize: false,
|
isUpdateOleOnResize: false,
|
||||||
buttons: [],
|
buttons: [],
|
||||||
size: [400, 400],
|
size: [800, 600],
|
||||||
maximumSize: [],
|
maximumSize: [],
|
||||||
minimumSize: []
|
minimumSize: []
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,24 +252,23 @@ define([
|
||||||
setInnerSize: function(width, height) {
|
setInnerSize: function(width, height) {
|
||||||
var maxHeight = parseInt(window.innerHeight),
|
var maxHeight = parseInt(window.innerHeight),
|
||||||
maxWidth = parseInt(window.innerWidth),
|
maxWidth = parseInt(window.innerWidth),
|
||||||
header_footer = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34;
|
header_footer = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34,
|
||||||
if (maxHeight<height + header_footer)
|
borders_height = (parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width'))),
|
||||||
height = maxHeight - header_footer;
|
borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width')));
|
||||||
if (maxWidth<width)
|
if (maxHeight<height + header_footer + borders_height)
|
||||||
width = maxWidth;
|
height = maxHeight - header_footer - borders_height;
|
||||||
|
if (maxWidth<width + borders_width)
|
||||||
|
width = maxWidth - borders_width;
|
||||||
|
|
||||||
var $window = this.getChild();
|
var $window = this.getChild();
|
||||||
var boxEl = $window.find('.body > .box');
|
var boxEl = $window.find('.body > .box');
|
||||||
boxEl.css('height', height);
|
boxEl.css('height', height);
|
||||||
|
|
||||||
Common.UI.Window.prototype.setHeight.call(this, height + header_footer);
|
Common.UI.Window.prototype.setHeight.call(this, height + header_footer + borders_height);
|
||||||
Common.UI.Window.prototype.setWidth.call(this, width);
|
Common.UI.Window.prototype.setWidth.call(this, width + borders_width);
|
||||||
|
|
||||||
var top = ((maxHeight - height - header_footer) / 2) * 0.9;
|
this.$window.css('left',(maxWidth - width - borders_width) / 2);
|
||||||
var left = (maxWidth - width) / 2;
|
this.$window.css('top',((maxHeight - height - header_footer - borders_height) / 2) * 0.9);
|
||||||
|
|
||||||
this.$window.css('left',(maxWidth - width) / 2);
|
|
||||||
this.$window.css('top',((maxHeight - height - header_footer) / 2) * 0.9);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
textLoading : 'Loading'
|
textLoading : 'Loading'
|
||||||
|
|
Loading…
Reference in a new issue