MouseController

semagrams.controllers.MouseController
See theMouseController companion object
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.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def apply(es: EditorState, el: SvgElement): Unit

Attaches the necessary event listeners to the main window

Attaches the necessary event listeners to the main window

Attributes

def clickable(ent: Entity): List[EventListener[MouseEvent, Event]]

Makes a certain SVG element record clicking

Makes a certain SVG element record clicking

Attributes

ent

the entity to attribute the clicks to

def mouseLeave(el: SVGSVGElement)(ev: MouseEvent): Event
def mouseMove(el: SVGSVGElement)(ev: MouseEvent): Event
def svgCoords(el: SVGSVGElement, ev: MouseEvent): Complex

Concrete fields

val $state: Var[State]
val mouseEvents: EventBus[Event]