Skip to content

Commit

Permalink
Merge pull request geohot#233 from felberj/master
Browse files Browse the repository at this point in the history
Changed scrolling of various screens
  • Loading branch information
geohot authored Mar 23, 2020
2 parents 1b87bd3 + 59dbeef commit ec5f471
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions web/client/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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);
}
});
Expand Down
6 changes: 3 additions & 3 deletions web/client/strace.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit ec5f471

Please sign in to comment.