{"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 'casc-cesium-utils/types'\nimport { usePrimitiveCollectionItems } from 'casc-cesium-composables'\nimport { distanceDisplayCondition, id, loop, material, positions, show, width, enableMouseEvent } from 'casc-cesium-utils/cesium-props'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { primitiveCollectionEmits } from 'casc-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":";;;;;;;AAKY,MAAC,aAAa,GAAG;AAC7B,EAAE,GAAG,wBAAwB;AAC7B,EAAE,GAAG,EAAE;AACP,EAAE,GAAG,IAAI;AACT,EAAE,GAAG,QAAQ;AACb,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,IAAI;AACT,EAAE,GAAG,KAAK;AACV,EAAE,GAAG,gBAAgB;AACrB,EAAE;AACF,eAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,YAAY;AACpB,EAAE,KAAK,EAAE,aAAa;AACtB,EAAE,KAAK,EAAE,wBAAwB;AACjC,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AACtC,IAAI,2BAA2B,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACtD,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;AAC9G,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}