Members
(inner) isHorizontalMouseDownListenerSet :boolean
- Description:
This variable is necessary for the function 'toggleDisplayForHorizontalCursorScrollers' in order to prevent adding multiple listeners onto the same element.
- Source:
This variable is necessary for the function 'toggleDisplayForHorizontalCursorScrollers' in order to prevent adding multiple listeners onto the same element.
Type:
- boolean
(inner) isVerticalMouseDownListenerSet :boolean
- Description:
This variable is necessary for the function 'toggleDisplayForVerticalCursorScrollers' in order to prevent adding multiple listeners onto the same element.
- Source:
This variable is necessary for the function 'toggleDisplayForVerticalCursorScrollers' in order to prevent adding multiple listeners onto the same element.
Type:
- boolean
Methods
(static) changeChannelButtonStatus(channelKey) → {void}
- Description:
This function executes whenever a user clicks on one of the channel buttons : The button will be grayed out if it is already in focus. The button will be 'activated/colored' if it is grayed out. The button will be focused if not already focused.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
channelKey |
string | Object key corresponding to a certain signal saved within 'channelData'. |
Throws:
Will throw an error if the button clicked on is not linked to an active channel. We then warn the user.
Returns:
- Type
- void
(static) changeScreenLightMode(mode) → {void}
- Description:
This function works in two sections. The first section is the immediate change of the UI depending on the theme the user changed. The second section is there to save these changes in the UI to the database if the user is registered. If the user is anonymous, a message will let him know that he needs an account to save his preferences.
- Source:
Example
changeScreenLightMode("light");
changeScreenLightMode("dark");
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | Which of the two modes to set (light / dark). |
Returns:
- Type
- void
(static) changeScreenSize(size) → {void}
- Description:
This function resizes the oscilloscope's screen. It will also move around some elements and/or resize them to make them fit within the new layout of the page.
- Source:
Example
changeScreenSize("1200|800");
changeScreenSize("400|267");
Parameters:
Name | Type | Description |
---|---|---|
size |
string | Size, in pixels, to assign to the canvas (width|height). |
Listens to Events:
- Escape When the screen is maximized,event: part of this function will listen for the 'Escape' key being pressed and reset the view back to standard.
Returns:
- Type
- void
(static) onMouseMoveScrollerHorizontal(scroller, startY, whichCursor) → {function}
- Description:
This fonction keeps track of a moving horizontal cursor being dragged by a user. We get the cursor's position anytime it is being moved and save these values to the config relative to the cursors.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
scroller |
object | Scroller element on the top of the screen. |
startY |
number | Position from where the cursor started moving (abs value in pixels). |
whichCursor |
string | Which of the 2 scrollers are we moving. |
Listens to Events:
- event:MouseMove For a user dragging the mouse.
Returns:
Returns the entire fonction in order to assign it to a variable and easily keep track of the listeners.
- Type
- function
(static) onMouseMoveScrollerVertical(scroller, startX, whichCursor) → {function}
- Description:
This fonction keeps track of a moving vertical cursor being dragged by a user. We get the cursor's position anytime it is being moved and save these values to the config relative to the cursors.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
scroller |
object | Scroller element on the top of the screen. |
startX |
number | Position from where the cursor started moving (abs value in pixels). |
whichCursor |
String | Which of the 2 scrollers are we moving. |
Listens to Events:
- event:MouseMove For a user dragging the mouse.
Returns:
Returns the entire fonction in order to assign it to a variable and easily keep track of the listeners.
- Type
- function
(static) onMouseUpScrollerHorizontal() → {void}
- Description:
This fonction handles the final part of a moving horizontal cursor which is when a user finally releases it. We then remove all listeners assigned to this cursor and reset the variables responsible for keeping track of the events.
- Source:
Listens to Events:
- event:Mouseup For a user releasing the mouse.
Returns:
- Type
- void
(static) onMouseUpScrollerVertical() → {void}
- Description:
This fonction handles the final part of a moving vertical cursor which is when a user finally releases it. We then remove all listeners assigned to this cursor and reset the variables responsible for keeping track of the events.
- Source:
Listens to Events:
- event:Mouseup For a user releasing the mouse.
Returns:
- Type
- void
(static) setScrollersEvents(Channel_ID) → {void}
- Description:
This function is used to setup the interactions between the user and each of the vertical offset scrollers (left of the screen). It needs to be called for each scroller.
- Source:
Example
setScrollersEvents(4);
Parameters:
Name | Type | Description |
---|---|---|
Channel_ID |
number | Which channel are we setting an offset cursor for. |
Listens to Events:
- MouseMove - Whenever the scroller is moved,event: the new position of the scroller will be saved and its relative position is then mapped to an offset on the corresponding signal.
Returns:
- Type
- void
(static) setupDragListeners(scroller, whichCursor) → {void}
- Description:
This functions sets up listeners to allow the user to move one of the two vertical cursors by dragging it along the scrollbar.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
scroller |
Object | Scroller element on top of the screen. |
whichCursor |
string | Which of the two vertical cursors we are sending (A / B). |
Listens to Events:
- Mousedown For a user clicking on one of the vertical measure cursors. When a user clicks on one, we attach two new listeners to the cursor to track where it is dragged to and when the user relases the mouse.event:
Returns:
- Type
- void
(static) setupDragListeners(scroller, whichCursor) → {void}
- Description:
This functions sets up listeners to allow the user to move one of the two horizontal cursors by dragging it along the scrollbar.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
scroller |
Object | Scroller element on top of the screen. |
whichCursor |
string | Which of the two horizontal cursors we are sending (A / B). |
Listens to Events:
- Mousedown For a user clicking on one of the horizontal measure cursors. When a user clicks on one, we attach two new listeners to the cursor to track where it is dragged to and when the user relases the mouse.event:
Returns:
- Type
- void
(static) setupTriggerCursor() → {void}
- Description:
This function is used to setup the interactions for the trigger cursor. This cursor shows the user the current threshold set for the trigger and allows them to move it and therefore change the trigger threshold.
- Source:
Listens to Events:
- MouseMove - Whenever the scroller is moved,event: the new position of the scroller will be saved and its relative position is then mapped to an offset on the corresponding signal.
Returns:
- Type
- void
(static) toggleDisplayForHorizontalCursorScrollers() → {void}
- Description:
Similarly to 'toggleDisplayForVerticalCursorScrollers' this function is fired when a user chooses to display the horizontal cursors. It will start by displaying the corresponding cursors and assign event listeners to them. If the cursors have been previously hidden then showned again, the listeners won't be set again.
- Source:
Returns:
- Type
- void
(static) toggleDisplayForVerticalCursorScrollers() → {void}
- Description:
This function is fired when a user chooses to display the vertical cursors. It will start by displaying the corresponding cursors and assign event listeners to them. If the cursors have been previously hidden then showned again, the listeners won't be set again.
- Source:
Returns:
- Type
- void