diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-05 00:52:37 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-05 00:52:37 +1300 |
commit | e4d8fb584dbafce24baed04c7034891c19f839c1 (patch) | |
tree | ba83a5ad0b0051e55bfcf2b082f57fdcfb1ff435 /web/app/view/BaseWindow.js | |
parent | 129363f54e62fa3db041a839fe90a5b104ba881f (diff) | |
download | trackermap-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.js | 10 |
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(); + } }); |