Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

readyPromise to contentReadyPromise #3512

Merged
merged 1 commit into from
Feb 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/Scene/Cesium3DTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ define([
*
* @private
*/
this.readyPromise = when.defer();
this.contentReadyPromise = when.defer();

var content;
var hasContent;
Expand Down Expand Up @@ -243,12 +243,12 @@ define([
--that.parent.numberOfChildrenWithoutContent;
}

that.readyPromise.resolve(that);
that.contentReadyPromise.resolve(that);
}).otherwise(function(error) {
// In this case, that.parent.numberOfChildrenWithoutContent will never reach zero
// and therefore that.parent will never refine. If this becomes an issue, failed
// requests can be reissued.
that.readyPromise.reject(error);
that.contentReadyPromise.reject(error);
});

// Members that are updated every frame for tree traversal and rendering optimizations:
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ define([

var removeFunction = removeFromProcessingQueue(tiles3D, tile);
when(tile.contentReadyToProcessPromise).then(addToProcessingQueue(tiles3D, tile)).otherwise(removeFunction);
when(tile.readyPromise).then(removeFunction).otherwise(removeFunction);
when(tile.contentReadyPromise).then(removeFunction).otherwise(removeFunction);
}
}

Expand Down
6 changes: 3 additions & 3 deletions Specs/Scene/Cesium3DTilesetSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ defineSuite([
// Set view so that root's content is requested
viewRootOnly();
scene.renderForSpecs();
return root.readyPromise.then(function() {
return root.contentReadyPromise.then(function() {
// Root has one child now, the root of the external tileset
expect(root.children.length).toEqual(1);

Expand Down Expand Up @@ -830,7 +830,7 @@ defineSuite([
expect(stats.numberOfPendingRequests).toEqual(1);
scene.primitives.remove(tileset);

return root.readyPromise.then(function(root) {
return root.contentReadyPromise.then(function(root) {
fail('should not resolve');
}).otherwise(function(error) {
// Expect the root to not have added any children from the external tileset.json
Expand All @@ -850,7 +850,7 @@ defineSuite([
scene.renderForSpecs(); // Request root
scene.primitives.remove(tileset);

return root.readyPromise.then(function(root) {
return root.contentReadyPromise.then(function(root) {
fail('should not resolve');
}).otherwise(function(error) {
expect(content.state).toEqual(Cesium3DTileContentState.FAILED);
Expand Down