Contains all event handlers.
- Source:
Methods
-
<static> onAddTable(nr)
-
When the button to add a table is clicked.
Parameters:
Name Type Description nr
table_nr Table number
- Source:
-
<static> onArrow(value, from, to)
-
When the end point of a connection between two tables is changed via a selector box.
Parameters:
Name Type Description value
string The selected value in the selector box ('', 'line' or 'arrow').
from
table_nr Number of the table from which the connection starts.
to
table_nr Number of the table to which the connection goes.
- Source:
Example
onArrow( 'arrow', 1, 2 ) // Setting an arrow for the connection from entity table 1 to entity table 2 [E1]->[E2]
-
<static> onCorrection()
-
When the button is clicked that allows the user to correct an incorrect solution.
- Source:
-
<static> onEditTable(nr)
-
When the button for editing the table attributes is clicked.
Parameters:
Name Type Description nr
table_nr Table number
- Source:
-
<static> onFinish()
-
When the button that finishes the app is clicked.
- Source:
-
<static> onLegend()
-
When the button to show the notation legend is clicked.
- Source:
-
<static> onNext()
-
When the button that starts the next phrase is clicked.
- Source:
-
<static> onNotation(value [, show_solution])
-
When the notation used in the ER diagram is switched.
Parameters:
Name Type Argument Description value
string ID of the selected notation.
show_solution
boolean <optional>
Correct solution is revealed.
- Source:
-
<static> onRemoveTable(nr)
-
When the button for removing a table is clicked.
Parameters:
Name Type Description nr
table_nr Table number
- Source:
-
<static> onSolution()
-
When the button showing the sample solution for the current phrase is clicked.
- Source:
-
<static> onSubmit()
-
When the button is clicked that allows the user to submit a solution.
- Source:
-
<static> onToggleBadge(table, attr, badge_nr)
-
When a badge of a key attribute is clicked.
Parameters:
Name Type Description table
table_nr Table number
attr
table_nr Table that references the attribute as a foreign key.
badge_nr
number 0: NULL, 1: NOT NULL, 2: PK, 3: AK, 4: FK0, 5: FK1, 6: FK2, 7: FK3, 8: FK4
- Source: