MobilityLab / TransitNearMe

Find all available transit options and real-time predictions from any location using this web app for desktop or mobile devices. (Currently greater Washington, DC area only.)
http://dev.mobilitylab.org/TransitNearMe
MIT License
11 stars 3 forks source link

Difficult to select lines on iPhone #61

Open TransitScreen opened 12 years ago

TransitScreen commented 12 years ago

I have had increased trouble recently demoing TNM to people, in particular, it's difficult to select lines and stops. I feel like this is a regression; could the hit radius have decreased when the icons changed?

chosak commented 12 years ago

The lines haven't changed, and even the icon sizes are the same as before the recent change (commit f03a92d - the images themselves are the same size, there's just more transparent padding now). I agree that it's always been hard to click on the lines - unfortunately I don't know of an easy way to add transparent padding around them or otherwise increase the hittable area.

TransitScreen commented 12 years ago

Where do I file a bug for "my fingers have regressed"?

Seriously, we should look into how leaflet handles hits and see if we can patch something there. It's not very usable right now.

TransitScreen commented 12 years ago

See methods in https://github.com/CloudMade/Leaflet/tree/master/src/layer/vector. There are SVG, Canvas, and VML (for IE) methods, and we need to know which one is used on which browser.

canvas/Polyline_Canvas has at least some code for addressing it: "if (L.Browser.touch) { w += 10; // polyline click tolerance on touch devices }"

TransitScreen commented 12 years ago

According to some vague documentation and commits,

Canvas is default for Android < 3, but can be enabled anywhere. VML is for IE 6-8. SVG is default otherwise.

The drawing method affects all vector data (polylines, polygons, and circles).