Snap.js icon indicating copy to clipboard operation
Snap.js copied to clipboard

google map

Open ghost opened this issue 12 years ago • 2 comments

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

ghost avatar Jun 13 '13 00:06 ghost

fyi: This issue appears only on mobile. Apparently the dragging method gets called on a click event as well.

ghost avatar Jun 13 '13 00:06 ghost

Solution: apply stop propogation when your button's "ontouchstart" called. Worked for me, good luck :)

codletech avatar Aug 18 '14 18:08 codletech