Show:

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:

Methods

create

(
  • callback
)

I call the create method of all my sub-modules, and set the window resize event listener.

Parameters:

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"

Parameters:

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: