Class: Workspace

Syntree.Workspace

Workspace is in charge of taking user input, sanitizing it, and sending it to the appropriate lower-level control structure.

Constructor

new Workspace()

Source:

Members

(static) export_tree_script :string

Path to a PHP script for exporting a tree. Script should return a download link for an export file on success, or false on failure.
Type:
  • string
Source:
See:
  • Syntree.Workspace._eventExprt

(static) focus_checking_enabled :boolean

Is focus checking enabled? Focus checking is for if the app is embedded within a larger page. It prevents confusion about whether or not the app has focus.
Type:
  • boolean
Source:

(static) tutorial_enabled :boolean

Is the tutorial enabled?
Type:
  • boolean
Source:
See:

(static) upload_enabled :boolean

Is uploading enabled?
Type:
  • boolean
Source:
See:

Methods

(static) _attachEventListeners()

Attach various event listeners needed for processing user input. This function is a convenience only, used so that initialize()) is a bit less cluttered.
Source:

(static) _eventArrowClick()

Code to run when an arrow is clicked.
Source:
See:

(static) _eventBranchClick()

Code to run when a branch is clicked.
Source:
See:

(static) _eventDel()

Code to run when the user tries to delete an Element.
Source:

(static) _eventDown()

Code to run when the user presses the down arrow key.
Source:
See:

(static) _eventEditorTyping()

Code to run when the user types in a Node editor.
Source:

(static) _eventEnter()

Code to run when the user presses Enter.
Source:

(static) _eventEsc()

Code to run when the user presses the ESC key.
Source:

(static) _eventExportBrackets()

Code for exporting the current tree as bracket notation (.txt file).
Source:

(static) _eventExportImage()

Code for exporting the current tree as an image (png).
Source:

(static) _eventExportTreeFile()

Code for exporting the current tree as a tree file.
Source:

(static) _eventFiletypeLabelClick()

Code to run when the user clicks a file type option in the export modal. Updates the displayed file suffix.
Source:

(static) _eventLeft()

Code to run when the user presses the left arrow key.
Source:
See:

(static) _eventNodeClick()

Code to run when a Node is clicked.
Source:
See:

(static) _eventRewatchTutorial()

Code to run when a user requests a tutorial restart/rewatch.
Source:
See:

(static) _eventRight()

Code to run when the user presses the right arrow key.
Source:
See:

(static) _eventTriangleButtonClick()

Code to run when a branch's triangle button is clicked.
Source:
See:

(static) _eventUndo()

Code to run when a user attempts to undo an action.
Source:
See:

(static) _eventUp()

Code to run when the user presses the up arrow key.
Source:
See: