|
@@ -293,25 +293,25 @@ export function Drag( Splide: Splide, Components: Components, options: Options )
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Checks if the provided event is TouchEvent or MouseEvent.
|
|
|
+ * Returns the time stamp in the provided event object.
|
|
|
*
|
|
|
- * @param e - An event to check.
|
|
|
+ * @param e - A TouchEvent or MouseEvent object.
|
|
|
*
|
|
|
- * @return `true` if the `e` is TouchEvent.
|
|
|
+ * @return A time stamp.
|
|
|
*/
|
|
|
- function isTouchEvent( e: TouchEvent | MouseEvent ): e is TouchEvent {
|
|
|
- return typeof TouchEvent !== 'undefined' && e instanceof TouchEvent;
|
|
|
+ function timeOf( e: TouchEvent | MouseEvent ): number {
|
|
|
+ return e.timeStamp;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns the time stamp in the provided event object.
|
|
|
+ * Checks if the provided event is TouchEvent or MouseEvent.
|
|
|
*
|
|
|
- * @param e - A TouchEvent or MouseEvent object.
|
|
|
+ * @param e - An event to check.
|
|
|
*
|
|
|
- * @return A time stamp.
|
|
|
+ * @return `true` if the `e` is TouchEvent.
|
|
|
*/
|
|
|
- function timeOf( e: TouchEvent | MouseEvent ): number {
|
|
|
- return e.timeStamp;
|
|
|
+ function isTouchEvent( e: TouchEvent | MouseEvent ): e is TouchEvent {
|
|
|
+ return typeof TouchEvent !== 'undefined' && e instanceof TouchEvent;
|
|
|
}
|
|
|
|
|
|
/**
|