Slide leaflet controls with panels

This commit is contained in:
2022-11-24 20:03:03 +01:00
parent 4d8b374a2f
commit cee962ff50
2 changed files with 28 additions and 6 deletions

View File

@@ -381,7 +381,7 @@ $.prototype.hoverSwap = function(sDefault, sHover)
.text(sDefault);
};
$.prototype.onSwipe = function(fOnMove, fOnEnd){
$.prototype.onSwipe = function(fOnStart, fOnMove, fOnEnd){
return $(this)
.on('dragstart', (e) => {
e.preventDefault();
@@ -394,6 +394,10 @@ $.prototype.onSwipe = function(fOnMove, fOnEnd){
$This.data('x-move', oPos.x);
$This.data('y-move', oPos.y);
$This.data('moving', true).addClass('moving');
fOnStart({
xStart: $This.data('x-start'),
yStart: $This.data('y-start')
});
})
.on('touchmove mousemove', (e) => {
var $This = $(this);