app/PointTranslator.js
/**
     * Change a full-resolution pixel coordinate to a grid-based coordinate.
     */
Change a full-resolution pixel coordinate to a grid-based coordinate.
Change a full - resolution pixel coordinate to a grid - based coordinate .
pixelToGrid(point)
    {
        let [x, y] = point;
        x = Math.round((x - this.origin[0]) / this.interval);
        y = Math.round((this.origin[1] - y) / this.interval);
        return [x, y];
    }
pixelToGrid ( point ) { let [ x , y ] = point ; x = Math . round ( ( x - this . origin [ 0 ] ) / this . interval ) ; y = Math . round ( ( this . origin [ 1 ] - y ) / this . interval ) ; return [ x , y ] ; }
Change a full-resolution pixel coordinate to a grid-based coordinate.
Change a full - resolution pixel coordinate to a grid - based coordinate .