API Docs for: 2.0.0

Class SAGE2_Session

Class defined in: public/src/SAGE2_Session.js:15

SAGE2 Session page code

addAppToTracking( app )
public/src/SAGE2_RemoteSitePointer.js:191

This is used to track apps that use remote pointer data. More specifically how to remove the pointer when a user leaves pointer mode.

Parameters:
  • app <Object>

    the app which is using remote pointer data

appQuitingHidePointers( app )
public/src/SAGE2_RemoteSitePointer.js:204

When an app quits / terminates, hide the associated remote pointers so they aren't stuck on the screen. Done by setting hidden to true and setting last update to now, then calling the update function, which will hide.

Parameters:
  • app <Object>

    the app which check for remote pointer removal

checkIfAppNeedsUpdate( app )
public/src/SAGE2_RemoteSitePointer.js:100

Usually called after SAGE2Load, to see if this app needs to have pointers updated. However also can be called after resize or move to make sure the pointers don't get left behind.

Parameters:
  • app <Object>

    app which called this function

notifyAppsPointerIsHidden( pointer_data )
public/src/SAGE2_RemoteSitePointer.js:230

This is used to track apps that use remote pointer data. More specifically how to remove the pointer when a user leaves pointer mode.

Parameters:
  • pointer_data <Object>

    contains information about user: color, id, label

SAGE2_init( )
public/src/SAGE2_Session.js:36

Entry point of the application

trackEvent( app, event )
public/src/SAGE2_RemoteSitePointer.js:67

Testing event passing for remote pointers

Parameters:
  • app <Object>

    app which called this function

  • event <Object>

    contains information about event: eventType, position, user_id, data, date

trackPointer( app, user_id, position )
public/src/SAGE2_RemoteSitePointer.js:21

Will be activated locally, but stores the data into state to share remotely.

Parameters:
  • app <Object>

    app which called this function

  • user_id <Object>

    contains information about user: color, id, label

  • position <Object>

    contains location of cursor with app's top left corner as origin

updateRemotePointer( pointer_data, app )
public/src/SAGE2_RemoteSitePointer.js:113

This will be called anytime an app has a data sync. Show all remote pointers if they should be over this app.

Parameters:
  • pointer_data <Object>

    contains information about user: color, id, label, positionInPercent, lastUpdate

  • app <Object>

    app which called this function