Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default size of primary tap targets #223

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Increase default size of primary tap targets #223

merged 1 commit into from
Dec 17, 2020

Conversation

Malvoz
Copy link
Member

@Malvoz Malvoz commented Dec 9, 2020

Fix #215. Although there may still be work to be done in this area, that issue is specifically about increasing the size of the default controls so I think it makes sense to close that one out, given this PR.

  • Increase default size of controls to 44x44px
  • Decrease margin of controls (not needed per se, but increases the size of the interaction area on the map display, especially in small sized maps)

Increasing the size of controls obviously leaves less room for additional controls, but that's a separate issue (#224).

Preview

Current

old buttons

New

new buttons

(albeit with added noreload to controlslist)

New: larger map size, no controls excluded

new buttons, big map

@ahmadayubi
Copy link
Member

ahmadayubi commented Dec 15, 2020

With the increased size of controls the already small map is almost 1/4 covered by controls now. does the small size of the default map have to be as small as a video element?

@Malvoz
Copy link
Member Author

Malvoz commented Dec 15, 2020

There was agreement to set the default object size to 300x150, but technically MapML could specify any such default size.

It's likely more default controls will be added, should we further increase the default size then to make room for those? I don't think increasing the default size solves the problem.

Here's a screenshot of a 300x150 video element in Chrome, it contains 4 controls that are 48x48 px:

video-buttons-chrome

Although the layout of controls for video obviously is different I think it's doable with large buttons, taking into consideration that we probably should hide controls conditionally.

@Malvoz
Copy link
Member Author

Malvoz commented Dec 15, 2020

#216 could also free up some more space btw.

@ahmadayubi
Copy link
Member

I agree that the controls should show conditionally, I think full screen button should have that behavior, although after adding reload button I'm not sure if that behavior still works properly or not. This PR can be merged without issue though, I can work on conditional controls after I get the current issue I'm working on resolved.

@prushforth prushforth merged commit f2c0c18 into Maps4HTML:master Dec 17, 2020
@Malvoz Malvoz deleted the tap-target-size branch December 18, 2020 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase default size of controls
3 participants