API Docs for: 2.0.0

Class image_viewer

Class defined in: public/src/image_viewer.js:18

Image viewing application

draw( date )
public/src/image_viewer.js:240

Draw function, empty since the img tag is in the DOM

Parameters:
  • date <Date>

    current time from the server

event( eventType, position, user_id, data, date )
public/src/image_viewer.js:322

Handles event processing for the app

Parameters:
  • eventType <String>

    the type of event

  • position <Object>

    contains the x and y positions of the event

  • user_id <Object>

    data about the user who triggered the event

  • data <Object>

    object containing extra data about the event,

  • date <Date>

    current time from the server

init( data )
public/src/image_viewer.js:25

Init method, creates an 'img' tag in the DOM

Parameters:
  • data <Object>

    contains initialization values (id, width, height, state, ...)

load( date )
public/src/image_viewer.js:55

Load the app from a previous state

Parameters:
  • date <Date>

    time from the server

makeDoodle( responseObject )
public/src/image_viewer.js:219

Called through context menu. Starts a doodle app with this image.

Parameters:
  • responseObject <Object>

    standard context values.

move( date )
public/src/image_viewer.js:260

Move callback

Parameters:
  • date <Date>

    current time from the server

onVisible( visibility )
public/src/image_viewer.js:106

Visibility callback, when app becomes locally visible or hidden. Called during preDraw

Parameters:
  • visibility <Bool>

    became visible or hidden

resize( date )
public/src/image_viewer.js:249

Resize callback

Parameters:
  • date <Date>

    current time from the server

showEXIF( responseObject )
public/src/image_viewer.js:304

Show / Hide EXIF overlay.

Parameters:
  • responseObject <Object>

    contains response from entry selection

syntaxHighlight( json )
public/src/image_viewer.js:271

Parse JSON object and add colors

Parameters:
  • json <Object>

    object containing metadata

updateAppFromState( )
public/src/image_viewer.js:66

Update the app from it's new state