Merge pull request #959 from danyaPostfactum/mousewheel
Fix ctrl+wheel issue
This commit is contained in:
commit
d65fabedb5
1 changed files with 5 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ function DefaultHandlers(mouseHandler) {
|
||||||
editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler));
|
editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler));
|
||||||
editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler));
|
editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler));
|
||||||
editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler));
|
editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler));
|
||||||
editor.setDefaultHandler("mousewheel", this.onScroll.bind(mouseHandler));
|
editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler));
|
||||||
|
|
||||||
var exports = ["select", "startSelect", "drag", "dragEnd", "dragWait",
|
var exports = ["select", "startSelect", "drag", "dragEnd", "dragWait",
|
||||||
"dragWaitEnd", "startDrag", "focusWait"];
|
"dragWaitEnd", "startDrag", "focusWait"];
|
||||||
|
|
@ -298,7 +298,10 @@ function DefaultHandlers(mouseHandler) {
|
||||||
this.setState("null");
|
this.setState("null");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onScroll = function(ev) {
|
this.onMouseWheel = function(ev) {
|
||||||
|
if (ev.getShiftKey() || ev.getAccelKey()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
var editor = this.editor;
|
var editor = this.editor;
|
||||||
var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
|
var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
|
||||||
if (isScrolable) {
|
if (isScrolable) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue