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

Commit

Permalink
fix(moveable): add target property
Browse files Browse the repository at this point in the history
Fixes #201
  • Loading branch information
probil authored Dec 4, 2020
2 parents c54c3ae + 0003c46 commit 8ca8b14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Moveable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default {
name: 'Moveable',
inheritAttrs: false,
props: {
target: [HTMLElement, SVGElement],
roundable: Boolean,
roundRelative: Boolean,
originDraggable: Boolean,
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 8ca8b14

Please sign in to comment.