#bigwheel
##class: bigwheel~bigwheel
Members
###new bigwheel~bigwheel(settingsFunc)
When instantiating bigwheel you must pass in a setup function.
In this function you may do any preparation that must be done for your
application such as creating a global Canvas element or something else.
The setup function must either return a settings object for bigwheel or
this function must receive a callback which you will call with the settings
object. Furthermore you can pass back a promise from this settings function
which will receive the settings object.
The following documents what can be passed in the settings object:
{
routes: {
'/': someSection,
'/someOther': someOtherSection,
'404': sectionFourOhFour
},
initSection: preSection,
autoResize: true,
postHash: '#!',
}
Params
- settingsFunc
function
- This settings function will be used to
initialize bigwheel.
Scope: inner class of bigwheel
###bigwheel.init()
init must be called to start the framework. This was done to allow for
a developer to have full control of when bigwheel starts doing it's thing.
###bigwheel.go(to)
go can be called to go to another section.
Params
- to
String
- This is the route you want to go to.
Example
framework.go( '/landing' );
###bigwheel.resize(w, h)
Resize can be called at any time. The values passed in for
width and height will be passed to the currently instantiated
sections.
If autoResize
was not passed in or it was true then resize
will automatically be called when the window of the browser
resizes.
Params
- w
Number
- width value you'd like to pass to the sections - h
Number
- height value you'd like to pass to the sections