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

Load function should be called with layer as context #130

Open
natevw opened this issue Sep 3, 2012 · 0 comments
Open

Load function should be called with layer as context #130

natevw opened this issue Sep 3, 2012 · 0 comments

Comments

@natevw
Copy link

natevw commented Sep 3, 2012

It'd be cleaner to write an ad-hoc layer "subclass" without actually subclassing one if the load function were called with the layer as its this context:

map.add(po.layer(function () {
    console.log(this,arguments);
}));

Currently this logs "Window" as the first object, and the layer is not available to the function unless it is captured in the outer scope.

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

No branches or pull requests

1 participant