Header menu logo issie

EvilHoverCache Module

Functions and values

Function or value Description

addGapToStore store gap

Full Usage: addGapToStore store gap

Parameters:

Add a gap to the store, merging it with the previous gap if it is adjacent.

store : GapStore
gap : Gap

changeToolTip tipName tipText xPos yPos ttXMaxEdge isVisible

Full Usage: changeToolTip tipName tipText xPos yPos ttXMaxEdge isVisible

Parameters:
    tipName : string
    tipText : string - Text to display in the tooltip.
    xPos : float - X-coordinate of the tooltip.
    yPos : float - Y-coordinate of the tooltip.
    ttXMaxEdge : float - Maximum X-coordinate of the tooltip right edge.
    isVisible : bool - True if the tooltip is visible, false if it is hidden.

Change the tooltip text and position.

tipName : string
tipText : string

Text to display in the tooltip.

xPos : float

X-coordinate of the tooltip.

yPos : float

Y-coordinate of the tooltip.

ttXMaxEdge : float

Maximum X-coordinate of the tooltip right edge.

isVisible : bool

True if the tooltip is visible, false if it is hidden.

checkIfHatched store cycle

Full Usage: checkIfHatched store cycle

Parameters:
Returns: bool

Check if a wave is hatched at a given cycle. This is done by checking if the cycle is within any of the gaps in a mutable store, which is updated as gaps are added.

store : GapStore
cycle : int
Returns: bool

evilSvgToolTip tipName ws tipText textProps

Full Usage: evilSvgToolTip tipName ws tipText textProps

Parameters:
Returns: ReactElement

SVG group element for tooltip. The props of the tooltip, as well as its text, are set in the function changeToolTip. Initila props make it invisible.

tipName : string
ws : WaveSimModel
tipText : string
textProps : IProp list
Returns: ReactElement

finaliseStore store

Full Usage: finaliseStore store

Parameters:

Finalise the store by adding the last gap to the store.

store : GapStore

getWaveToolTip cycle waveNum ws

Full Usage: getWaveToolTip cycle waveNum ws

Parameters:
Returns: string

Use cached "gap" data to determine if a wave is hatched at a given cycle. If so, return text for a tooltip based on the correct wave value for that cycle. If not, return an empty string.

cycle : int
waveNum : int
ws : WaveSimModel
Returns: string

initGapStore maxGaps

Full Usage: initGapStore maxGaps

Parameters:
    maxGaps : int

Returns: GapStore

A gap in the wave simulator, represented by a start cycle and a length. the only gaps that are stored are relevant are those that correspond to hatched parts of the waveform in which the wave value is not printed.

maxGaps : int
Returns: GapStore

Type something to start searching.