From 502f00f306f6374a588eef73d3b9b8f21a7c386b Mon Sep 17 00:00:00 2001 From: hpinkos Date: Thu, 27 Apr 2017 10:18:08 -0400 Subject: [PATCH] update 3d tiles inspector --- Source/Scene/Batched3DModel3DTileContent.js | 12 ++++ Source/Scene/Cesium3DTileContent.js | 12 ++++ Source/Scene/Cesium3DTileFeature.js | 15 ++++ Source/Scene/Composite3DTileContent.js | 12 ++++ Source/Scene/Empty3DTileContent.js | 12 ++++ Source/Scene/Instanced3DModel3DTileContent.js | 12 ++++ Source/Scene/PointCloud3DTileContent.js | 12 ++++ Source/Scene/Tileset3DTileContent.js | 12 ++++ .../Cesium3DTilesInspector.js | 2 +- .../Cesium3DTilesInspectorViewModel.js | 69 ++++++++++++------- .../Cesium3DTilesInspectorViewModelSpec.js | 10 +-- 11 files changed, 150 insertions(+), 30 deletions(-) diff --git a/Source/Scene/Batched3DModel3DTileContent.js b/Source/Scene/Batched3DModel3DTileContent.js index 11bf088f2f2f..018de195d56c 100644 --- a/Source/Scene/Batched3DModel3DTileContent.js +++ b/Source/Scene/Batched3DModel3DTileContent.js @@ -173,6 +173,18 @@ define([ get : function() { return this._readyPromise.promise; } + }, + + /** + * Gets the url of the tile's content. + * @memberof Cesium3DTileContent.prototype + * @type {String} + * @readonly + */ + url: { + get: function() { + return this._url; + } } }); diff --git a/Source/Scene/Cesium3DTileContent.js b/Source/Scene/Cesium3DTileContent.js index d5fe0bbdefc7..5724d73a1f3f 100644 --- a/Source/Scene/Cesium3DTileContent.js +++ b/Source/Scene/Cesium3DTileContent.js @@ -191,6 +191,18 @@ define([ get : function() { DeveloperError.throwInstantiationError(); } + }, + + /** + * Gets the url of the tile's content. + * @memberof Cesium3DTileContent.prototype + * @type {String} + * @readonly + */ + url: { + get: function() { + DeveloperError.throwInstantiationError(); + } } }); diff --git a/Source/Scene/Cesium3DTileFeature.js b/Source/Scene/Cesium3DTileFeature.js index c82894b8353a..88f324061b3d 100644 --- a/Source/Scene/Cesium3DTileFeature.js +++ b/Source/Scene/Cesium3DTileFeature.js @@ -100,6 +100,21 @@ define([ set : function(value) { this._batchTable.setColor(this._batchId, value); } + }, + + /** + * Gets the feature content. + * + * @memberof Cesium3DTileFeature.prototype + * + * @type {Cesium3DTileContent} + * + * @readonly + */ + content: { + get: function() { + return this._content; + } } }); diff --git a/Source/Scene/Composite3DTileContent.js b/Source/Scene/Composite3DTileContent.js index 7bbc5d4b7350..cdad31ab3efe 100644 --- a/Source/Scene/Composite3DTileContent.js +++ b/Source/Scene/Composite3DTileContent.js @@ -161,6 +161,18 @@ define([ get : function() { return this._readyPromise.promise; } + }, + + /** + * Gets the url of the tile's content. + * @memberof Cesium3DTileContent.prototype + * @type {String} + * @readonly + */ + url: { + get: function() { + return this._url; + } } }); diff --git a/Source/Scene/Empty3DTileContent.js b/Source/Scene/Empty3DTileContent.js index 503577a7811c..d5991944b921 100644 --- a/Source/Scene/Empty3DTileContent.js +++ b/Source/Scene/Empty3DTileContent.js @@ -121,6 +121,18 @@ define([ get : function() { return this._readyPromise.promise; } + }, + + /** + * Gets the url of the tile's content. + * @memberof Cesium3DTileContent.prototype + * @type {String} + * @readonly + */ + url: { + get: function() { + return this._url; + } } }); diff --git a/Source/Scene/Instanced3DModel3DTileContent.js b/Source/Scene/Instanced3DModel3DTileContent.js index 9e9c543b1373..369be974f885 100644 --- a/Source/Scene/Instanced3DModel3DTileContent.js +++ b/Source/Scene/Instanced3DModel3DTileContent.js @@ -196,6 +196,18 @@ define([ get : function() { return this._readyPromise.promise; } + }, + + /** + * Gets the url of the tile's content. + * @memberof Cesium3DTileContent.prototype + * @type {String} + * @readonly + */ + url: { + get: function() { + return this._url; + } } }); diff --git a/Source/Scene/PointCloud3DTileContent.js b/Source/Scene/PointCloud3DTileContent.js index 07034d7618d7..721f16658c0f 100644 --- a/Source/Scene/PointCloud3DTileContent.js +++ b/Source/Scene/PointCloud3DTileContent.js @@ -229,6 +229,18 @@ define([ get : function() { return this._readyPromise.promise; } + }, + + /** + * Gets the url of the tile's content. + * @memberof Cesium3DTileContent.prototype + * @type {String} + * @readonly + */ + url: { + get: function() { + return this._url; + } } }); diff --git a/Source/Scene/Tileset3DTileContent.js b/Source/Scene/Tileset3DTileContent.js index 4110b9cf525a..e291f5500084 100644 --- a/Source/Scene/Tileset3DTileContent.js +++ b/Source/Scene/Tileset3DTileContent.js @@ -119,6 +119,18 @@ define([ get : function() { return this._readyPromise.promise; } + }, + + /** + * Gets the url of the tile's content. + * @memberof Cesium3DTileContent.prototype + * @type {String} + * @readonly + */ + url: { + get: function() { + return this._url; + } } }); diff --git a/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.js b/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.js index e01bfdb9889b..8679a2f0d14e 100644 --- a/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.js +++ b/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.js @@ -139,7 +139,7 @@ define([ propertiesLabel.className = 'field-label'; propertiesLabel.appendChild(document.createTextNode('Properties: ')); var propertiesField = document.createElement('div'); - propertiesField.setAttribute('data-bind', 'text: propertiesText'); + propertiesField.setAttribute('data-bind', 'text: properties'); properties.appendChild(propertiesLabel); properties.appendChild(propertiesField); tilesetPanelContents.appendChild(properties); diff --git a/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js b/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js index f75f88b00db9..6f835e58e02f 100644 --- a/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js +++ b/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js @@ -63,8 +63,8 @@ define([ // multiple frustums. '
  • Commands: ' + stats.numberOfCommands.toLocaleString() + '
  • '; s += ''; - s += '