From 0003c4620e55ff5c4b8ade05f4576c486324e0ff Mon Sep 17 00:00:00 2001 From: Russ Smith Date: Wed, 11 Nov 2020 14:47:36 -0800 Subject: [PATCH] Adding the target property This helps with #201 https://github.com/probil/vue-moveable/issues/201 --- src/components/Moveable.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Moveable.vue b/src/components/Moveable.vue index a634370..e02f487 100644 --- a/src/components/Moveable.vue +++ b/src/components/Moveable.vue @@ -33,6 +33,7 @@ export default { name: 'Moveable', inheritAttrs: false, props: { + target: [HTMLElement, SVGElement], roundable: Boolean, roundRelative: Boolean, originDraggable: Boolean, @@ -105,7 +106,7 @@ export default { mounted() { this.moveable = new Moveable(this.$props.container, { ...this.$props, - target: this.$el, + target: this.target || this.$el, }); EVENTS.forEach((event) => { const kebabCaseEvent = event.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();