Visuals Class
The static Visuals class encompasses a few static methods to draw common visual elements such as buttons or arrows. No instantiation or initialization is necessary.
Methods
Arrows
-
ctx -
data -
left -
right -
min -
max -
coord
Pass sk38, rb, ect or ct profile feature and draw black pointed arrows at the respective heights. Note: Only the first profile of each test is considered!
Parameters:
-
ctxObject'this' context to be utilized
-
dataFeatureA feature such as rb, ect, ct or sk38 of a profile
-
leftNumberleft x-coordinate (where the arrow points)
-
rightNumberright x-coordinate
-
minNumberMinimal height for arrow to be drawn
-
maxNumberMaximal height for arrow to be drawn
-
coordFunctionFunction to be map height to actual pixel value
Returns:
svg group container which holds all the visual elements
Button
-
paper -
x -
y -
text -
self -
callback
Create a grey button with a text on top, height 25px, width 80px
Parameters:
Returns:
svg group container which holds all the visual elements
