Skip to content

Commit

Permalink
feat: add group component
Browse files Browse the repository at this point in the history
  • Loading branch information
ksassnowski authored Aug 22, 2024
1 parent e047572 commit 7b9a5a8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/components/Group.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<g v-bind="$attrs">
<slot />
</g>
</template>

<script lang="ts" setup>
import { toRef } from "vue";
import { PossibleVector2, Vector2 } from "../utils/Vector2.ts";
import { useLocalToWorld } from "../composables/useLocalToWorld.ts";
const props = withDefaults(
defineProps<{ position?: PossibleVector2; }>(), { position: () => new Vector2() });
useLocalToWorld(toRef(props, "position"));
</script>
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export { default as Circle } from "./components/Circle.vue";
export { default as Ellipse } from "./components/Ellipse.vue";
export { default as FunctionPlot } from "./components/FunctionPlot.vue";
export { default as Graph } from "./components/Graph.vue";
export { default as Group } from "./components/Group.vue";
export { default as Label } from "./components/Label.vue";
export { default as Line } from "./components/Line.vue";
export { default as Point } from "./components/Point.vue";
Expand Down

0 comments on commit 7b9a5a8

Please sign in to comment.