function updateRows()

in ui/src/app/common/components/indigo-components/directives/stoich-table/services/reagents/reagents-calculation.service.js [466:487]


    function updateRows() {
        if (!isLimitingRowExist()) {
            return;
        }

        var limitingRow = getLimitingRow();
        _.forEach(rows, function(row) {
            var canUpdate = !row.isLimiting() && !row.isSolventRow();
            var isManuallyEnteredExist =
                row.isWeightManuallyEntered() || row.isVolumeManuallyEntered() || row.isMolManuallyEntered();
            var shouldUpdateRowWithNewMol = !isManuallyEnteredExist && canUpdate;
            var shouldUpdateOnlyEq = isManuallyEnteredExist && canUpdate;

            if (shouldUpdateRowWithNewMol) {
                setMolDependingOfLimiting(row, limitingRow);
            }

            if (shouldUpdateOnlyEq) {
                row.updateEq(limitingRow);
            }
        });
    }