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

Balloon Browser widget #954

Closed
mramato opened this issue Jul 17, 2013 · 6 comments
Closed

Balloon Browser widget #954

mramato opened this issue Jul 17, 2013 · 6 comments

Comments

@mramato
Copy link
Contributor

mramato commented Jul 17, 2013

I would like to see a BalloonWidget in Cesium which behaves similarly to balloons in other applications (such as Google Earth, Leaflet, etc..). Eventually we can add other features we might need as well, but lets start with the basics.

BalloonWidget is a simple widget which acts as a container for user supplied HTML (and perhaps eventually other markup). It would have the following features

  1. Accepts HTML content and sanitizes it using Google Caja.
  2. The origin of the balloon can either be a position in screen coordinates or a position in world coordinates. For world coordinates, the balloon can either be in "keep on screen" mode, or in "static" mode that allows the balloon to go off-screen.
  3. The balloon can be either closed with an "X" button in the upper right, or programatically closed by the application using it.
  4. Styling of the balloon happens via CSS like any other widget.

I think that's all there is to it. Once we have a basic Balloon widget, we can hook it up to Viewer and CZML, GeoJSON, KML, TopoJSON can take advantage of it. We would add a new balloon property on DynamicObject which is the HTML content of the balloon.

Here are some thoughts on other features that we might not need in the short term, but would be good in the future

  1. Determine how to let links/buttons present in the Balloon interact with the containing application. For example, clicking a link in a balloon that contains KML in Google Earth causes that KML to be loaded.
  2. Dynamic balloon content. Most useful when combines with CZML to show time-dynamic content in sync with simulation time.

How do you guys feel about this plan? Any concerns or things I missing?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 17, 2013

Not exactly my area of expertise but I dig it. +1

@jsbrujy
Copy link

jsbrujy commented Jul 17, 2013

+1 as well. Having Ballon available to display Metadata also natively in CZML format will be very usefull
Could be balloon and why not in option a left or right additional column to the 2D/3D view (like in STK to display HUD data)

@mramato
Copy link
Contributor Author

mramato commented Jul 23, 2013

@hpinkos is going to take a stab at this.

@pjcozzi
Copy link
Contributor

pjcozzi commented Sep 25, 2013

For Open Philly Globe, I wanted to change the fade in/out speed of the balloons since we were fading other objects on mouse over. Is this possible? I assume a user has to override .cesium-balloon-wrapper-visible and .cesium-balloon-wrapper-hidden. Can they do that trivially? No rush, just asking.

Also, we might not want to default to linear fade. Linear is generally considered boring, at least in the game world. Cubic ease in/out might be OK.

@emackey
Copy link
Contributor

emackey commented Sep 25, 2013

Changed to ease in/out transitions in dcc7c46. Yes, the official way for users to customize them is with CSS (there's no need for us to create API for all the stuff that users can override with CSS, it would be too big).

@mramato
Copy link
Contributor Author

mramato commented Feb 1, 2014

Closing this since #1419 has our alternative (and in my opinion better) solution which is still based on the work @hpinkos originally did. I don't plan on deleting the original balloon branch until I have a chance to grab some screenshots of it in action that I plan on using for a blog post.

@mramato mramato closed this as completed Feb 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants