diff --git a/Source/DataSources/BillboardVisualizer.js b/Source/DataSources/BillboardVisualizer.js index 9ad3f181f8ba..03ea39a25386 100644 --- a/Source/DataSources/BillboardVisualizer.js +++ b/Source/DataSources/BillboardVisualizer.js @@ -138,12 +138,16 @@ define([ return; } - position = Property.getValueOrUndefined(entity._position, time, position); - var textureValue = Property.getValueOrUndefined(billboardGraphics._image, time); - + var textureValue; var billboard; var billboardVisualizerIndex = entity._billboardVisualizerIndex; - var show = defined(position) && defined(textureValue) && entity.isAvailable(time) && Property.getValueOrDefault(billboardGraphics._show, time, true); + var show = entity.isAvailable(time) && Property.getValueOrDefault(billboardGraphics._show, time, true); + + if (show) { + position = Property.getValueOrUndefined(entity._position, time, position); + textureValue = Property.getValueOrUndefined(billboardGraphics._image, time); + show = defined(position) && defined(textureValue); + } if (!show) { //don't bother creating or updating anything else diff --git a/Source/DataSources/LabelVisualizer.js b/Source/DataSources/LabelVisualizer.js index d265a052f797..59293f9cbb36 100644 --- a/Source/DataSources/LabelVisualizer.js +++ b/Source/DataSources/LabelVisualizer.js @@ -115,12 +115,16 @@ define([ return; } - position = Property.getValueOrUndefined(entity._position, time, position); - var text = Property.getValueOrUndefined(labelGraphics._text, time); - + var text; var label; var labelVisualizerIndex = entity._labelVisualizerIndex; - var show = defined(position) && defined(text) && entity.isAvailable(time) && Property.getValueOrDefault(labelGraphics._show, time, true); + var show = entity.isAvailable(time) && Property.getValueOrDefault(labelGraphics._show, time, true); + + if (show) { + position = Property.getValueOrUndefined(entity._position, time, position); + text = Property.getValueOrUndefined(labelGraphics._text, time); + show = defined(position) && defined(text); + } if (!show) { //don't bother creating or updating anything else diff --git a/Source/DataSources/ModelVisualizer.js b/Source/DataSources/ModelVisualizer.js index 01e11bf274d0..fc3ac15580c8 100644 --- a/Source/DataSources/ModelVisualizer.js +++ b/Source/DataSources/ModelVisualizer.js @@ -112,12 +112,16 @@ define([ return; } - position = Property.getValueOrUndefined(entity._position, time, position); - var uri = Property.getValueOrUndefined(modelGraphics._uri, time); - + var uri; var modelHash = this._modelHash; var modelData = modelHash[entity.id]; - var show = defined(position) && defined(uri) && entity.isAvailable(time) && Property.getValueOrDefault(modelGraphics._show, time, true); + var show = entity.isAvailable(time) && Property.getValueOrDefault(modelGraphics._show, time, true); + + if (show) { + position = Property.getValueOrUndefined(entity._position, time, position); + uri = Property.getValueOrUndefined(modelGraphics._uri, time); + show = defined(position) && defined(uri); + } if (!show) { if (defined(modelData)) { diff --git a/Source/DataSources/PointVisualizer.js b/Source/DataSources/PointVisualizer.js index da0a816912b6..c85e222f9726 100644 --- a/Source/DataSources/PointVisualizer.js +++ b/Source/DataSources/PointVisualizer.js @@ -112,12 +112,9 @@ define([ return; } - position = Property.getValueOrUndefined(entity._position, time, position); - var billboard; var pointVisualizerIndex = entity._pointVisualizerIndex; - var show = entity.isAvailable(time) && defined(position) && Property.getValueOrDefault(pointGraphics._show, time, true); - + var show = entity.isAvailable(time) && Property.getValueOrDefault(pointGraphics._show, time, true) && defined(Property.getValueOrUndefined(entity._position, time, position)); if (!show) { //don't bother creating or updating anything else if (defined(pointVisualizerIndex)) {