Last modified: Mon, 04/03/2017 - 17:28
API for the LASSlideSorter javascript component.
Class LASSlideSorter
Object
|
+--LASSlideSorter
- class LASSlideSorter
This is the basic LASSlideSorter class.
Defined in LASSlideSorter.js
Field Summary | |
Object |
anomalyMode |
Object |
chosenMenuName |
Object |
form |
Object |
InitObject |
Object |
numCols |
Object |
numRows |
Object |
Widgets |
Constructor Summary | |
LASSlideSorter (<string> form,init_object) Construct a new LASSlideSorter object. |
Method Summary | |
void |
createCellWidgets(chosenMenuName) Populates each of the image cell Widget objects with the first N options defined in a single 'Menu'. |
void |
createGlobalRadios() Associates values and onclick() event handlers with the 'lss_G#Radio' radio buttons defined in the HTML page. |
void |
createGlobalWidgets() Populates each of the global Widget objects with options from the 'Menu's defined in the HTML page. |
Object |
getCellAA(<int> row,<int> col) Returns the Associative Array of information associated with a particular row and column of the Slidesorter. |
void |
loadAllImages() Reloads all the images in the table based on the current values of the Widget objects. |
void |
loadContentCell(row,col) Loads in image into a specified cell based on the current values of the Widget objects. |
void |
render(<string> element_id,<int> rows,<int> cols,<string> initial_menu) Creates the SlideSorter table with the desired number of rows and columns. |
Object |
switchMode(<int> mode) Switches the mode of the SlideSorter between 'Regular' and 'Anomaly' mode. |
Field Detail |
anomalyMode
Object anomalyMode
chosenMenuName
Object chosenMenuName
form
Object form
InitObject
Object InitObject
numCols
Object numCols
numRows
Object numRows
Widgets
Object Widgets
Constructor Detail |
LASSlideSorter
LASSlideSorter(<string> form,init_object)
- Construct a new LASSlideSorter object.
- Parameters:
form
- name of the form in which the LASSlideSorter is located population of the table- Returns:
- A new LASSlideSorter object
Method Detail |
createCellWidgets
void createCellWidgets(chosenMenuName)
- Populates each of the image cell Widget objects with the first N options defined in a single 'Menu'.
createGlobalRadios
void createGlobalRadios()
- Associates values and onclick() event handlers with the 'lss_G#Radio' radio buttons defined in the HTML page.
createGlobalWidgets
void createGlobalWidgets()
- Populates each of the global Widget objects with options from the 'Menu's defined in the HTML page.
getCellAA
Object getCellAA(<int> row,<int> col)
- Returns the Associative Array of information associated with a particular row and column of the Slidesorter. This is the same AA structure that used by the loadContentCell() method to communicate with the createLASRequest() method in the SlideSorter.vm template.
- Parameters:
row
- row numbercol
- column number- Returns:
- AA Associative Array object with widget selection information
loadAllImages
void loadAllImages()
- Reloads all the images in the table based on the current values of the Widget objects.
loadContentCell
void loadContentCell(row,col)
- Loads in image into a specified cell based on the current values of the Widget objects.
render
void render(<string> element_id,<int> rows,<int> cols,<string> initial_menu)
- Creates the SlideSorter table with the desired number of rows and columns. The number of widgets to create is determined from the length of the this.InitObject.
- Parameters:
element_id
- 'id' attribute of the element into which the LASSlideSorter is inserted.rows
- number of rows in the SlideSortercols
- number of cols in the SlideSorterinitial_menu
- name of the 'Menu' that will be used for the initial population of the tableswitchMode
Object switchMode(<int> mode)
- Switches the mode of the SlideSorter between 'Regular' and 'Anomaly' mode. In 'Anomaly' mode, the upper left cell behaves the same but all other cells return a difference between what they specify and what is specified in the upper left cell.
This behavior requires intelligence in both LASSlideSorter.js and SlideSorter.vm
- Parameters:
mode
- mode identifier (0 = Regular, 1 = Anomaly)col
- column number- Returns:
- AA Associative Array object with widget selection information