code-for-chapel-hill / NC-COVID-Support

Community support site, supporting COVID-19 business opening hours, Food Banks, School Meals, Farms and Social Services.
https://nccovidsupport.org
GNU General Public License v3.0
16 stars 39 forks source link

Hide the Zoom controls on Mobile and Tablet devices. #247

Closed readingdancer closed 4 years ago

readingdancer commented 4 years ago

Description of the new feature

On tablets and mobile we don't need to show the Zoom controls ( if you look at popular mapping apps like Google Maps and Apple Maps they don't show them either ) as users naturally pinch and expand to zoom in and out on touch screens.

Another way to look at this ( and maybe the correct way to implement it ) would be to say any device that has a Pointer ( think mouse / touchpad etc ) should see the Zoom controls. Because now there are many laptops with touch controls, so you can't rely on that as a way of not showing the control.

What we need to code

I think... Use a CSS media query to detect if the current browser has pointer support and if so, show the zoom controls.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer

Alternative solutions (if available)

IF the above doesn't work, there may be other CSS media queries that could help.

aliciawu-dev commented 4 years ago

i can try this!