Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop Resize - Need to Set Header Height Before Using it to Size the Content Panel #78

Open
nheick opened this issue May 25, 2017 · 0 comments

Comments

@nheick
Copy link

nheick commented May 25, 2017

In MainView.resize, the header height is resized after it is used to calculate the variable heightAroundMap, not before. If you shrink the browser to a mobile size on your desktop and then maximize the browser, the header height is zero instead of 90 or 100, and the map and tile list extend below the bottom of the window by 90 or 100px.

Moving this block of code:

if (!_urlParams.embed && _urlParams.embed !== '' && !app.cfg.embed && !_urlParams.forceEmbed && !app.indexCfg.forceEmbed) { // CUSTOM LACSD CODE var headerHeight = app.data.getWebAppData().getHeader().compactSize ? '90px' : '100px'; $('#header').height(headerHeight); }

before this block of code:

var heightViewport = $("body").height(); var heightAroundMap = 0; $('.mainViewAboveMap, .mainViewBelowMap').each(function(i, item){ var itemObj = $(item); heightAroundMap += itemObj.is(':visible') ? itemObj.outerHeight() : 0; });

fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant