Canvas
Front end canvas frame which reacts to mouse-clicks upon it
Constructor Summary
Public Constructor | ||
public |
constructor(ui: UI) Constructor for the Canvas object |
Member Summary
Public Members | ||
public |
canvas: * |
|
public |
context: * |
|
public |
contextMenu: * |
|
public |
|
|
public |
|
|
public |
mouseHandler: * |
|
public get |
scale: * |
|
public set |
scale: * |
|
public |
scaleValue: * |
|
public |
ui: * |
Method Summary
Public Methods | ||
public |
clear() |
|
public |
getCanvasX(event: HTMLEvent): Number Functions gets the x-position of the click event on the full canvas |
|
public |
getCanvasY(event: HTMLEvent): Number Functions gets the y-position of the click event on the full canvas |
|
public |
Initializes the mouse handler, context menu, and other listeners |
|
public |
Creates all the listeners for every event which happens upon the canvas Based on the event it calls the relevant function |
|
public |
reset() |
|
public |
resetGraph(newGraph: *) |
|
public |
resize(event: *) |
|
public |
update() |
Public Constructors
Public Members
public canvas: * source
public context: * source
public contextMenu: * source
public mouseHandler: * source
public get scale: * source
public set scale: * source
public scaleValue: * source
public ui: * source
Public Methods
public clear() source
public getCanvasX(event: HTMLEvent): Number source
Functions gets the x-position of the click event on the full canvas
Params:
Name | Type | Attribute | Description |
event | HTMLEvent | the click event which triggered this call |
public getCanvasY(event: HTMLEvent): Number source
Functions gets the y-position of the click event on the full canvas
Params:
Name | Type | Attribute | Description |
event | HTMLEvent | the click event which triggered this call |
public init(graph: Graph) source
Initializes the mouse handler, context menu, and other listeners
Params:
Name | Type | Attribute | Description |
graph | Graph | refers to the master graph object |
public initListeners() source
Creates all the listeners for every event which happens upon the canvas Based on the event it calls the relevant function
public reset() source
public resetGraph(newGraph: *) source
Params:
Name | Type | Attribute | Description |
newGraph | * |
public resize(event: *) source
Params:
Name | Type | Attribute | Description |
event | * |