More precise Event typing

This commit is contained in:
Frederic Junod
2018-06-29 10:09:10 +02:00
parent 8c4c70e9f0
commit 6da2e4cef4
9 changed files with 33 additions and 33 deletions

View File

@@ -106,7 +106,7 @@ const DEDUP_DIST = 25;
* or detect that the positions are invalid.
*
* @private
* @param {Event} inEvent The in event.
* @param {MouseEvent} inEvent The in event.
* @return {boolean} True, if the event was generated by a touch.
*/
MouseSource.prototype.isEventSimulatedFromTouch_ = function(inEvent) {
@@ -154,7 +154,7 @@ function prepareEvent(inEvent, dispatcher) {
/**
* Handler for `mousedown`.
*
* @param {Event} inEvent The in event.
* @param {MouseEvent} inEvent The in event.
*/
MouseSource.prototype.mousedown = function(inEvent) {
if (!this.isEventSimulatedFromTouch_(inEvent)) {
@@ -173,7 +173,7 @@ MouseSource.prototype.mousedown = function(inEvent) {
/**
* Handler for `mousemove`.
*
* @param {Event} inEvent The in event.
* @param {MouseEvent} inEvent The in event.
*/
MouseSource.prototype.mousemove = function(inEvent) {
if (!this.isEventSimulatedFromTouch_(inEvent)) {
@@ -186,7 +186,7 @@ MouseSource.prototype.mousemove = function(inEvent) {
/**
* Handler for `mouseup`.
*
* @param {Event} inEvent The in event.
* @param {MouseEvent} inEvent The in event.
*/
MouseSource.prototype.mouseup = function(inEvent) {
if (!this.isEventSimulatedFromTouch_(inEvent)) {
@@ -204,7 +204,7 @@ MouseSource.prototype.mouseup = function(inEvent) {
/**
* Handler for `mouseover`.
*
* @param {Event} inEvent The in event.
* @param {MouseEvent} inEvent The in event.
*/
MouseSource.prototype.mouseover = function(inEvent) {
if (!this.isEventSimulatedFromTouch_(inEvent)) {
@@ -217,7 +217,7 @@ MouseSource.prototype.mouseover = function(inEvent) {
/**
* Handler for `mouseout`.
*
* @param {Event} inEvent The in event.
* @param {MouseEvent} inEvent The in event.
*/
MouseSource.prototype.mouseout = function(inEvent) {
if (!this.isEventSimulatedFromTouch_(inEvent)) {