Closed pjcozzi closed 9 years ago
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).
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.
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.
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.
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.
@mramato what is the state of this? Do we still care about this in the near-term?
Local link: http://localhost:8080/examples/groundoverlay.html
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?