Giter Club home page Giter Club logo

Comments (6)

mramato avatar mramato commented on May 27, 2024

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.

pjcozzi avatar pjcozzi commented on May 27, 2024

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.

mramato avatar mramato commented on May 27, 2024

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.

pjcozzi avatar pjcozzi commented on May 27, 2024

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.

mramato avatar mramato commented on May 27, 2024

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.

pjcozzi avatar pjcozzi commented on May 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.