_handleTraveling() {
        // Prechecks
        if (!this._destination || typeof this._destination !== 'object') {
            throw new Error('This Circle does not have a destination to travel to.');
        } // if

        const { _x: x, _y: y, _destination: dest } = this;
        const nextX = x + (dest.x - this._x) / TRAVEL_FACTOR.x; // TODO: magic #
        const nextY = y + (dest.y - this._y) / TRAVEL_FACTOR.y; // TODO: magic #
        this.moveTo(nextX, nextY);

        // Switch to CircleBehavior.ORBITING once destination has been reached.
        if (this.hasReacedDestination()) {
            // Dispatch an event through window to notify `main.js`
            // to switch this Circle to a new classification
            window.dispatchEvent(new CustomEvent('changedbehavior', {
                detail: {
                    circle: this,
                    from: this._behavior,
                    to: CircleBehavior.ORBITING
                }
            }));
            this.setBehavior(CircleBehavior.ORBITING, true);
        } // if
    } // _handleTraveling
/**
     * Handles moving this Circle toward a point
     * specified through this.setDestination.
     * @throws {Error} if this._destination was not set by this.setDestination
     */
Handles moving this Circle toward a point
specified through this.setDestination.
@throws {Error} if this._destination was not set by this.setDestination
Handles moving this Circle toward a point specified through this . setDestination . @throws { Error } if this . _destination was not set by this . setDestination
_handleTraveling() {
        if (!this._destination || typeof this._destination !== 'object') {
            throw new Error('This Circle does not have a destination to travel to.');
        } 
        const { _x: x, _y: y, _destination: dest } = this;
        const nextX = x + (dest.x - this._x) / TRAVEL_FACTOR.x; 
        const nextY = y + (dest.y - this._y) / TRAVEL_FACTOR.y; 
        this.moveTo(nextX, nextY);
        if (this.hasReacedDestination()) {
            window.dispatchEvent(new CustomEvent('changedbehavior', {
                detail: {
                    circle: this,
                    from: this._behavior,
                    to: CircleBehavior.ORBITING
                }
            }));
            this.setBehavior(CircleBehavior.ORBITING, true);
        } 
    } 
_handleTraveling ( ) { if ( ! this . _destination || typeof this . _destination !== 'object' ) { throw new Error ( 'This Circle does not have a destination to travel to.' ) ; } const { _x : x , _y : y , _destination : dest } = this ; const nextX = x + ( dest . x - this . _x ) / TRAVEL_FACTOR . x ; const nextY = y + ( dest . y - this . _y ) / TRAVEL_FACTOR . y ; this . moveTo ( nextX , nextY ) ; if ( this . hasReacedDestination ( ) ) { window . dispatchEvent ( new CustomEvent ( 'changedbehavior' , { detail : { circle : this , from : this . _behavior , to : CircleBehavior . ORBITING } } ) ) ; this . setBehavior ( CircleBehavior . ORBITING , true ) ; } }
Handles moving this Circle toward a point
 specified through this.setDestination.
Handles moving this Circle toward a point specified through this . setDestination .
// Prechecks // if // TODO: magic # // TODO: magic # // Switch to CircleBehavior.ORBITING once destination has been reached. // Dispatch an event through window to notify `main.js` // to switch this Circle to a new classification // if // _handleTraveling