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

Adding the target property #203

Merged
merged 1 commit into from
Dec 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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