You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking without moving the mouse at all is hard. For this reason, tiny pointer movements while down on marker should be treated as clicks not drags. In other words, markers should have a clickTolerance option similar to the map.
I considered posting this as a bug report, but since some design decisions are involved, I made it a feature. Here's a jsfiddle with a minimal example: https://jsfiddle.net/cchudzicki/q0bg7r18/11/
// example fiddle console log:
pointer down
pointer down and moving
marker dragstart
(x12): pointer down and moving
pointer up
marker dragend: pointer moved: 0.800018310546875
map click
Design Alternatives
I see three possibilities:
Use map's clickTolerance as the marker `clickTolerance. Anything below will this will be treated as a click not a drag.
Have separate clickTolerances for each marker and for the map AND use the default marker tolerance as some specific value, e.g., "3px"
Have separate clickTolerances for each marker and for the map AND set the default marker tolerance to match map tolerance.
Design
I believe we should implement Option 2 or 3, though I lean toward 3 because users probably want the same drag tolerance throughout their app.
Mock-Up and Concepts
Just add a clickTolerance option for markers.
Implementation
I am looking into this, but imagine something similar to how the map drag threshold works.
Motivation
Clicking without moving the mouse at all is hard. For this reason, tiny pointer movements while down on marker should be treated as clicks not drags. In other words, markers should have a
clickTolerance
option similar to the map.I considered posting this as a bug report, but since some design decisions are involved, I made it a feature. Here's a jsfiddle with a minimal example: https://jsfiddle.net/cchudzicki/q0bg7r18/11/
Design Alternatives
I see three possibilities:
clickTolerance
as the marker `clickTolerance. Anything below will this will be treated as a click not a drag.clickTolerances
for each marker and for the map AND use the default marker tolerance as some specific value, e.g., "3px"clickTolerances
for each marker and for the map AND set the default marker tolerance to match map tolerance.Design
I believe we should implement Option 2 or 3, though I lean toward 3 because users probably want the same drag tolerance throughout their app.
Mock-Up and Concepts
Just add a
clickTolerance
option for markers.Implementation
I am looking into this, but imagine something similar to how the map drag threshold works.
See related discussion: #9624
The text was updated successfully, but these errors were encountered: