Fix usage of isAuthenticated.
authorAlexandre Segura <mex.zktk@gmail.com>
Fri, 24 Feb 2017 16:56:30 +0100
changeset 389 583a366e298c
parent 388 3133bd0207e4
child 390 d2187b1af744
Fix usage of isAuthenticated.
src_js/iconolab-bundle/src/components/editor/Canvas.vue
--- a/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Fri Feb 24 16:52:37 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/Canvas.vue	Fri Feb 24 16:56:30 2017 +0100
@@ -109,8 +109,8 @@
         computed: {
             canvasClass: function() {
                 return {
-                    'canvas--rect': !this.readonly && this.mode === 'rect',
-                    'canvas--free': !this.readonly && this.mode === 'free'
+                    'canvas--rect': !this.readonly && this.isAuthenticated && this.mode === 'rect',
+                    'canvas--free': !this.readonly && this.isAuthenticated && this.mode === 'free'
                 }
             }
         },
@@ -401,7 +401,7 @@
 
             handleDrawFree: function() {
 
-                if (this.readonly) { return; }
+                if (!this.isAuthenticated) { return; }
 
                 this.removeEventHandlers();
 
@@ -427,7 +427,7 @@
 
             handleDrawRect: function() {
 
-                if (this.readonly) { return; }
+                if (!this.isAuthenticated) { return; }
 
                 this.removeEventHandlers();