Skip to content

Commit

Permalink
fix(core): 🐛 resolve circular dependency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyaoji committed Jun 14, 2023
1 parent 27f5af1 commit c630474
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 4 additions & 6 deletions packages/shared/materials/VcCircleWaveMaterialProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
* @Date: 2023-05-23 13:14:12
* @Description: Do not edit
* @LastEditors: zouyaoji 370681295@qq.com
* @LastEditTime: 2023-05-26 10:43:30
* @FilePath: \vue-cesium\packages\shared\materials\VcCircleWaveMaterialProperty.ts
* @LastEditTime: 2023-06-14 17:47:05
* @FilePath: \vue-cesium@next\packages\shared\materials\VcCircleWaveMaterialProperty.ts
*/
import { VcColor } from '@vue-cesium/utils/types'
import { makeColor } from '@vue-cesium/utils/cesium-helpers'
export default class VcCircleWaveMaterialProperty {
_definitionChanged: Cesium.Event<(...args: any[]) => void>
_color: Cesium.ConstantProperty
Expand All @@ -25,7 +23,7 @@ export default class VcCircleWaveMaterialProperty {
}

this._definitionChanged = new Event()
this._color = new Cesium.ConstantProperty(makeColor(options.color))
this._color = new Cesium.ConstantProperty(options.color)
this._duration = defaultValue(options.duration, 1000)
this.count = defaultValue(options.count, 2)
if (this.count <= 0) {
Expand Down Expand Up @@ -59,7 +57,7 @@ export default class VcCircleWaveMaterialProperty {
const oldValue = this._color

if (oldValue !== value) {
this._color = new Cesium.ConstantProperty(makeColor(value as any))
this._color = new Cesium.ConstantProperty(value as any)
this._definitionChanged.raiseEvent(this, 'color', value, oldValue)
}
}
Expand Down
12 changes: 9 additions & 3 deletions packages/shared/materials/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
/*
* @Author: zouyaoji@https://github.com/zouyaoji
* @Date: 2023-06-12 20:29:59
* @Description: Do not edit
* @LastEditors: zouyaoji 370681295@qq.com
* @LastEditTime: 2023-06-14 17:39:57
* @FilePath: \vue-cesium@next\packages\shared\materials\index.ts
*/
import VcCircleWaveMaterialProperty from './VcCircleWaveMaterialProperty'

export {
VcCircleWaveMaterialProperty
}
export { VcCircleWaveMaterialProperty }
2 changes: 1 addition & 1 deletion packages/utils/cesium-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import type {
} from './types'
import { compare, CompareOperator } from 'compare-versions'
import { hasOwn, isFunction, isArray, isString, isPlainObject, isEmptyObj, getObjClassName, isUndefined } from './util'
import { VcCircleWaveMaterialProperty } from '@vue-cesium/shared'
import { VcCircleWaveMaterialProperty } from '@vue-cesium/shared/materials'

/**
* 将对象或数组转换为 Cesium.Cartesian2
Expand Down

0 comments on commit c630474

Please sign in to comment.