infobox height override

I’m converting a large GE system to cesium and very happy.

Question - my html content in the description in the info box is not resulting in a properly sized infoBox height. Appears to be when it includes an styled to auto size based on div width. Looking at the source is appears there is an explicit setting of the infobox height based on content height. I’m thinking the image isn’t loaded when that is computed and as such the height is not appropriate.

Anyway to override this without customizing the code?

Ken J

Hello Ken,

Glad you hear you’re happy with Cesium so far! What kind of project are you working on?

Can you give me an example html content that is causing the problem? I wasn’t quite sure from your description. I’ll submit an issue if it seems like Cesium is doing something incorrect.

I don’t think there’s anyway to override the default behavior, but all of the DOM elements in the InfoBox should have their own class, so you might be able to override the behavior using just CSS instead of making changes to the code.




I faced the same issue sometimes back. I made some changes to Cesium.js

Just, replace

var height = frameContent.getBoundingClientRect().height; = height + ‘px’;

with, = Number(window.getComputedStyle(frameContent).height.replace(‘px’,’’))+ 20+ ‘px’;


window.getComputedStyle(frameContent).height.replace(‘px’,’’) - frameContent height

20 - cesium-infoBox-title height