立体雷达扫描持续时间duration参数改为速度speed
This commit is contained in:
@ -30,7 +30,7 @@ class RadarScanStereoscopic extends Base {
|
||||
* @param options.colorOut=rgba(255,255,0,0.3){string} 范围颜色
|
||||
* @param options.colorIn=rgba(255,0,0,0.3){string} 扫描颜色
|
||||
* @param options.radius=10 {number} 半径
|
||||
* @param options.duration=2000 {number} 持续时间
|
||||
* @param options.speed=1 {number} 扫描速度(倍)
|
||||
* @param options.label {object} 标签对象
|
||||
* @param options.label.show {string} 标签显隐
|
||||
* @param options.label.position {string} 标签位置
|
||||
@ -75,7 +75,7 @@ class RadarScanStereoscopic extends Base {
|
||||
if(this.options.radius > 999999) {
|
||||
this.options.radius = 999999
|
||||
}
|
||||
this.options.duration = options.duration || 2000
|
||||
this.options.speed = options.speed || 1
|
||||
this.event = new MouseEvent(this.sdk)
|
||||
options.label = options.label || {}
|
||||
this.options.label = {
|
||||
@ -117,7 +117,7 @@ class RadarScanStereoscopic extends Base {
|
||||
let height = options.alt;
|
||||
|
||||
|
||||
let heading = that.options.duration ? 360 / that.options.duration * Cesium.getTimestamp() : 0;
|
||||
let heading = that.options.speed ? (360 / that.duration * Cesium.getTimestamp() * that.options.speed) : 0;
|
||||
let arr = calculatePane(that.options, that.options.radius, heading);
|
||||
let _time = new Date().getTime();
|
||||
|
||||
@ -129,7 +129,7 @@ class RadarScanStereoscopic extends Base {
|
||||
// _time = tempTime
|
||||
// heading += speed;
|
||||
|
||||
heading = that.options.duration ? 360 / that.options.duration * Cesium.getTimestamp() : 0;
|
||||
heading = that.options.speed ? (360 / that.duration * Cesium.getTimestamp() * that.options.speed) : 0;
|
||||
arr = calculatePane(that.options, that.options.radius, heading);
|
||||
});
|
||||
that.entity = viewer.entities.add({
|
||||
@ -384,11 +384,14 @@ class RadarScanStereoscopic extends Base {
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return this.options.duration
|
||||
return 1000
|
||||
}
|
||||
set duration(v) {
|
||||
this.options.duration = v
|
||||
this._elms.duration && this._elms.duration.forEach((item) => {
|
||||
get speed() {
|
||||
return this.options.speed
|
||||
}
|
||||
set speed(v) {
|
||||
this.options.speed = v
|
||||
this._elms.speed && this._elms.speed.forEach((item) => {
|
||||
item.value = v
|
||||
})
|
||||
RadarScanStereoscopic.changeParam(this)
|
||||
@ -1028,7 +1031,7 @@ class RadarScanStereoscopic extends Base {
|
||||
this.colorOut = this.originalOptions.colorOut
|
||||
this.colorIn = this.originalOptions.colorIn
|
||||
this.radius = this.originalOptions.radius
|
||||
this.duration = this.originalOptions.duration
|
||||
this.speed = this.originalOptions.speed
|
||||
this.labelShow = this.originalOptions.label.show
|
||||
this.labelColor = this.originalOptions.label.color
|
||||
this.labelFontSize = this.originalOptions.label.fontSize
|
||||
|
||||
Reference in New Issue
Block a user