Interface Module
frametrail/player/modules/Interface/module.js:6
I am the Interface module.
I am the central place which inititalizes and coordinates all other interface-related modules.
When this module is loaded, it loads also:
- Titlebar
- Sidebar
- ViewOverview
- ViewVideo (when there is a hypervideo present)
- ViewResources
Item Index
Methods
create
-
callback
I call the create method of all my sub-modules, and set the window resize event listener.
Parameters:
-
callback
Function
initWindowResizeHandler
()
I set the event listener for the resize event of the window.
This event triggers a change of the global state "viewSize", so all modules can react to this event.
Also, after the .create() method of all interface modules has been called, I trigger once the resize event, to propagate a valid state "viewSize" throughout the app.
toggleEditMode
-
editMode
-
oldEditMode
I react to a change in the global state "editMode"
toggleSidebarOpen
-
opened
When the global state "sidebarOpen" changes, I react to it.
Most importantly, I assure that the <div id="MainContainer"> is resized before the ViewVideo.toggleSidebarOpen is called.
Parameters:
-
opened
Boolean