#Event State : Object

Custom control diagram event

Tip: the coordinates in all parameters are logical coordinates.

Kind: normal class

#.onDataLoading()

Trigger the event while loading the cloud diagram project data

For example, you always add your custom loading info/image in here

Returns: void - returns nothing

#.onDataLoaded()

Trigger the event while the diagram data has been loaded

For example, you always remove your custom loading info/image in here

Returns: void - returns nothing

#.onDraw(context)

Trigger the event while drawing the 2d diagram

Returns: void - returns nothing

Param Type Description
context CanvasRenderingContext2D HTML canvas rendering context

#.onSelectShape(event, shape, point)

Trigger the event while clicking or selecting one shape

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onZoom(event)

Trigger the event while zooming in or out

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event

#.onPan(event)

Trigger the event while doing a pan action

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event

#.on3dRendering()

Trigger the event while rendering the 3d diagram

For example, you always add your custom waiting info/image in here

Returns: void - returns nothing

#.on3dRendered()

Trigger the event while the 3d diagram has been rendered

For example, you always remove your custom waiting info/image in here

Returns: void - returns nothing

#.onMouseDown(event, shape, point)

Trigger the event while the mouse is down

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onMouseMove(event, shape, point)

Trigger the event while mouse is moving

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onMouseUp(event, shape, point)

Trigger the event while mouse is up

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onTouchStart(event, shape, points)

Trigger the event while touch has started

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
points Array.<Point> event coordinates

#.onTouchMove(event, shape, points)

Trigger the event while there is a touch move

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
points Array.<Point> event coordinates

#.onTouchEnd(event, shape, points)

Trigger the event while the touch is up

Returns: void - returns nothing

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
points Array.<Point> event coordinates

#.onPreviewSelectShape(event, shape, point)

Trigger the event before the select shape event.

Return false if you want to disable the select shape event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onPreviewZoom(event)

Trigger the event before the zoom event.

Return false if you want to disable the zoom event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event

#.onPreviewPan(event)

Trigger the event before the pan event.

Return false if you want to disable the pan event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event

#.onPreviewMouseDown(event, shape, point)

Trigger the event before the mouse down event.

Return false if you want to disable the mouse down event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onPreviewMouseMove(event, shape, point)

Trigger the event before the mouse move event.

Return false if you want to disable the mouse move event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onPreviewMouseUp(event, shape, point)

Trigger the event before the mouse up event.

Return false if you want to disable the mouse up event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
point Point event coordinate

#.onPreviewTouchStart(event, shape, points)

Trigger the event before the touch start event.

Return false if you want to disable the touch start event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
points Array.<Point> event coordinates

#.onPreviewTouchMove(event, shape, points)

Trigger the event before the touch move event.

Return false if you want to disable the touch move event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
points Array.<Point> event coordinates

#.onPreviewTouchEnd(event, shape, points)

Trigger the event before the touch end event.

Return false if you want to disable the touch end event

Returns: boolean - default return true

Param Type Description
event UIEvent HTML event
shape Shape selected object: room, plan region, and so on
points Array.<Point> event coordinates

results matching ""

    No results matching ""