src_js/iconolab-bundle/src/components/editor/Canvas.vue
changeset 385 d0465086d8d2
parent 374 01a7e6b61314
child 389 583a366e298c
--- a/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Fri Feb 24 14:54:06 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Fri Feb 24 15:15:27 2017 +0100
@@ -81,6 +81,10 @@
                 type: Boolean,
                 default: false
             },
+            isAuthenticated: {
+                type: Boolean,
+                default: false
+            }
         },
         components: {
             shapeRect: ShapeRect,
@@ -158,7 +162,7 @@
             },
             annotation: function(annotation) {
                 this.reset();
-                this.readonly = !!annotation;
+                this.readonly = !!annotation || !this.isAuthenticated;
                 if (this.annotation) {
                     this.loadAnnotation();
                 }
@@ -397,6 +401,8 @@
 
             handleDrawFree: function() {
 
+                if (this.readonly) { return; }
+
                 this.removeEventHandlers();
 
                 var clickTimeout;
@@ -421,6 +427,8 @@
 
             handleDrawRect: function() {
 
+                if (this.readonly) { return; }
+
                 this.removeEventHandlers();
 
                 var startPosition = { x: 0, y: 0 };