anto
This commit is contained in:
@@ -23,3 +23,22 @@ function checkVideoPath(videos, name) {
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
function getMeasurermentsIdsFromForm(choice, firstInput,lastInput) {
|
||||
if (choice === 'oneByOne') {
|
||||
const highlightedButtons = document.querySelectorAll('.number-button.highlight');
|
||||
return Array.from(highlightedButtons).map(button => parseInt(button.textContent));
|
||||
} else {
|
||||
const first = parseInt(firstInput.value);
|
||||
const last = parseInt(lastInput.value);
|
||||
const numerator = parseInt(document.getElementById('numerator').value);
|
||||
const denominator = parseInt(document.getElementById('denominator').value);
|
||||
const fraction = numerator / denominator;
|
||||
|
||||
const measurementIds = [];
|
||||
for (let i = first; i <= last; i += fraction) {
|
||||
measurementIds.push(Math.round(i));
|
||||
}
|
||||
return measurementIds;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user