diff --git a/javascript/src/Plugins/qfq.fabric.js b/javascript/src/Plugins/qfq.fabric.js index 7471713b754ab8cf27765b463f0d23d8f569dec9..329f1616cd7a610008a6d29ccc2096d99a95bff0 100644 --- a/javascript/src/Plugins/qfq.fabric.js +++ b/javascript/src/Plugins/qfq.fabric.js @@ -363,7 +363,7 @@ $(function (n) { this.canvas.on('selection:cleared', function(e) { that.defaultSelectionClearHandler(e) }); window.addEventListener('keydown', function(e) { that.defaultKeyStrokeHandler(e) }); window.addEventListener('dragend', function(e) { that.dragEndEvent(e) }); - this.parentElement.on('contextmenu', function(e) { that.defaultRightClickHandler(e); if(that.isZoomMode) { return false; } }); + this.parentElement.on('contextmenu', function(e) { that.defaultRightClickHandler(e) }); $(window).resize(function() { that.resizeCanvas(); }); }; @@ -377,7 +377,6 @@ $(function (n) { n.Fabric.prototype.defaultMouseInEvent = function(e) { this.mouseInsideCanvas = true; - console.log("Mouse entered Canvas"); }; n.Fabric.prototype.resizeCanvas = function () { @@ -620,13 +619,12 @@ $(function (n) { n.Fabric.prototype.defaultRightClickHandler = function(e) { if (this.isZoomMode) { this.zoomCanvas(e, -0.1); - return false; + e.preventDefault(); } }; n.Fabric.prototype.defaultMouseOutEvent = function(e) { this.mouseInsideCanvas = false; - console.log("Mouse left Canvas"); if (this.moveMode) { this.deactivatePanning(); @@ -660,13 +658,6 @@ $(function (n) { } }; - n.Fabric.prototype.defaultRightClickEvent = function(e) { - if (this.isZoomMode) { - this.zoomCanvas(e, -0.1); - return false; - } - }; - // Calls additional functions on button press, could eventually be integrated to // the button/mode json. Talk about strange integration. n.Fabric.prototype.buttonPress = function(string, $button) {