function EventData(scrollView, isMouse, pressed, position) {
            /**
             * whether this is a mouse event or a touch event
             */
            this.isMouse = false;
            /**
             * whether this event has been canceled.
             * Do not set this parameter, this will do nothing. Use the ScrollViewEvent's cancel() method instead!
             */
            this.cancelEvent = false;
            /**
             * Internal flag, used to detect whether a touch has already fired an event (within one cycle).
             */
            this.eventFired = false;
            /**
             * Whether this event is a merge from multiple touch events.
             * (Will only happen while dragging with more than one finger and signals the end of one cycle)
             */
            this.isMergeTouchEvent = false;
            /**
             * currently pressed mouse button with length 5
             * index by using the MouseButton enum
             */
            this.buttons = [false, false, false, false, false];
            /**
             * the id of the touch event
             */
            this.id = -1;
            /**
             * Event (mouse/touch) location.
             */
            this.currentPosition = { x: 0, y: 0 };
            /**
             * Delta zoom scale (this factor should be around 1).
             */
            this.deltaZoom = 1;
            /**
             * whether the touch or any mouse button is "down"
             */
            this.pressed = false;
            this.scrollView = scrollView;
            this.isMouse = isMouse;
            this.pressed = pressed;
            // prevent a certain edge case on devices with touchscreen and chrome
            if (isNaN(position.x) || isNaN(position.y)) {
                console.error('mouse position is NaN (this can be safely ignored by users and does not break anything)');
                position = { x: 0, y: 0 };
            }
            // init both positions and delta
            // position and delta should never be null
            this.previousPosition = cloneVector(position);
            this.currentPosition = cloneVector(position);
            this.updateDelta();
        }
/**
         * Construct a new event data object.
         * @param scrollView the corresponding scroll view
         * @param isMouse whether the event origin is a mouse
         * @param pressed whether any button is pressed
         * @param position (This will clone the position to prevent shared objects)
         */
Construct a new event data object.
@param scrollView the corresponding scroll view
@param isMouse whether the event origin is a mouse
@param pressed whether any button is pressed
@param position (This will clone the position to prevent shared objects)
Construct a new event data object . @param scrollView the corresponding scroll view @param isMouse whether the event origin is a mouse @param pressed whether any button is pressed @param position ( This will clone the position to prevent shared objects )
function EventData(scrollView, isMouse, pressed, position) {
            this.isMouse = false;
            this.cancelEvent = false;
            this.eventFired = false;
            this.isMergeTouchEvent = false;
            this.buttons = [false, false, false, false, false];
            this.id = -1;
            this.currentPosition = { x: 0, y: 0 };
            this.deltaZoom = 1;
            this.pressed = false;
            this.scrollView = scrollView;
            this.isMouse = isMouse;
            this.pressed = pressed;
            if (isNaN(position.x) || isNaN(position.y)) {
                console.error('mouse position is NaN (this can be safely ignored by users and does not break anything)');
                position = { x: 0, y: 0 };
            }
            this.previousPosition = cloneVector(position);
            this.currentPosition = cloneVector(position);
            this.updateDelta();
        }
function EventData ( scrollView , isMouse , pressed , position ) { this . isMouse = false ; this . cancelEvent = false ; this . eventFired = false ; this . isMergeTouchEvent = false ; this . buttons = [ false , false , false , false , false ] ; this . id = - 1 ; this . currentPosition = { x : 0 , y : 0 } ; this . deltaZoom = 1 ; this . pressed = false ; this . scrollView = scrollView ; this . isMouse = isMouse ; this . pressed = pressed ; if ( isNaN ( position . x ) || isNaN ( position . y ) ) { console . error ( 'mouse position is NaN (this can be safely ignored by users and does not break anything)' ) ; position = { x : 0 , y : 0 } ; } this . previousPosition = cloneVector ( position ) ; this . currentPosition = cloneVector ( position ) ; this . updateDelta ( ) ; }
Construct a new event data object.
Construct a new event data object .
/**
             * whether this is a mouse event or a touch event
             */ /**
             * whether this event has been canceled.
             * Do not set this parameter, this will do nothing. Use the ScrollViewEvent's cancel() method instead!
             */ /**
             * Internal flag, used to detect whether a touch has already fired an event (within one cycle).
             */ /**
             * Whether this event is a merge from multiple touch events.
             * (Will only happen while dragging with more than one finger and signals the end of one cycle)
             */ /**
             * currently pressed mouse button with length 5
             * index by using the MouseButton enum
             */ /**
             * the id of the touch event
             */ /**
             * Event (mouse/touch) location.
             */ /**
             * Delta zoom scale (this factor should be around 1).
             */ /**
             * whether the touch or any mouse button is "down"
             */ // prevent a certain edge case on devices with touchscreen and chrome // init both positions and delta // position and delta should never be null