Class: KonvaMarkup

KonvaMarkup

Specifies parameters and methods of the Markup object


new KonvaMarkup()

Methods


clearOverlay()

Remove markup overlay.


clearSelected()

Clear list of currently selected Markup objects


colorizeAllMarkup(r, g, b)

Colorize all markup entities with the specified color.

Parameters:
Name Type Default Description
r 255

Red part of color.

g 0

Green part of color.

b 0

Blue part of color.


colorizeSelectedMarkups(r, g, b)

Colorize all selected markup entities with the specified color.

Parameters:
Name Type Description
r

Red part of color.

g

Green part of color.

b

Blue part of color.


createObject(type, params)

Create a Markup object

Parameters:
Name Type Description
type

string identificator of Markup type

params

object with parameters of Markup


dispose()

Releases all resources allocated by this Markup instance. Call this method before release the Markup instance.


getDraggers()

Provide Javascript Map with all OdBaseDragger draggers used by Markup. We need this map to register in Viewer.registerDragger


getMarkupColor()

Get markup color.

Returns:

Color with RGB values.


getObjects()

Get array of all existed Markup objects


getSelectedObjects()

Get array of currently selected Markup objects


getViewpoint()

Create a IViewpoint viewpoint


initialize(viewer, canvas, canvasEvents)

Start method to init Markup support for the Viewer instance.

Parameters:
Name Type Description
viewer Viewer

current Viewer object

canvas

HTMLCanvasElement of the Viewer

canvasEvents

list of used events of the Viewer


selectObjects(objects)

Select list of Markup objects

Parameters:
Name Type Description
objects

setMarkupColor(r, g, b)

Set markup color.

Parameters:
Name Type Description
r

Red part of color.

g

Green part of color.

b

Blue part of color.


setViewpoint(viewpoint)

Draw a viewpoint. To get a list of available model viewpoints, use the

Parameters:
Name Type Description
viewpoint

Viewpoint data.