Skip to content

Commit

Permalink
fix(polyline): change types, paths -> path
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongkyuuuu committed Oct 1, 2021
1 parent 5f858b9 commit f5431e1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/components/Polyline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ export default defineComponent({
name: "Polyline",
emits: [...UI_EVENT_POLYLINE, "onLoad"],
props: {
paths: {
type: Array as PropType<
| naver.maps.ArrayOfCoords
| naver.maps.KVOArrayOfCoords
| naver.maps.ArrayOfCoordsLiteral
>,
path: {
type: Array as PropType<naver.maps.ArrayOfCoordsLiteral>,
required: true,
},
options: {
Expand All @@ -34,14 +30,14 @@ export default defineComponent({
setup: (props, { emit }) => {
const map = inject(naverMapObject)!;
const polyline = ref<naver.maps.Polyline>();
const { options, paths } = toRefs(props);
const { options, path } = toRefs(props);
const createPolygon = () => {
polyline.value = new window.naver.maps.Polyline(
Object.assign(
{
map: map.value,
paths: paths.value,
path: path.value,
},
options.value
)
Expand Down

0 comments on commit f5431e1

Please sign in to comment.