Class: DisplaySwitch

DisplaySwitch

Display switch for the Comments plugin. Manages the time of delayed displaying / hiding comments.

Members

hidingTimerNumber

Reference to timer, run by setTimeout, which is hiding comment

showDebouncedfunction

Show comment after predefined delay. It keeps reference to immutable debounce function.

wasLastActionShowBoolean

Flag to determine if comment can be showed or hidden. State true mean that last performed action
was an attempt to show comment element. State false mean that it was attempt to hide comment element.

Methods

cancelHiding()

Cancel hiding comment.

destroy()

Destroy the switcher.

hide()

Responsible for hiding comment after proper delay.

show(range)

Responsible for showing comment after proper delay.

Parameters:
Name Type Description
range Object

Coordinates of selected cell.

updateDelay(displayDelay)

Update the switch settings.

Parameters:
Name Type Description
displayDelay Number

Delay of showing the comments (in milliseconds).