Change top position for centered windows.

This commit is contained in:
Julia Radzhabova 2017-08-22 17:49:18 +03:00
parent c792da3342
commit d01d4e9302
5 changed files with 5 additions and 5 deletions

View file

@ -225,7 +225,7 @@ define([
var win_width = (this.initConfig.width=='auto') ? parseInt(this.$window.find('.body').css('width')) : this.initConfig.width;
var top = Math.floor(((parseInt(main_height) - parseInt(win_height)) / 2) * 0.9);
var top = Math.floor((parseInt(main_height) - parseInt(win_height)) / 2);
var left = Math.floor((parseInt(main_width) - parseInt(win_width)) / 2);
this.$window.css('left',left);

View file

@ -134,7 +134,7 @@ define([
this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-85);
var top = ((Common.Utils.innerHeight() - parseInt(height)) / 2) * 0.9;
var top = (Common.Utils.innerHeight() - parseInt(height)) / 2;
var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left);

View file

@ -134,7 +134,7 @@ define([
this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-85);
var top = ((Common.Utils.innerHeight() - parseInt(height)) / 2) * 0.9;
var top = (Common.Utils.innerHeight() - parseInt(height)) / 2;
var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left);

View file

@ -422,7 +422,7 @@ define([
Common.UI.Window.prototype.setWidth.call(this, width + borders_width);
this.$window.css('left',(maxWidth - width - borders_width) / 2);
this.$window.css('top',((maxHeight - height - this._headerFooterHeight) / 2));
this.$window.css('top',(maxHeight - height - this._headerFooterHeight) / 2);
},
onWindowResize: function() {

View file

@ -134,7 +134,7 @@ define([
main_height = Common.Utils.innerHeight();
}
top = ((parseInt(main_height, 10) - parseInt(win_height, 10)) / 2) * 0.9;
top = (parseInt(main_height, 10) - parseInt(win_height, 10)) / 2;
left = (parseInt(main_width, 10) - parseInt(this.initConfig.width, 10)) / 2;
this.$window.css('left', Math.floor(left));