Fix Elevation Panel Width

This commit is contained in:
2020-03-26 21:12:43 +01:00
parent b9455e1c36
commit 0a398b98b0

View File

@@ -62,6 +62,7 @@ function toggleFeedPanel(bShow) {
else $Container.toggleClass('with-feed', bShow);
oSpot.tmp('with_feed', $Container.hasClass('with-feed'));
oSpot.onResize();
}
function isMobile() {
@@ -202,7 +203,8 @@ function onAutoUpdate(bFirstExec) {
}
function getElevWidth() {
return $('#projects').width() - oSpot.tmp('feed_width') - $('.leaflet-bottom.leaflet-left').outerWidth(true) - 6;
// Page widthFeed Panel Legend width (bottom left) Elevation right margin (from page side)
return $('#projects').width() - oSpot.tmp('feed_width') - $('.leaflet-bottom.leaflet-left > .leaflet-control-layers').outerWidth(true) - parseInt($('.leaflet-bottom.leaflet-right > .leaflet-control-scale').css('margin-right').slice(0, -2));
}
function initSpotMessages(aoMessages, aoTracks) {