src/js/grid.js
/**
     * Calculates the scale and translation values to apply to the image cell when we click on it. 
     * Also used to recalculate those values on resize.
     * @return {JSON} the translation and scale values
     */
Calculates the scale and translation values to apply to the image cell when we click on it.
Also used to recalculate those values on resize.
@return {JSON} the translation and scale values
Calculates the scale and translation values to apply to the image cell when we click on it . Also used to recalculate those values on resize . @return { JSON } the translation and scale values
calcTransformImage() {
        const cellrect = adjustedBoundingRect(this.imageCellArr[this.currentCell].DOM.el);
        return {
            scale: winsize.width * 0.54 / cellrect.width,
            x: winsize.width * 0.65 - (cellrect.left + cellrect.width/2),
            y: winsize.height * 0.50 - (cellrect.top + cellrect.height/2)
        };
    }
calcTransformImage ( ) { const cellrect = adjustedBoundingRect ( this . imageCellArr [ this . currentCell ] . DOM . el ) ; return { scale : winsize . width * 0.54 / cellrect . width , x : winsize . width * 0.65 - ( cellrect . left + cellrect . width / 2 ) , y : winsize . height * 0.50 - ( cellrect . top + cellrect . height / 2 ) } ; }
Calculates the scale and translation values to apply to the image cell when we click on it.
Calculates the scale and translation values to apply to the image cell when we click on it .