Merge pull request #233 from felberj/master

Changed scrolling of various screens
This commit is contained in:
George Hotz 2020-03-22 23:27:00 -07:00 committed by GitHub
commit ec5f471ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -78,9 +78,9 @@ $(document).ready(function() {
}
if (isend) is_dragging = false;
}
$('#cfg-static').on('mousewheel', '#outergbox', function(e) {
var wdx = e.originalEvent.wheelDeltaX;
var wdy = e.originalEvent.wheelDeltaY;
$('#cfg-static').on('wheel', '#outergbox', function(e) {
var wdx = e.originalEvent.deltaX;
var wdy = e.originalEvent.deltaY;
$("#gbox").css("margin-left", fdec($("#gbox").css("margin-left")) + wdx);
$("#gbox").css("margin-top", fdec($("#gbox").css("margin-top")) + wdy);
});
@ -103,20 +103,20 @@ $(document).ready(function() {
endDrag(e.screenX, e.screenY, true);
}*/
});
$('body').on('mousewheel', '.flat', function(e) {
$('body').on('wheel', '.flat', function(e) {
var cdr = $(".flat").children();
p(e.originalEvent.wheelDelta);
if (e.originalEvent.wheelDelta < 0) {
p(e.originalEvent.deltaY);
if (e.originalEvent.deltaY > 0) {
Session.set('iview', bn_add(Session.get('iview'), -1));
} else if (e.originalEvent.wheelDelta > 0) {
} else if (e.originalEvent.deltaY < 0) {
Session.set('iview', bn_add(Session.get('iview'), 1));
}
});
$("#idump")[0].addEventListener("mousewheel", function(e) {
$("#idump")[0].addEventListener("wheel", function(e) {
//p("idump mousewheel");
if (e.wheelDelta < 0) {
if (e.deltaY > 0) {
Session.set('clnum', Session.get('clnum')+1);
} else if (e.wheelDelta > 0) {
} else if (e.deltaY < 0) {
Session.set('clnum', Session.get('clnum')-1);
}
});

View File

@ -58,16 +58,16 @@ Deps.autorun(function() { DA("updating sview on fork/cl change");
});
$(document).ready(function() {
$("#strace")[0].addEventListener("mousewheel", function(e) {
$("#strace")[0].addEventListener("wheel", function(e) {
var sv = Session.get('sview');
var forknum = Session.get("forknum");
if (traces[forknum] === undefined) return;
var t = traces[forknum];
if (e.wheelDelta < 0) {
if (e.deltaY > 0) {
if (sv[1] < t.length) {
Session.set('sview', [sv[0]+1, sv[1]+1]);
}
} else if (e.wheelDelta > 0) {
} else if (e.deltaY < 0) {
if (sv[0] > 0) {
Session.set('sview', [sv[0]-1, sv[1]-1]);
}