Comments (6)
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).
from cesium-google-earth-examples.
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.
from cesium-google-earth-examples.
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.
from cesium-google-earth-examples.
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.
from cesium-google-earth-examples.
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.
from cesium-google-earth-examples.
@mramato what is the state of this? Do we still care about this in the near-term?
from cesium-google-earth-examples.
Related Issues (20)
- Update Resources links HOT 3
- Pin drag picking issue? HOT 3
- Update model example to use the entity API
- Add milktruck demo to index.html and README.md
- Draw demo crashes on double click
- Ground altitude example stops working in 2D mode HOT 1
- Placemark Click Event Handling terrain issues HOT 1
- Add pin demo has issues in 2D and CV
- Remove Move Camera with Timeouts? HOT 3
- Push master to gh-pages HOT 1
- Camera tilt example is broke HOT 1
- Mouse is ignored in Firefox in Screen Overlay example HOT 1
- Wrong elevation is returned in 3D view in groundAlt example HOT 1
- Update camera event examples to use new events HOT 2
- Upgrade to Cesium 1.11
- Update Cesium to version 1.12 HOT 1
- Upgrade to Cesium 1.14
- Update Bing key
- Upgrade to Cesium 1.16
- Fix examples and clean up README.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cesium-google-earth-examples.