Commit d1ea727e authored by Julia Radzhabova's avatar Julia Radzhabova

Changed default size of plugin window, debug resizing.

parent a518abfc
...@@ -228,7 +228,7 @@ define([ ...@@ -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([ ...@@ -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([ ...@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment