Master object (instance) that tracks mouse events. A new instance is created for each Drawing object.
You could connect to any method or event in this class, but it is designed to have the object 'registered'. All objects with the current event will be called directly.
Custom events are used often. In addition to standard events onDown, onUp, onDrag, etc, if a certain object is clicked upon (or dragged, etc), that object's drawingType will create the custom event, such as onAnchorDown, or onStencilDown.
Parameter | Type | Description |
---|---|---|
options | Object |
The custom event methods that an Object that has registered with manager.Mouse can receive. Can contain any or all of the following methods and they will be called on mouse events. All events will be sent a EventObject event object.
NOTE: Events happen anywhere in the document unless otherwise noted.
Milliseconds between clicks to register as for onDoubleClick
Fire events to all registered objects.
Parameter | Type | Description |
---|---|---|
strEvt | undefined | |
obj | undefined |
Internal. Gets ID of focused node.
Parameter | Type | Description |
---|---|---|
evt | undefined | |
squelchErrors | undefined |
Internal. Gets mouse coords to page.
Parameter | Type | Description |
---|---|---|
evt | undefined |
Internal. Create EventObject
Parameter | Type | Description |
---|---|---|
evt | undefined | |
squelchErrors | undefined |
Internal. Create onDown event
Parameter | Type | Description |
---|---|---|
evt | undefined |
Internal. Create onDrag event
Parameter | Type | Description |
---|---|---|
evt | undefined |
Internal. Determine the event name
Parameter | Type | Description |
---|---|---|
name | undefined |
The custom event object that is sent to registered objects and their respective methods.
NOTE: Most event objects are the same with the exception of the onDown events, which have fewer.
Internal. Initializes mouse.
Parameter | Type | Description |
---|---|---|
node | HTMLNode |
Parameter | Type | Description |
---|---|---|
obj | undefined | |
evt | undefined |
All objects (Stencils) should register here if they use mouse events. When registering, the object will be called if it has that method. See: CustomEventMethod and EventObject
Parameter | Type | Description |
---|---|---|
scope | CustomEventMethod | The object to be called |
Keep the handle to be used for disconnection.
Parameter | Type | Description |
---|---|---|
width | undefined | |
height | undefined |
Sets the cursor for a given node. If no node is specified the containing node is used.
Parameter | Type | Description |
---|---|---|
cursor | undefined | |
node | HTMLNode |
Sets the mouse mode s that custom events can be called. Also can 'disable' events by using a bogus mode:
mouse.setEventMode("DISABLED")
(unless any object subscribes to this event,
it is effectively disabled)
Parameter | Type | Description |
---|---|---|
mode | undefined |
Internal. Sets the mouse zoom percentage to that of the canvas
Parameter | Type | Description |
---|---|---|
zoom | undefined |
Disconnects object. Mouse events are no longer called for it.
Parameter | Type | Description |
---|---|---|
handle | undefined |
Internal. Create onUp event
Parameter | Type | Description |
---|---|---|
evt | undefined |
Create on[xx]Down event and send to broadcaster. Could be connected to.
Parameter | Type | Description |
---|---|---|
obj | undefined |
Create on[xx]Drag event and send to broadcaster. Could be connected to.
Parameter | Type | Description |
---|---|---|
obj | undefined |
Create onMove event and send to broadcaster. Could be connected to. Note: onMove never uses a custom event Note: onMove is currently not enabled in the app.
Parameter | Type | Description |
---|---|---|
obj | undefined |
Create on[xx]Up event and send to broadcaster. Could be connected to.
Parameter | Type | Description |
---|---|---|
obj | undefined |