vue-cesium
Version:
Vue 3.x components for CesiumJS.
1 lines • 4.04 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/drawings/src/point/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-10-11 09:17:22\n * @LastEditTime: 2022-06-24 16:55:11\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\drawings\\src\\point\\index.ts\n */\nimport { defineComponent, PropType, Ref } from 'vue'\nimport { useDrawingActionProps } from '@vue-cesium/composables/use-drawing/props'\nimport useDrawingPoint from '@vue-cesium/composables/use-drawing/use-drawing-point'\nimport { drawingEmit } from '@vue-cesium/utils/emits'\nimport { VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject } from '@vue-cesium/utils/types'\nimport {\n VcDrawingDrawEvt,\n VcDrawingEditorEvt,\n VcDrawingMouseEvt,\n VcDrawingPreRenderDatas,\n VcDrawTipOpts,\n VcEditorOpts,\n VcPointDrawing\n} from '@vue-cesium/utils/drawing-types'\nimport { VcLabelProps, VcPointProps } from '../../../primitive-collections'\n\nexport default defineComponent({\n name: 'VcDrawingPoint',\n props: {\n ...useDrawingActionProps,\n heightReference: Number,\n labelOpts: Object as PropType<VcLabelProps>,\n showLabel: Boolean\n },\n emits: drawingEmit,\n setup(props, ctx) {\n // state\n return useDrawingPoint(props, ctx, 'VcDrawingPoint')\n }\n})\n\nexport type VcDrawingPointProps = {\n /**\n * Specify whether to respond to mouse pick events.\n */\n enableMouseEvent?: boolean\n /**\n * Specify Whether the drawing object is visible.\n */\n show?: boolean\n /**\n * Specify whether the drawing result can be edited.\n */\n editable?: boolean\n /**\n * Specify drawing hints.\n */\n drawtip?: VcDrawTipOpts\n /**\n * Specify parameters for drawing points.\n */\n pointOpts?: VcPointProps\n /**\n * Specify the heightReference.\n */\n heightReference?: number\n /**\n * Specify whether to display label.\n */\n showLabel: boolean\n /**\n * Specify whether the depthTest is disabled.\n * Default value: false\n */\n disableDepthTest?: boolean\n /**\n * Specify editor options.\n */\n editorOpts?: VcEditorOpts\n /**\n * Specify editor mode.\n */\n mode?: number\n /**\n * Specify prerender datas.\n */\n preRenderDatas?: VcDrawingPreRenderDatas\n /**\n * Triggers before the VcDrawingPoint is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcDrawingPoint 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 VcDrawingPoint is destroyed.\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n /**\n * \tTriggers when drawing.\n */\n onDrawEvt?: (evt: VcDrawingDrawEvt<VcPointDrawing>, viewer: Cesium.Viewer) => void\n /**\n * Triggers when the editor button is clicked.\n */\n onEditorEvt?: (evt: VcDrawingEditorEvt, viewer: Cesium.Viewer) => void\n /**\n * Triggers when the mouse is over or out on the drawing point.\n */\n onMouseEvt?: (evt: VcDrawingMouseEvt, viewer: Cesium.Viewer) => void\n}\n\nexport interface VcDrawingPointRef extends VcComponentPublicInstance<VcDrawingPointProps> {\n /**\n * Get or set the renderDatas.\n */\n renderDatas?: Ref<Array<VcPointDrawing>>\n /**\n * start a new draw.\n */\n startNew: () => void\n /**\n * stop drawing.\n */\n stop: (removeLatest?: boolean) => void\n /**\n * clear and stop drawing.\n */\n clear: () => void\n}\n"],"names":[],"mappings":";;;;;;AAwBA,qBAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,gBAAA;AAAA,EACN,KAAO,EAAA;AAAA,IACL,GAAG,qBAAA;AAAA,IACH,eAAiB,EAAA,MAAA;AAAA,IACjB,SAAW,EAAA,MAAA;AAAA,IACX,SAAW,EAAA,OAAA;AAAA,GACb;AAAA,EACA,KAAO,EAAA,WAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAO,OAAA,eAAA,CAAgB,KAAO,EAAA,GAAA,EAAK,gBAAgB,CAAA,CAAA;AAAA,GACrD;AACF,CAAC,CAAA;;;;"}