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

Define navigatorBehaviors through object notation instead of array of IHasState* #56

Open
PaulTondeur opened this issue Nov 1, 2013 · 0 comments

Comments

@PaulTondeur
Copy link
Member

Instead of defining the navigatorBehaviors the following way:

navigatorBehaviors: ["IHasStateInitialization","IHasStateTransition"],

It might be more flexible to do:

navigatorBehaviors: {
    initialize: 'myInitializeMethod',
    transition: {
        in: 'myTransitionInMethod',
        out: 'myTransitionOutMethod'
    }
}

This allows the user to use the methods of choice instead of dictating them. This code is also a bit more descriptive over methods that just gets called on responder.

Maybe the array notation should be maintained, so we can fall back at using defaults? This also allows for backwards compatibility.

Anyone more thoughts on this?

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

1 participant