Close menus by sliding objects on mobile
This commit is contained in:
@@ -206,12 +206,9 @@ function initPage(asHash) {
|
||||
//Add "Loading" Post
|
||||
getPost({type: 'loading', headerless: true, formatted_time: '', relative_time: ''}).appendTo($('#loading'));
|
||||
|
||||
/*
|
||||
//Mobile events
|
||||
$("#feed").onSwipe(function(aiDelta){
|
||||
if(aiDelta.x > self.tmp('$Feed').outerWidth(true)/3 && aiDelta.x > Math.abs(aiDelta.y)) toggleFeedPanel(false);
|
||||
});
|
||||
*/
|
||||
self.tmp('$Feed').onSwipe((oPos) => {if(oPos.xEnd - oPos.xStart > 100 && Math.abs(oPos.yEnd - oPos.yStart) < 100) toggleFeedPanel(false);});
|
||||
self.tmp('$Settings').onSwipe((oPos) => {if(oPos.xEnd - oPos.xStart < -100 && Math.abs(oPos.yEnd - oPos.yStart) < 100) toggleSettingsPanel(false);});
|
||||
|
||||
//Feed Panel
|
||||
initPosts();
|
||||
@@ -932,7 +929,7 @@ function getPost(asPost) {
|
||||
.hover(
|
||||
function(){
|
||||
var oMarker = oSpot.tmp(['markers', $(this).data('id')]);
|
||||
if(oSpot.tmp('map').getBounds().contains(oMarker.getLatLng()) && !oMarker.isPopupOpen()) oMarker.openPopup();
|
||||
if(oSpot.tmp('map') && oSpot.tmp('map').getBounds().contains(oMarker.getLatLng()) && !oMarker.isPopupOpen()) oMarker.openPopup();
|
||||
},
|
||||
function(){
|
||||
var oMarker = oSpot.tmp(['markers', $(this).data('id')]);
|
||||
|
||||
Reference in New Issue
Block a user