Namespace: UI

Annotator.UI

The UI logic.
Source:

Members

(private, inner) annotatorElm :Element

Wrapper element for the annotator app.
Type:
  • Element
Source:

Methods

(static) Run() → {undefined}

Initialize annotator UI.
Source:
Returns:
Type
undefined
Example
Annotator.UI.Run();
 

(private, inner) AnnotatorIO_TweetHandler(json) → {undefined}

Handling io calls.
Parameters:
Name Type Description
json ioCallJsonResult result of io call
Source:
Returns:
Type
undefined

(private, inner) Document_KeyDownHandler(event) → {undefined}

Keyboard event handler for handling key pressing down.
Parameters:
Name Type Description
event KeyboardEvent keydown event object
Source:
Returns:
Type
undefined

(private, inner) Document_KeyUpHandler(event) → {undefined}

Keyboard event handler for handling key releasing.
Parameters:
Name Type Description
event KeyboardEvent keyup event object
Source:
Returns:
Type
undefined

(private, inner) Form_SubmitHandler(event) → {undefined}

Submit handler for annotator form.
Parameters:
Name Type Description
event Event submit event
Source:
Returns:
Type
undefined

(private, inner) GetTweet(ioCall) → {undefined}

Get next or previous tweet helper function.
Parameters:
Name Type Description
ioCall function next or previous tweet io call.
Source:
Returns:
Type
undefined

(private, inner) GetTweetByNumber(num) → {undefined}

Gets a specific tweet for annotation by number.
Parameters:
Name Type Description
num number tweet number
Source:
Returns:
Type
undefined

(private, inner) GoBtn_ClickHandler() → {undefined}

Click handler for Button "GoBtn".
Source:
Returns:
Type
undefined

(private, inner) HelpBtn_ClickHandler() → {undefined}

Click handler for Button "HelpBtn".
Source:
Returns:
Type
undefined

(private, inner) IrrelevantBtn_ClickHanlder() → {undefined}

Click handler for Button "IrrelevantBtn".
Source:
Returns:
Type
undefined

(private, inner) NeutralBtn_ClickHanlder() → {undefined}

Click handler for Button "NeutralBtn".
Source:
Returns:
Type
undefined

(private, inner) NextBtn_ClickHandler() → {undefined}

Click handler for Button "NextBtn".
Source:
Returns:
Type
undefined

(private, inner) OpinionatedBtn_ClickHanlder() → {undefined}

Click handler for Button "OpinionatedBtn".
Source:
Returns:
Type
undefined

(private, inner) PauseBtn_ClickHandler() → {undefined}

Click handler for Button "PauseBtn".
Source:
Returns:
Type
undefined

(private, inner) PreviousBtn_ClickHandler() → {undefined}

Click handler for Button "PreviousBtn".
Source:
Returns:
Type
undefined

(private, inner) SendAnnotation(annotation) → {undefined}

Send annotation of tweet to server.
Parameters:
Name Type Description
annotation string chosen text
Source:
Returns:
Type
undefined

(private, inner) SendPause() → {undefined}

Send pause to server.
Source:
Returns:
Type
undefined

(private, inner) SendResume() → {undefined}

Send resume to server.
Source:
Returns:
Type
undefined

(private, inner) SetNavigation(json) → {undefined}

Set browser navigation.
Parameters:
Name Type Description
json ioCallJsonResult result of io call
Source:
Returns:
Type
undefined

(private, inner) SetNextPreviousButton(hasNext, hasPrevious) → {undefined}

Set button state for next and previous tweet.
Parameters:
Name Type Description
hasNext boolean has next tweet to annotate
hasPrevious boolean has previous tweet to annotate
Source:
Returns:
Type
undefined

(private, inner) SetStatus(json) → {undefined}

Set statistics of annotation, like how many are annotated.
Parameters:
Name Type Description
json ioCallJsonResult result of io call
Source:
Returns:
Type
undefined

(private, inner) SetTitle(currentTweetNum) → {undefined}

Set website title.
Parameters:
Name Type Description
currentTweetNum number current number of tweet
Source:
Returns:
Type
undefined

(private, inner) SetTweet(tweet) → {undefined}

Set current tweet text.
Parameters:
Name Type Description
tweet string tweet text
Source:
Returns:
Type
undefined

(private, inner) SetUrlHash(currentTweetNum) → {undefined}

Set browser URL-hash.
Parameters:
Name Type Description
currentTweetNum number current number of tweet
Source:
Returns:
Type
undefined

(private, inner) ShowButtonPress(elm) → {undefined}

Shows button press state by toggle active class.
Parameters:
Name Type Description
elm Element the element
Source:
Returns:
Type
undefined

(private, inner) ShowButtonPressReset() → {undefined}

Resets button press state for all buttons by toggling the active class off.
Source:
Returns:
Type
undefined

(private, inner) ToggleHelp() → {undefined}

Open or close the help.
Source:
Returns:
Type
undefined

(private, inner) Window_HashchangeHandler() → {undefined}

Handler for window 'hashchange' event.
Source:
Returns:
Type
undefined