mirror of
https://github.com/qurator-spk/neat.git
synced 2025-06-13 21:59:54 +02:00
code simplification
This commit is contained in:
parent
67e7f9e0f1
commit
87e1ef922e
1 changed files with 9 additions and 21 deletions
30
neath.js
30
neath.js
|
@ -747,27 +747,6 @@ function setupInterface(data, file, urls) {
|
||||||
|
|
||||||
createTable();
|
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) {
|
function stepsBackward (nrows) {
|
||||||
|
|
||||||
if (startIndex >= nrows) {
|
if (startIndex >= nrows) {
|
||||||
|
@ -795,6 +774,15 @@ function setupInterface(data, file, urls) {
|
||||||
updateTable();
|
updateTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#tableregion')[0].addEventListener("wheel",
|
||||||
|
function(event) {
|
||||||
|
|
||||||
|
if (event.deltaY < 0) stepsBackward(1);
|
||||||
|
else stepsForward(1);
|
||||||
|
|
||||||
|
updateTable();
|
||||||
|
});
|
||||||
|
|
||||||
$('#back').on('click', function() { stepsBackward(displayRows); } );
|
$('#back').on('click', function() { stepsBackward(displayRows); } );
|
||||||
|
|
||||||
$('#next').on('click', function() { stepsForward(displayRows); } );
|
$('#next').on('click', function() { stepsForward(displayRows); } );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue