Methods
(static) bind_run_input()
binds each machine input to the run_input function
(inner) bind_context_menu()
replaces the default context menu
(inner) bind_context_menu_navbar()
bind context menu for side nav bar and secondary side navbar
(inner) bind_dd()
press dd does delete
(inner) bind_double_click()
handles double click
(inner) bind_drag()
binds callback functions to the mouse dragging behavior and deletes if event is dropped over trash
(inner) bind_machine_transform()
handles the NFA to DFA button
(inner) bind_mousemove()
change cursor style when hovering over certain elements
(inner) bind_permalink()
button to generate permanent link
(inner) bind_save_drawing()
hook up the save button
(inner) bind_scroll()
zooming in and out
(inner) bind_switch_machine()
handle switching machine type event
(inner) bind_undo_redo()
offers ctrl-z and ctrl-shift-z features
(inner) drag_scene(e)
shift the entire graph by dx and dy
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | mousemove event |
(inner) higher_order_drag_edge(edge) → {function}
creates a callback function that handles dragging an edge
Parameters:
Name | Type | Description |
---|---|---|
edge |
Object | the edge you are dragging |
Returns:
a callback function that handles dragging an edge
- Type
- function
(inner) higher_order_drag_vertex(v) → {function}
builds a drag vertex callback function
Parameters:
Name | Type | Description |
---|---|---|
v |
string | name of the vertex to be dragged |
Returns:
a callback function to handle dragging a vertex
- Type
- function
(inner) higher_order_edge_animation(v) → {function}
creates a callback function to handle edge creation animation
Parameters:
Name | Type | Description |
---|---|---|
v |
string | the vertex from which the edge is stemmed from |
Returns:
a function that handles drawing an edge from v on mousedrag
- Type
- function
(inner) init()
run after all the contents are loaded to hook up callbacks
(inner) init_graph()
draw the first graph (possibly by deserializing the permalink)
(inner) refresh_graph()
get the newest graph from history and draw it