浏览代码

fix the restore issue #50

tags/2.4.0
Caven Chen 4 年前
父节点
当前提交
6277f0fd83
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6
    2
      modules/history-track/Track.js

+ 6
- 2
modules/history-track/Track.js 查看文件

@@ -39,6 +39,7 @@ class Track {
}
this._controller = undefined
this._sampledPosition = undefined
this._velocityOrientation = undefined
this._viewed = false
this._delegate = new Cesium.Entity()
this._pathPositions = []
@@ -50,7 +51,6 @@ class Track {
})
}
})

this._positionIndex = 0
this._timeLine = []
this._startTime = undefined
@@ -183,6 +183,10 @@ class Track {
} else {
this._delegate.position = p
}
let o = this._velocityOrientation.getValue(now)
if (o) {
this._delegate.orientation = o
}
let time = this._timeLine[this._positionIndex]
if (time) {
let timeDiff = Cesium.JulianDate.secondsDifference(now, time)
@@ -321,7 +325,7 @@ class Track {
interpolationAlgorithm: Cesium.LagrangePolynomialApproximation
})
}
this._delegate.orientation = new Cesium.VelocityOrientationProperty(
this._velocityOrientation = new Cesium.VelocityOrientationProperty(
this._sampledPosition
)
this._endTime = this._timeLine[this._timeLine.length - 1]

正在加载...
取消
保存