mirror of
https://github.com/geohot/qira
synced 2025-03-12 18:13:15 +03:00
Changed scrolling of various screens, because they where broken on latest Firefox?
This commit is contained in:
parent
b349141547
commit
59dbeefd52
20
web/client/controls.js
vendored
20
web/client/controls.js
vendored
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user