File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ Luke Mahé <lukem@google.com>
1313Brendan Kenny <bckenny@google.com>
1414Moisés Arcos <moiarcsan@gmail.com>
1515Peter Grassberger <petertheone@gmail.com>
16+ Chris Fritz <us.chrisf@gmail.com>
Original file line number Diff line number Diff line change @@ -1075,8 +1075,18 @@ ClusterIcon.prototype.onAdd = function() {
10751075 panes . overlayMouseTarget . appendChild ( this . div_ ) ;
10761076
10771077 var that = this ;
1078+ var isDragging = false ;
10781079 google . maps . event . addDomListener ( this . div_ , 'click' , function ( event ) {
1079- that . triggerClusterClick ( event ) ;
1080+ // Only perform click when not preceded by a drag
1081+ if ( ! isDragging ) {
1082+ that . triggerClusterClick ( event ) ;
1083+ }
1084+ } ) ;
1085+ google . maps . event . addDomListener ( this . div_ , 'mousedown' , function ( ) {
1086+ isDragging = false ;
1087+ } ) ;
1088+ google . maps . event . addDomListener ( this . div_ , 'mousemove' , function ( ) {
1089+ isDragging = true ;
10801090 } ) ;
10811091} ;
10821092
You can’t perform that action at this time.
0 commit comments