semagrams.controllers

This package contains managers of global state for handling interactions such as click, drag, hover, keyboard.

Attributes

Members list

Concise view

Type members

Classlikes

class DragController() extends Controller

A wrapper around a Var containing state that keeps track of the current object being dragged. This has to be global because it is easy for something that is being dragged to not be under the mouse, so the mouse-move events have to come from the global window.

A wrapper around a Var containing state that keeps track of the current object being dragged. This has to be global because it is easy for something that is being dragged to not be under the mouse, so the mouse-move events have to come from the global window.

When the state is non-None, mouse move events get their position sent to the observer. On mouse-up or when the mouse leaves the parent svg, the drag-end handler is called and the state is reset to be None.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class HoverController() extends Controller

A bit of global state that keeps track of the entity that is currently hovered.

A bit of global state that keeps track of the entity that is currently hovered.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

A bit of global state that keeps track of the keyboard.

A bit of global state that keeps track of the keyboard.

The main functions are:

  • Keeping track of what keys and modifiers are currently held down
  • Adding keyboard events to EditorState

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class MouseController() extends Controller

A bit of global state to keep track of the mouse, along with the code that subscribes EditorState to mouse events.

A bit of global state to keep track of the mouse, along with the code that subscribes EditorState to mouse events.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type