diff --git a/masks/project.html b/masks/project.html index b9ada13..83ba425 100755 --- a/masks/project.html +++ b/masks/project.html @@ -28,6 +28,7 @@ oSpot.onSamePageMove = function(asHash) { self.tmp('map').remove(); self.tmp('$Map').empty(); self.tmp('map', null); + setFeedUpdateTimer(false); initProject(asHash.items[0]); } return false; @@ -213,8 +214,8 @@ function initSpotMessages(aoMessages, aoTracks) { var oElev = L.control.elevation({ collapsed: true, position: "bottomright", - width: $('#projects').width() - $('#feed').outerWidth(true) - $('.leaflet-bottom.leaflet-left').outerWidth(true) + 4, - height: 125, + width: $('#projects').width() - $('#feed').outerWidth(true) - $('.leaflet-bottom.leaflet-left').outerWidth(true) - 6, + height: 129, hoverNumber: { decimalsX: 0, //distance (km) decimalsY: 0 //elevation (m) @@ -386,12 +387,12 @@ function updateFeed(bFirstChunk, bDiscrete) if(bFirstChunk===true) { self.tmp('news_chunk', 0); - $('#projects').removeClass('with-feed'); + if(!bDiscrete) $('#projects').removeClass('with-feed'); } self.get('feed', function(asData) { $('#loading').hide(); - $('#projects').addClass('with-feed'); + if(!bDiscrete) $('#projects').addClass('with-feed'); $.each(asData, function(iKey, asPost){ $Posts.append(getPost(asPost)); @@ -416,7 +417,7 @@ function updateFeed(bFirstChunk, bDiscrete) function setFeedUpdateTimer(iSeconds, fCallback) { fCallback = fCallback || function(){updateFeed(true);}; if(typeof self.tmp('update_timer') != 'undefined') clearTimeout(self.tmp('update_timer')); - self.tmp('update_timer', setTimeout(fCallback, iSeconds * 1000)); + if(iSeconds > 0) self.tmp('update_timer', setTimeout(fCallback, iSeconds * 1000)); }