DisplaySwitch
Description
Display switch for the Comments plugin. Manages the time of delayed displaying / hiding comments.
Description
Initializes the display switch and configures the debounced show delay.
Members
hidingTimer
displaySwitch.hidingTimer : number
Reference to timer, run by setTimeout, which is hiding comment.
showDebounced
displaySwitch.showDebounced : function
Show comment after predefined delay. It keeps reference to immutable debounce function.
wasLastActionShow
displaySwitch.wasLastActionShow : boolean
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
displaySwitch.cancelHiding()
Cancel hiding comment.
destroy
displaySwitch.destroy()
Destroy the switcher.
hide
displaySwitch.hide()
Responsible for hiding comment after proper delay.
show
displaySwitch.show(range)
Responsible for showing comment after proper delay.
| Param | Type | Description |
|---|---|---|
| range | object | Coordinates of selected cell. |
updateDelay
displaySwitch.updateDelay(displayDelay)
Update the switch settings.
| Param | Type | Description |
|---|---|---|
| displayDelay | number | Delay of showing the comments (in milliseconds). |