1
0
Fork 0
mirror of https://github.com/qurator-spk/neat.git synced 2025-06-11 20:59:54 +02:00

code simplification

This commit is contained in:
Kai Labusch 2019-12-12 10:48:38 +01:00
parent 67e7f9e0f1
commit 87e1ef922e

View file

@ -747,27 +747,6 @@ function setupInterface(data, file, urls) {
createTable();
$('#tableregion')[0].addEventListener("wheel",
function(event) {
if (event.deltaY < 0) {
if (startIndex <= 0) return;
startIndex -= 1;
endIndex -= 1;
}
else {
if (endIndex >= data.data.length) return;
startIndex += 1;
endIndex += 1;
}
updateTable();
});
function stepsBackward (nrows) {
if (startIndex >= nrows) {
@ -795,6 +774,15 @@ function setupInterface(data, file, urls) {
updateTable();
}
$('#tableregion')[0].addEventListener("wheel",
function(event) {
if (event.deltaY < 0) stepsBackward(1);
else stepsForward(1);
updateTable();
});
$('#back').on('click', function() { stepsBackward(displayRows); } );
$('#next').on('click', function() { stepsForward(displayRows); } );