forked from gee/bd-chapril
Zoom on wheel functionality fixed
This commit is contained in:
parent
ff7a0263c2
commit
cfb38ea271
@ -60,13 +60,14 @@ $(d).on('keydown', function(event){
|
||||
}
|
||||
});
|
||||
|
||||
d.onmousewheel = function(mw){
|
||||
if(currentObj && mw.wheelDelta > 0){
|
||||
d.addEventListener('wheel', function(event) {
|
||||
event.preventDefault();
|
||||
if(currentObj && event.deltaY > 0){
|
||||
cg.zoomIn(currentObj);
|
||||
} else if (currentObj && mw.wheelDelta < 0){
|
||||
} else if (currentObj && event.deltaY < 0){
|
||||
cg.zoomOut(currentObj);
|
||||
}
|
||||
};
|
||||
}, { passive: false });
|
||||
|
||||
cg.hoverdiv = function(e,divid){
|
||||
var x = e.clientX + 25;
|
||||
|
Loading…
Reference in New Issue
Block a user