Class: BasePainter

JSROOT. BasePainter

new JSROOT.BasePainter(dom)

Base painter class in JSROOT

Name Type Description
dom object | string optional

dom element or id of dom element

Methods

Generic method to cleanup painter

Removes all visible elements and all internal data

Returns assigned dom element

getItemDrawOpt()

Returns assigned item draw option

Used with JSROOT.HierarchyPainter to identify drawn item option

getItemName()

Returns assigned item name

Used with JSROOT.HierarchyPainter to identify drawn item name

selectDom(is_direct){object}

Selects main HTML element assigned for drawing

if main element was layouted, returns main element inside layout

Name Type Description
is_direct string optional

if 'origin' specified, returns original element even if actual drawing moved to some other place

Returns:
Type Description
object d3.select object for main element for drawing