src/region.js
/**
     * Intializes some variables for use in the animation and calls the main animation method
     * @param {Array} end_coords [x,y] list of the end coordinates you want the region to move to
     * @param {Int} duration How long the animation plays in milliseconds
     * @param {String} type The easting type used for the tweening animation
     * @return {Void}
     */
Intializes some variables for use in the animation and calls the main animation method
@param {Array} end_coords [x,y] list of the end coordinates you want the region to move to
@param {Int} duration How long the animation plays in milliseconds
@param {String} type The easting type used for the tweening animation
@return {Void}
Intializes some variables for use in the animation and calls the main animation method @param { Array } end_coords [ x y ] list of the end coordinates you want the region to move to @param { Int } duration How long the animation plays in milliseconds @param { String } type The easting type used for the tweening animation @return { Void }
_animateRegionInit(end_coords, duration, type, animation_type) {
        let delta_x;
        let delta_y;
        const start_time = new Date().getTime();
        const end_time = start_time + duration;
        if (animation_type == 'position') {
            delta_x = end_coords[0] - this.current_position[0];
            delta_y = end_coords[1] - this.current_position[1];
        }
        else if (animation_type == 'size') {
            delta_x = end_coords[0] - this.current_size[0];
            delta_y = end_coords[1] - this.current_size[1];
        };
        this._animateRegion(end_coords,delta_x,delta_y,start_time,end_time,duration,type, animation_type);
    }
_animateRegionInit ( end_coords , duration , type , animation_type ) { let delta_x ; let delta_y ; const start_time = new Date ( ) . getTime ( ) ; const end_time = start_time + duration ; if ( animation_type == 'position' ) { delta_x = end_coords [ 0 ] - this . current_position [ 0 ] ; delta_y = end_coords [ 1 ] - this . current_position [ 1 ] ; } else if ( animation_type == 'size' ) { delta_x = end_coords [ 0 ] - this . current_size [ 0 ] ; delta_y = end_coords [ 1 ] - this . current_size [ 1 ] ; } ; this . _animateRegion ( end_coords , delta_x , delta_y , start_time , end_time , duration , type , animation_type ) ; }
Intializes some variables for use in the animation and calls the main animation method
 @param {Array} end_coords [x,y] list of the end coordinates you want the region to move to
 @param {Int} duration How long the animation plays in milliseconds
 @param {String} type The easting type used for the tweening animation
 @return {Void}
Intializes some variables for use in the animation and calls the main animation method @param { Array } end_coords [ x y ] list of the end coordinates you want the region to move to @param { Int } duration How long the animation plays in milliseconds @param { String } type The easting type used for the tweening animation @return { Void }
//log.info('_animateRegionInit called, setting vars and calling _animateRegion'); //log.info('in the size animation tyype chooser init'); //log.debug({startTime: start_time, endTime:end_time, deltaX:delta_x, deltaY: delta_y, duration: duration, type: type, animation_type: animation_type});