Skip to content

Commit 8eaf63f

Browse files
committed
Merge branch 'dev' of github.com:zouyaoji/vue-cesium into dev
2 parents 4fc6bad + 47d6a2e commit 8eaf63f

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

packages/components/viewer/src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
/*
22
* @Author: zouyaoji@https://github.com/zouyaoji
33
* @Date: 2021-09-16 09:28:13
4-
* @LastEditTime: 2022-08-12 11:40:04
5-
* @LastEditors: zouyaoji
4+
* @LastEditTime: 2024-03-17 18:08:40
5+
* @LastEditors: zouyaoji 370681295@qq.com
66
* @Description:
7-
* @FilePath: \10_vue-cesium\packages\components\viewer\src\index.ts
7+
* @FilePath: \vue-cesium\packages\components\viewer\src\index.ts
88
*/
99
import { defineComponent, provide, getCurrentInstance, h, createCommentVNode, withDirectives, computed } from 'vue'
1010
import type { VNode } from 'vue'
1111
import useViewer, { viewerProps } from './useViewer'
1212
import type { VcViewerProps } from './useViewer'
1313
import type {
14+
VcCamera,
1415
VcComponentInternalInstance,
1516
VcDatasource,
1617
VcTerrainProvider,
@@ -86,7 +87,8 @@ const emits = {
8687
wheel: (delta: number) => true,
8788
imageryLayersUpdatedEvent: () => true,
8889
tileLoadProgressEvent: (length: number) => true,
89-
touchEnd: evt => true
90+
touchEnd: evt => true,
91+
'update:camera': (evt: VcCamera) => true
9092
}
9193
export default defineComponent({
9294
name: 'VcViewer',

packages/components/viewer/src/useViewer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,10 @@ export interface VcViewerProps {
18511851
*/
18521852
onTileLoadProgressEvent?: (length: number) => void
18531853
onTouchEnd?: (evt: any) => void
1854+
/**
1855+
* Triggers when the camera has changed by percentageChanged.
1856+
*/
1857+
'onUpdate:camera'?: (evt: VcCamera) => void
18541858
}
18551859

18561860
export interface VcViewerSlots {

packages/utils/cesium-helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ export function makeMaterialProperty(val: VcMaterialProperty, isConstant = false
488488
return new PolylineDashMaterialProperty({
489489
color: makeColor(defaultValue(value.fabric.uniforms.color, 'white')),
490490
gapColor: makeColor(defaultValue(value.fabric.uniforms.gapColor, Color.TRANSPARENT)),
491-
dashLength: defaultValue(value.fabric.uniforms.taperPower, 16.0),
492-
dashPattern: defaultValue(value.fabric.uniforms.taperPower, 255.0)
491+
dashLength: defaultValue(value.fabric.uniforms.dashLength, 16.0),
492+
dashPattern: defaultValue(value.fabric.uniforms.dashPattern, 255.0)
493493
})
494494
case 'PolylineGlow':
495495
return new PolylineGlowMaterialProperty({

0 commit comments

Comments
 (0)