Show:

I am the RouteNavigation.

I parse the query and the hash fragment of the current URL, and expose those parameters to the app. Also, I listen to changes in the hash fragment, and can call callbacks for them.

Methods

checkEnvironment

() private

I return an object with various info about the execution environment.

Returns:

Object

getHashVariable

(
  • variable
)
private

I return the value of a hash parameter.

Parameters:

Returns:

String

getQueryVariable

(
  • variable
)
private

I return the value of a query parameter.

Parameters:

Returns:

String

getResourceURL

(
  • src
)

I return a complete path (or URL) for a resource file based on the src attribute of a resource object.

Parameters:

Returns:

String

routeHasChanged

() private

I update the application state, when the hash fragment has changed.

Currently, I am only listing to changes of the parameter "annotations" and "t" (hashTime).

setHashVariable

(
  • id
)
private

I set the hypervideo id (in case it changes while the application is running).

Parameters:

setHashVariable

(
  • key
  • value
)
private

I change the value of a hash parameter.

Parameters:

Attributes

hashTime

String

I get or set the hashTime (#t=) fragment

hypervideoID

String readonly

The hypervideoID, as parsed from the query part of the URL.

id

String

Manually set the hypervideo id.

onAnnotationChange

Function

NOT USED YET

Will be called, when the hash fragment's annotationID changes.

onHashTimeChange

Function

Will be called, when the hashTime (#t=) fragment changes.

projectID

String readonly

The projectID, as parsed from the query part of the URL.