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

Named layer access via project #491

Closed
martinmeeser opened this issue Jun 16, 2014 · 3 comments
Closed

Named layer access via project #491

martinmeeser opened this issue Jun 16, 2014 · 3 comments

Comments

@martinmeeser
Copy link

From my point of you it might be useful to have a named access to the project's layers as one has with named items in a group.

var layer = new paper.Layer({name: 'test'});

// later in code

var theLayer = paper.project['test']; // IMHO this would be nice

currently I am doing:

var theLayer = paper.project.getItem({name: 'test');

// this is ok of course ...

@lehni
Copy link
Member

lehni commented Jul 25, 2014

Yes this can be considered. But if we followed the logic of named access of children on the children lists of their parents, then it would be:

var layer = paper.project.layers['test'];

Sounds good?

I'd like to offer this also for segments...

@martinmeeser
Copy link
Author

... sounds good to me. :-)

@lehni lehni self-assigned this Jan 8, 2016
lehni added a commit that referenced this issue Jan 11, 2016
…s are handled as owners.

This automatically adds support for named children on project.layers, closing #491.
@lehni
Copy link
Member

lehni commented Jan 11, 2016

This took way too long, but will finally be in the next release.

@lehni lehni closed this as completed Jan 11, 2016
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

2 participants