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

Check of the usefulness of the Layer properties #921

Open
gchoqueux opened this issue Nov 26, 2018 · 2 comments
Open

Check of the usefulness of the Layer properties #921

gchoqueux opened this issue Nov 26, 2018 · 2 comments

Comments

@gchoqueux
Copy link
Contributor

In Layer class two properties aren't, may be, usefulness.

in constructor:

  1. this.options
this.options = config.options || {};

config.options has been almost removed since the creation of the sources, so it doesn't have much senses to keep it.

  1. Object.assign(this, config)

This assignment exists to not forget layer properties. It would assume and document all properties and not used Object.Assign.

@mbredif
Copy link
Collaborator

mbredif commented Nov 26, 2018

Feel free to simplify things, but please keep something that is extensible by design ! (support custom layers with custom properties, custom sharders...)

@zarov
Copy link
Contributor

zarov commented Nov 26, 2018

config.options has been almost removed since the creation of the sources, so it doesn't have much senses to keep it.

Ok for deprecating this.options.

This assignment exists to not forget layer properties. It would assume and document all properties and not used Object.Assign.

I'm for removing this too, we need to complete the documentation first though.

Feel free to simplify things, but please keep something that is extensible by design ! (support custom layers with custom properties, custom shaders...)

Yes for extensible design: all properties of a layer, source etc... are accessible after instantiation. Is there a case where this would cause problems ? (for example in the init of a certain type of layer ?)

@mgermerie mgermerie added this to the 2.xx.x milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants