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

Fix map controller class extensibility #674

Merged
merged 2 commits into from
Dec 6, 2018
Merged

Conversation

Pessimistress
Copy link
Collaborator

For #669

  • Do not use arrow function for handleEvent
  • Add example for testing

@@ -204,14 +205,18 @@ export default class MapController {
}

toggleEvents(eventNames: Array<string>, enabled: boolean) {
// Bind the method here instead of in the constructor, so that inherited classes
// do not have to do binding themselves
Copy link

Choose a reason for hiding this comment

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

Not sure why you need to do this here. If you bind in the constructor as was the case before then any class that extends this one should call super() it its constructor which should trigger the binding.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm I seem to have confused this with a legacy autobinder issue we had. Will revert to the good old way of binding.

@Pessimistress Pessimistress merged commit f01b195 into master Dec 6, 2018
@Pessimistress Pessimistress deleted the handle-event-override branch December 6, 2018 21:49
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.

3 participants