Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

More 3D Tiles inspector cleanup #5244

Merged
merged 1 commit into from
Apr 27, 2017
Merged

More 3D Tiles inspector cleanup #5244

merged 1 commit into from
Apr 27, 2017

Conversation

hpinkos
Copy link
Contributor

@hpinkos hpinkos commented Apr 26, 2017

Made the following changes to Cesium3DTilesInspectorViewModel:

  • Replaced propertiesText string with properties, which is an array of strings
  • Made _feature observable
  • Added a getter for the performanceContainer parameter
  • Fixed weird logic with how we get and set the tileset style
  • Added a getter for Cesium3DTileFeature.content and Cesium3DTileContent.url

* @param {Cesium3DTileFeature} feature The feature
* @returns {String} The url to that feature's tile
*/
Cesium3DTilesInspectorViewModel.prototype.getFeatureUrl = function(feature) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we are doing this here rather than exposing url on the feature? (Or maybe even exposing content on the feature and then url on the content? url on the feature seems like the minimal desired change here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I misunderstood, but this is what I thought you recommended that I do

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if there was miscommunication, I would much rather see feature.content.url, Since Cesium3DTileContent takes url as one of it's constructor parameters, we should definitely expose it, same for Cesium3DTileFeature. In general, a class should always expose the core components that it takes in it's primary constructor as properties.

@mramato
Copy link
Contributor

mramato commented Apr 26, 2017

Just the one comment.

@hpinkos
Copy link
Contributor Author

hpinkos commented Apr 27, 2017

@mramato ready

},

/**
* Gets the url of the tile's content
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We end doc comments with a period.

},

/**
* Part of the {@link Cesium3DTileContent} interface.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be the same exact doc as Cesium3DTileContent (too bad we can't use @inheritdoc since it's not real inheritance).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied what the doc is for the rest of the properties in this file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so they are wrong too, we'll fix that when 3D-tiles get PRed into master but no need to add to it.

* @type {String}
* @readonly
*
* @private
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this private? We plan on using it externally so it should be public.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto too.

},

/**
* Gets the feature content
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another missing period.

@mramato
Copy link
Contributor

mramato commented Apr 27, 2017

Just those couple of additional comments.

@hpinkos
Copy link
Contributor Author

hpinkos commented Apr 27, 2017

@mramato ready

@hpinkos hpinkos force-pushed the 3dtilesinspectorcleanup branch from d2adc66 to 502f00f Compare April 27, 2017 14:18
@hpinkos
Copy link
Contributor Author

hpinkos commented Apr 27, 2017

Okay, actually ready now @mramato

@mramato
Copy link
Contributor

mramato commented Apr 27, 2017

Thanks @hpinkos! I'll merge as soon as this goes green.

@mramato mramato merged commit 8a8a4f0 into 3d-tiles Apr 27, 2017
@mramato mramato deleted the 3dtilesinspectorcleanup branch April 27, 2017 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants