Skip to content

Commit

Permalink
Update Extras.js
Browse files Browse the repository at this point in the history
  • Loading branch information
philogb committed Aug 13, 2014
1 parent 76c7e82 commit 7e4e698
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Extras/Extras.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,15 +730,15 @@ Extras.Classes.Navigation = new Class({
},

onMouseWheel: function(e, win, scroll) {
if(!this.config.zooming) return;
if(!this.config.enable || !this.config.zooming) return;
$.event.stop($.event.get(e, win));
var val = this.config.zooming / 1000,
ans = 1 + scroll * val;
this.canvas.scale(ans, ans);
},

onMouseDown: function(e, win, eventInfo) {
if(!this.config.panning) return;
if(!this.config.enable || !this.config.panning) return;
e.preventDefault ? e.preventDefault() : e.returnValue = false;
$.addClass(this.canvas.getElement(), 'grabbing');
if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : (eventInfo.getNode() || eventInfo.getEdge()))) return;
Expand All @@ -756,7 +756,7 @@ Extras.Classes.Navigation = new Class({
},

onMouseMove: function(e, win, eventInfo) {
if(!this.config.panning) return;
if(!this.config.enable || !this.config.panning) return;
if(!this.pressed) return;
if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : eventInfo.getNode())) return;
var thispos = this.pos,
Expand Down

0 comments on commit 7e4e698

Please sign in to comment.