More precise Event typing
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user