UNPKG

vue-cesium

Version:
1 lines 4.71 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/primitive-collections/polyline/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-03-21 08:59:40\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\primitive-collections\\polyline\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type {\n VcComponentInternalInstance,\n VcComponentPublicInstance,\n VcDistanceDisplayCondition,\n VcMaterial,\n VcPickEvent,\n VcPosition,\n VcReadyObject\n} from '@vue-cesium/utils/types'\nimport { usePrimitiveCollectionItems } from '@vue-cesium/composables'\nimport { distanceDisplayCondition, id, loop, material, positions, show, width, enableMouseEvent } from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { primitiveCollectionEmits } from '@vue-cesium/utils/emits'\n\nexport const polylineProps = {\n ...distanceDisplayCondition,\n ...id,\n ...loop,\n ...material,\n ...positions,\n ...show,\n ...width,\n ...enableMouseEvent\n}\nexport default defineComponent({\n name: 'VcPolyline',\n props: polylineProps,\n emits: primitiveCollectionEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'Polyline'\n usePrimitiveCollectionItems(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n }\n})\n\nexport type VcPolylineProps = {\n /**\n * true if this polyline will be shown; otherwise, false.\n * Default value: true\n */\n show?: boolean\n /**\n * The width of the polyline in pixels.\n * Default: 1.0\n */\n width?: number\n /**\n * Whether a line segment will be added between the last and first line positions to make this line a loop.\n * Default value: false\n */\n loop?: boolean\n /**\n * The material.\n */\n material?: VcMaterial\n /**\n * The positions.\n */\n position?: VcPosition\n /**\n * The user-defined object to be returned when this polyline is picked.\n */\n id?: any\n /**\n * The condition specifying at what distance from the camera that this polyline will be displayed.\n */\n distanceDisplayCondition?: VcDistanceDisplayCondition\n /**\n * Specifies whether to respond to mouse pick events.\n * Default Value: true\n */\n enableMouseEvent?: boolean\n /**\n * Triggers before the VcPolyline is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcPolyline is successfully loaded.\n */\n onReady?: (readyObject: VcReadyObject) => void\n /**\n * Triggers when the component load failed.\n */\n onUnready?: (e: any) => void\n /**\n * Triggers when the VcPolyline is destroyed.\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the mouse is pressed on this point.\n */\n onMousedown?: (evt: VcPickEvent) => void\n /**\n * Triggers when the mouse bounces up on this point.\n */\n onMouseup?: (evt: VcPickEvent) => void\n /**\n * Triggers when the mouse clicks on this point.\n */\n onClick?: (evt: VcPickEvent) => void\n /**\n * Triggers when the mouse clicks outside this point.\n */\n onClickout?: (evt: VcPickEvent) => void\n /**\n * Triggers when the left mouse button double-clicks this point.\n */\n onDblclick?: (evt: VcPickEvent) => void\n /**\n * Triggers when the mouse moves on this point.\n */\n onMousemove?: (evt: VcPickEvent) => void\n /**\n * Triggers when the mouse moves over to this point.\n */\n onMouseover?: (evt: VcPickEvent) => void\n /**\n * Triggers when the mouse moves out of this point.\n */\n onMouseout?: (evt: VcPickEvent) => void\n}\n\nexport type VcPolylineRef = VcComponentPublicInstance<VcPolylineProps>\n"],"names":[],"mappings":";;;;;;;;AAuBO,MAAM,aAAgB,GAAA;AAAA,EAC3B,GAAG,wBAAA;AAAA,EACH,GAAG,EAAA;AAAA,EACH,GAAG,IAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,IAAA;AAAA,EACH,GAAG,KAAA;AAAA,EACH,GAAG,gBAAA;AACL,EAAA;AACA,eAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,YAAA;AAAA,EACN,KAAO,EAAA,aAAA;AAAA,EACP,KAAO,EAAA,wBAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,UAAA,CAAA;AACvB,IAA4B,2BAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAEhD,IAAA,OAAO,MAAG;AA3Cd,MAAA,IAAA,EAAA,CAAA;AA2CiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,EAAE,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAChF;AACF,CAAC,CAAA;;;;"}