Skip to content
This repository was archived by the owner on Nov 9, 2021. It is now read-only.

Commit 8ca8b14

Browse files
authored
fix(moveable): add target property
Fixes #201
2 parents c54c3ae + 0003c46 commit 8ca8b14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Moveable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default {
3333
name: 'Moveable',
3434
inheritAttrs: false,
3535
props: {
36+
target: [HTMLElement, SVGElement],
3637
roundable: Boolean,
3738
roundRelative: Boolean,
3839
originDraggable: Boolean,
@@ -105,7 +106,7 @@ export default {
105106
mounted() {
106107
this.moveable = new Moveable(this.$props.container, {
107108
...this.$props,
108-
target: this.$el,
109+
target: this.target || this.$el,
109110
});
110111
EVENTS.forEach((event) => {
111112
const kebabCaseEvent = event.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();

0 commit comments

Comments
 (0)