bellingcat / ukraine-timemap

TimeMap instance for Civilian Harm in Ukraine

Home Page:https://ukraine.bellingcat.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add full-screen button

loganwilliams opened this issue · comments

This would allow the map to be maximized from within an iframe.

This button should not appear on mobile, probably.

I would be interested in implementing this.

If I understand this issue correctly, an implementation could leverage the element.requestFullscreen() browser API in combination with the allowfullscreen attribute on the iframe.

Would it make sense to add the button to the toolbar ui in your opinion?

Screenshot 2022-03-21 at 19-38-33 Civilian Harm in-mh

Hi @fspoettel thanks for taking an interest in helping!

The logic that you described is indeed what we are looking for: iframe with allowfullscreen + requestFullScreen().

As for the UI placement, I think that sidebar makes sense (especially if we are not allowing for fullscreen in mobile - the sidebar is not visible on mobile). The order might be questionable but I'd say that's the easiest part to change if needed.

(@breezykermo in case you find this one useful and have other ideas about the UI placement)

Yes indeed, we'd greatly appreciate a PR to the upstream repo at https://github.com/forensic-architecture/timemap for this as well @fspoettel!