Variable: cursor
Holds the cursor for the overlay. Default is 'help'.
Variable: defaultOverlap
Defines the overlapping for the overlay, that is, the proportional distance from the origin to the point defined by the alignment. Default is 0.5.
Variable: eventListeners
Holds the event names and associated listeners in an array. The array contains the event name followed by the respective listener for each registered listener.
Variable: eventSource
Optional source for events. Default is null.
Variable: eventsEnabled
Specifies if events can be fired. Default is true.
Variable: image
Holds the
Variable: offset
Holds the offset as an
Variable: tooltip
Holds the optional string to be used as the tooltip.
Variable: verticalAlign
Holds the vertical alignment for the overlay. Default is <mxConstants.ALIGN_BOTTOM>. For edges, the overlay always appears in the center of the edge.
Function: addListener
Binds the specified function to the given event name. If no event name is given, then the listener is registered for all events.
The parameters of the listener are the sender and an
Function: fireEvent
Dispatches the given event to the listeners which are registered for the event. The sender argument is optional. The current execution scope ("this") is used for the listener invocation (see <mxUtils.bind>).
Example:
(code) fireEvent(new mxEventObject("eventName", key1, val1, .., keyN, valN)) (end)
Parameters:
evt -
Function: getBounds
Returns the bounds of the overlay for the given
The following example will place the overlay along an edge (where x=[-1..1] from the start to the end of the edge and y is the orthogonal offset in px).
(code) overlay.getBounds = function(state) { var bounds = getBounds.apply(this, arguments);
if (state.view.graph.getModel().isEdge(state.cell)) { var pt = state.view.getPoint(state, {x: 0, y: 0, relative: true});
bounds.x = pt.x - bounds.width / 2;
bounds.y = pt.y - bounds.height / 2;
}
return bounds; }; (end)
Parameters:
state -
Function: getEventSource
Returns
Function: isEventsEnabled
Returns
Function: removeListener
Removes all occurrences of the given listener from
Function: setEventSource
Sets
Function: setEventsEnabled
Sets
Function: toString
Returns the textual representation of the overlay to be used as the
tooltip. This implementation returns
Generated using TypeDoc
Variable: align
Holds the horizontal alignment for the overlay. Default is <mxConstants.ALIGN_RIGHT>. For edges, the overlay always appears in the center of the edge.