diff --git a/demo/VueRoughNotation.vue b/demo/VueRoughNotation.vue index 0d76aa2..72a8c63 100644 --- a/demo/VueRoughNotation.vue +++ b/demo/VueRoughNotation.vue @@ -98,6 +98,23 @@ +
+
+

+ Reactive change +

+

+ Color, Stroke width, Padding will change reactively +

+
+
+

@@ -109,6 +126,12 @@ diff --git a/src/components/RoughNotation.js b/src/components/RoughNotation.js index 9ef17cc..5dc7248 100644 --- a/src/components/RoughNotation.js +++ b/src/components/RoughNotation.js @@ -94,6 +94,16 @@ export default (options) => ({ this.hide(); } }, { immediate: true }); + + this.$watch('color', (value) => { + this.annotation.color = value + }); + this.$watch('strokeWidth', (value) => { + this.annotation.strokeWidth = value + }); + this.$watch('padding', (value) => { + this.annotation.padding = value + }); }, beforeDestroy () {