(private) new TFramePainter(dom, frame)
Painter class for TFrame, main handler for interactivity
- Source:
Parameters:
Name | Type | Description |
---|---|---|
dom |
object | string | DOM element for drawing or element id |
frame |
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(axis, value)
Change log state of specified axis
- Source:
Parameters:
Name | Type | Description |
---|---|---|
axis |
string | name of axis like 'x' or 'y' |
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 performed 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) createFrameG()
Create frame element and update all attributes
- 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()
Returns 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()
Recalculate frame ranges using specified projection functions
- Source:
redraw()
Redraw TFrame
- Source:
(private) resetZoom()
Reset all zoom attributes
- 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 specified axes
- Source:
Returns:
with boolean flag if zooming changed
- Type
- Promise
(async) unzoomSingle()
Unzoom single axis
- Source:
(private) updateAttributes()
Update frame attributes
- Source:
(async) zoom(xmin, xmax, yminopt, ymaxopt, zminopt, zmaxopt, interactiveopt) → {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 un-zoomed
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
xmin |
number | ||
xmax |
number | ||
ymin |
number |
<optional> |
|
ymax |
number |
<optional> |
|
zmin |
number |
<optional> |
|
zmax |
number |
<optional> |
|
interactive |
<optional> |
if changes was performed interactively |
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, protected) zoomSingle(name, vmin, vmax, interactiveopt)
Zooming of single axis
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String | axis name like x/y/z but also second axis x2 or y2 |
|
vmin |
Number | axis minimal value, 0 for unzoom |
|
vmax |
Number | axis maximal value, 0 for unzoom |
|
interactive |
Boolean |
<optional> |
if change was performed interactively |