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

Fullscreen brings the whole HTML page fullscreen #7

Closed
pjcozzi opened this issue Dec 19, 2014 · 6 comments
Closed

Fullscreen brings the whole HTML page fullscreen #7

pjcozzi opened this issue Dec 19, 2014 · 6 comments

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 19, 2014

Local link: http://localhost:8080/examples/groundoverlay.html

image

Can we organize the Resource links such that they will be under the viewer canvas in fullscreen instead of on top? @mramato is it possible to just make the viewer canvas fullscreen?

@mramato
Copy link
Contributor

mramato commented Dec 19, 2014

You can pass the element you want to the viewer constructor. However, we'll probably need to tweak the CSS. I also found an issue where fullScreenElement only takes an element, when it should allow for a string as well. I'll open a PR in Cesium to fix that; until then, this is what the code would look like.

var cesiumContainer = document.getElementById('cesiumContainer');
var viewer = new Cesium.Viewer(cesiumContainer, {
  fullscreenElement : cesiumContainer
});

That ends up only having the viewer window, but it's not size properly (which should itself be an easy fix).

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Dec 19, 2014

Is it safe to merge master to implicit-properties so we can upgrade here to the latest entity API and fullscreen fix?

Would it be better to have fullscreenElement default to the viewer? That is probably the common case, right? I would prefer us not to set it in every example.

@mramato
Copy link
Contributor

mramato commented Dec 19, 2014

I already did the merge, so you are good to go there.

It used to be the viewer by default, but we got a ton of emails on the mailing list about how it didn't behave the way they expected it to. Basically, what it comes down to is if your app takes up the whole browser window, (which is the typical use case) document.body is the better default. That all being said, I believe we can tweak the CSS you're using to make the default behavior have the viewer widget only for fullscreen; no code changes in Cesium required.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Dec 20, 2014

Upgraded Cesium in #9.

I believe we can tweak the CSS you're using to make the default behavior have the viewer widget only for fullscreen; no code changes in Cesium required.

I dig it.

@mramato
Copy link
Contributor

mramato commented Dec 20, 2014

I dig it.

To keep myself honest, I prototyped this in the fullscreen branch and got it working in Chrome and IE (but not Firefox yet). I'm completely confident it can be done in Firefox too, I just need to spend more time with the examples.css.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Feb 3, 2015

@mramato what is the state of this? Do we still care about this in the near-term?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants