Skip to content

Commit

Permalink
Merge pull request #28 from AnalyticalGraphicsInc/bugfix_16
Browse files Browse the repository at this point in the history
Bugfix for #16 "Can't hide Cesium"
  • Loading branch information
pjcozzi committed May 16, 2012
2 parents 405cf98 + 66327d5 commit 9a81c98
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Source/Scene/CentralBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,13 +1320,18 @@ define([
* @private
*/
CentralBody.prototype.update = function(context, sceneState) {
var width = context.getCanvas().clientWidth;
var height = context.getCanvas().clientHeight;

if (width === 0 && height === 0) {
return;
}

var mode = sceneState.mode;
var projection = sceneState.scene2D.projection;

this._syncMorphTime(mode);

var width, height;

if (this._dayTileProvider !== this.dayTileProvider) {
this._dayTileProvider = this.dayTileProvider;

Expand Down Expand Up @@ -1381,9 +1386,6 @@ define([
this._createTextureCache(context);
}

width = context.getCanvas().clientWidth;
height = context.getCanvas().clientHeight;

var createFBO = !this._fb || this._fb.isDestroyed();
var fboDimensionsChanged = this._fb && (this._fb.getColorTexture().getWidth() !== width || this._fb.getColorTexture().getHeight() !== height);

Expand Down

0 comments on commit 9a81c98

Please sign in to comment.