TFramePainter

TFramePainter

(private) new TFramePainter(dom, tframe)

Painter class for TFrame, main handler for interactivity

Source:
Parameters:
Name Type Description
dom object | string

DOM element for drawing or element id

tframe object

TFrame object

Methods

(private) addInteractivity()

Add interactive functionality to the frame

Source:

(private) addKeysHandler()

Add interactive keys handlers

Source:

applyAxisZoom()

Apply zooming from TAxis attributes

Source:

(private) applyPadUserRange()

Apply axis zooming from pad user range

Source:

axisAsText()

Converts 'raw' axis value into text

Source:

changeAxisLog(value)

Change log state of specified axis

Source:
Parameters:
Name Type Description
value number

0 (linear), 1 (log) or 2 (log2)

cleanAxesDrawings()

remove all axes drawings

Source:

cleanFrameDrawings()

Returns frame rectangle plus extra info for hint display

Source:

cleanXY()

Remove all kinds of X/Y function for axes transformation

Source:

cleanup()

Cleanup frame

Source:

configureUserClickHandler()

Configure user-defined click handler

Description:
  • Function will be called every time when frame click was perfromed As argument, tooltip object with selected bins will be provided If handler function returns true, default handling of click will be disabled

Source:

configureUserDblclickHandler()

Configure user-defined dblclick handler

Description:
  • Function will be called every time when double click was called As argument, tooltip object with selected bins will be provided If handler function returns true, default handling of dblclick (unzoom) will be disabled

Source:

(private) createXY()

Create x,y objects which maps user coordinates into pixels

Description:
  • While only first painter really need such object, all others just reuse it following functions are introduced this.GetBin[X/Y] return bin coordinate this.[x,y] these are d3.scale objects this.gr[x,y] converts root scale into graphical value

Source:

(private) createXY2()

Create x,y objects for drawing of second axes

Source:

(async) drawAxes() → {Promise}

draw axes,

Source:
Returns:

which ready when drawing is completed

Type
Promise

drawAxes2()

draw second axes (if any)

Source:

drawGrids()

Draw axes grids

Description:
  • Called immediately after axes drawing

Source:

fillContextMenu()

Fill context menu for the frame

Description:
  • It could be appended to the histogram menus

Source:

(private) fillWebObjectOptions()

Fill option object used in TWebCanvas

Source:

getAxis()

Retuns associated axis object

Source:

getFrameHeight()

Returns frame height

Source:

getFramePainter()

Returns frame painter - object itself

Source:

getFrameRect()

Returns frame rectangle plus extra info for hint display

Source:

getFrameWidth()

Returns frame width

Source:

getFrameX()

Returns frame X position

Source:

getFrameY()

Returns frame Y position

Source:

(private) getGrFuncs()

Return functions to create x/y points based on coordinates

Description:
  • In default case returns frame painter itself

Source:

(private) getLastEventPos()

Return position of last event

Source:

getObject()

Returns frame or sub-objects, used in GED editor

Source:

getProjectionFunc()

Returns coordinates transformation func

Source:

hasDrawnAxes()

Identify if requested axes are drawn

Description:
  • Checks if x/y axes are drawn. Also if second side is already there

Source:

isAxisZoomed()

Checks if specified axis zoomed

Source:

(private) is_root6()

Returns true if it is ROOT6 frame

Source:

recalculateRange()

Rcalculate frame ranges using specified projection functions

Source:

redraw()

Redraw TFrame

Source:

revertAxis()

Convert graphical coordinate into axis value

Source:

setAxes2Ranges()

Configure secondary frame axes ranges

Source:

setAxesRanges()

Configure frame axes ranges

Source:

(private) setFrameActive()

Set active flag for frame - can block some events

Source:

setLastEventPos()

Set position of last context menu event

Source:

(private) setRootPadRange()

Set selected range back to TPad object

Source:

(private) showAxisStatus()

Show axis status message

Description:
  • method called normally when mouse enter main object element

Source:

(private) shrinkFrame()

Shrink frame size

Source:

(private) sizeChanged()

Function called at the end of resize of frame

Description:
  • One should apply changes to the pad

Source:

toggleAxisLog()

Toggle log state on the specified axis

Source:

(async) unzoom() → {Promise}

Unzoom speicified axes

Source:
Returns:

with boolean flag if zooming changed

Type
Promise

(private) updateAttributes()

Update frame attributes

Source:

(async) zoom(xmin, xmax, yminopt, ymaxopt, zminopt, zmaxopt) → {Promise}

Function can be used for zooming into specified range

Description:
  • if both limits for each axis 0 (like xmin === xmax === 0), axis will be unzoomed

Source:
Parameters:
Name Type Attributes Description
xmin number
xmax number
ymin number <optional>
ymax number <optional>
zmin number <optional>
zmax number <optional>
Returns:

with boolean flag if zoom operation was performed

Type
Promise

(private) zoomChangedInteractive()

Mark/check if zoom for specific axis was changed interactively

Source:

(async, private) zoomSingle()

Provide zooming of single axis

Description:
  • One can specify names like x/y/z but also second axis x2 or y2

Source: