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:
-
ctx
Object'this' context to be utilized
-
data
FeatureA feature such as rb, ect, ct or sk38 of a profile
-
left
Numberleft x-coordinate (where the arrow points)
-
right
Numberright x-coordinate
-
min
NumberMinimal height for arrow to be drawn
-
max
NumberMaximal height for arrow to be drawn
-
coord
FunctionFunction 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