src_js/iconolab-bundle/src/components/editor/Canvas.vue
changeset 503 a6290b2fae6b
parent 502 89dc19ad8073
child 504 11a862e01b04
--- a/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Mon May 15 12:38:40 2017 +0200
+++ b/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Mon May 15 14:44:14 2017 +0200
@@ -418,15 +418,16 @@
                 this.animateViewBox([0, 0, this.imageWidth, this.imageHeight]);
             },
 
-            zoomIn: function() {
+            zoomIn: _.throttle(function() {
+                console.log('zoomIn', arguments)
                 if (this.scale >= 1.9) { return; }
                 this.scale = this.scale + (1 * this.zoomFactor);
-            },
+            }, 400),
 
-            zoomOut: function() {
+            zoomOut: _.throttle(function() {
                 if (this.scale === 1) { return; }
                 this.scale = this.scale - (1 * this.zoomFactor);
-            },
+            }, 400),
 
             zoomOffset: function() {
                 return {