--- a/src_js/iconolab-bundle/src/components/editor/Canvas.vue Wed Feb 22 18:31:01 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/Canvas.vue Wed Feb 22 18:31:58 2017 +0100
@@ -2,7 +2,8 @@
<div class="zoom">
<div>
<svg ref="svg"
- v-bind:class="{ 'cut-canvas': true, 'canvas--rect': mode === 'rect', 'canvas--free': mode === 'free' }"
+ class="cut-canvas"
+ v-bind:class="canvasClass"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image xmlns:xlink="http://www.w3.org/1999/xlink"
ref="image"
@@ -94,6 +95,14 @@
readonly: false
}
},
+ computed: {
+ canvasClass: function() {
+ return {
+ 'canvas--rect': !this.readonly && this.mode === 'rect',
+ 'canvas--free': !this.readonly && this.mode === 'free'
+ }
+ }
+ },
watch: {
mode: function(mode) {
this.reset();