aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/BaseWindow.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-05 00:52:37 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-11-05 00:52:37 +1300
commite4d8fb584dbafce24baed04c7034891c19f839c1 (patch)
treeba83a5ad0b0051e55bfcf2b082f57fdcfb1ff435 /web/app/view/BaseWindow.js
parent129363f54e62fa3db041a839fe90a5b104ba881f (diff)
downloadtrackermap-web-e4d8fb584dbafce24baed04c7034891c19f839c1.tar.gz
trackermap-web-e4d8fb584dbafce24baed04c7034891c19f839c1.tar.bz2
trackermap-web-e4d8fb584dbafce24baed04c7034891c19f839c1.zip
Maximize window if it doesn't fit
Diffstat (limited to 'web/app/view/BaseWindow.js')
-rw-r--r--web/app/view/BaseWindow.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web/app/view/BaseWindow.js b/web/app/view/BaseWindow.js
index ede69b98..689f2057 100644
--- a/web/app/view/BaseWindow.js
+++ b/web/app/view/BaseWindow.js
@@ -21,5 +21,13 @@ Ext.define('Traccar.view.BaseWindow', {
width: Traccar.Style.windowWidth,
height: Traccar.Style.windowHeight,
layout: 'fit',
- modal: true
+ modal: true,
+
+ initComponent: function () {
+ if (screen.width < Traccar.Style.windowWidth || screen.height < Traccar.Style.windowHeight) {
+ this.maximized = true;
+ this.style = 'border-width: 0';
+ }
+ this.callParent();
+ }
});