Source: tiny/interaction/InteractionEvent.js

/**
 * Event class that mimics native DOM events.
 *
 * @class
 * @memberof Tiny.interaction
 */
export default class InteractionEvent {
  /**
   *
   */
  constructor() {
    /**
     * Whether this event will continue propagating in the tree
     *
     * @member {boolean}
     */
    this.stopped = false;

    /**
     * The object which caused this event to be dispatched.
     * For listener callback see {@link Tiny.interaction.InteractionEvent.currentTarget}.
     *
     * @member {Tiny.DisplayObject}
     */
    this.target = null;

    /**
     * The object whose event listener’s callback is currently being invoked.
     *
     * @member {Tiny.DisplayObject}
     */
    this.currentTarget = null;

    /**
     * Type of the event
     *
     * @member {string}
     */
    this.type = null;

    /**
     * InteractionData related to this event
     *
     * @member {Tiny.interaction.InteractionData}
     */
    this.data = null;
  }

  /**
   * Prevents event from reaching any objects other than the current object.
   *
   */
  stopPropagation() {
    this.stopped = true;
  }

  /**
   * Prevents event from reaching any objects other than the current object.
   *
   * @version 1.2.0
   */
  reset() {
    this.stopped = false;
    this.currentTarget = null;
    this.target = null;
  }
}
Documentation generated by JSDoc 3.4.3 on Fri Jul 09 2021 19:32:25 GMT+0800 (CST)