Skip to content

Commit

Permalink
feat: added mars3dConfig prop
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyaoji committed Jun 27, 2022
1 parent 973f090 commit 1ea1878
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/components/viewer/src/defaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,6 @@ export default {
type: String,
default: '1000'
},
viewerCreator: Function
viewerCreator: Function,
mars3dConfig: Object
}
3 changes: 2 additions & 1 deletion packages/components/viewer/src/useViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ export default function (props: VcViewerProps, ctx, vcInstance: VcComponentInter
if (cesiumPath?.lastIndexOf('/') !== cesiumPath?.length - 1) {
cesiumPath += '/'
}
const libsConfig = getMars3dConfig(cesiumPath!)
const libsConfig = props.mars3dConfig || getMars3dConfig(cesiumPath)
const include = globalConfig.value.cfg?.include || 'mars3d'
const arrInclude = include.split(',')
const keys = {}
Expand Down Expand Up @@ -1616,6 +1616,7 @@ export interface VcViewerProps {
* Default value: 1000
*/
touchHoldArg?: string
mars3dConfig?: any
/**
* Specify the initialization method of the viewer when loading non-standard third-party Cesium libraries.
*/
Expand Down

0 comments on commit 1ea1878

Please sign in to comment.