| | |
| | | config: {} |
| | | }; |
| | | |
| | | let _resizeTimer; |
| | | |
| | | const els = { |
| | | statusMark: document.getElementById("statusMark"), |
| | | projectSelect: document.getElementById("projectSelect"), |
| | |
| | | const screenHeight = window.screen && window.screen.availHeight ? window.screen.availHeight : 900; |
| | | const heightLimit = Math.floor(screenHeight * 0.5) + 88; |
| | | const height = explicitHeight || Math.min(Math.ceil(document.body.scrollHeight + 2), heightLimit); |
| | | if (explicitHeight != null) { |
| | | clearTimeout(_resizeTimer); |
| | | bridge.requestResize({ width: Math.ceil(document.body.scrollWidth), height }).catch(() => {}); |
| | | return; |
| | | } |
| | | clearTimeout(_resizeTimer); |
| | | _resizeTimer = setTimeout(function() { |
| | | bridge.requestResize({ width: Math.ceil(document.body.scrollWidth), height }).catch(() => {}); |
| | | }, 50); |
| | | } |
| | | |
| | | function updatePanelLimits() { |