function resizeRow()

in harness/app-assets/templates/assets/js/modules/collagePlus.js [44:79]


    function resizeRow(obj, row, settings, rownum) {
        var imageExtras             = (settings.padding * (obj.length - 1)),
            albumWidthAdjusted      = settings.albumWidth - imageExtras,
            overPercent             = albumWidthAdjusted / (row - imageExtras),
            trackWidth              = imageExtras,
            lastRow                 = (row < settings.albumWidth ? true : false);

        for (var i = 0; i < obj.length; i++) {
            var $obj                = $(obj[i][0]),
                fw                  = Math.floor(obj[i][1] * overPercent),
                fh                  = Math.floor(obj[i][2] * overPercent),
                isNotLast           = !!(( i < obj.length - 1));

            if (settings.allowPartialLastRow === true && lastRow === true) {
                fw = obj[i][1];
                fh = obj[i][2];
            }

            trackWidth += fw;

            if (!isNotLast && trackWidth < settings.albumWidth) {
                if (settings.allowPartialLastRow === true && lastRow === true) {
                    fw = fw;
                } else {
                    fw = fw + (settings.albumWidth - trackWidth);
                }
            }

            $obj.css({
                width: fw,
                height: fh
            });

            applyModifications($obj, isNotLast, settings);
        }
    }