Snap.js
Snap.js copied to clipboard
google map
Hi,
I just experienced a very strange issue. I have a google map with some marker. Now if somebody click's on a marker
google.maps.event.addListener(k2, 'click', onMarkerClick);
I trigger: snapper.open('left');
For some reason, the easeTo method (line 196 in snap.js) is called twice.
The call must come from the "endDrag" method, so I've extend the if-statement on line 428 as follow
from
if (cache.isDragging) {
to
if (cache.isDragging && settings.touchToDrag) {
I think this can get implemented in general because the "dragging" function on line 320 does the same.
Best, Thomas
fyi: This issue appears only on mobile. Apparently the dragging method gets called on a click event as well.
Solution: apply stop propogation when your button's "ontouchstart" called. Worked for me, good luck :)