소스 검색

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]

Loading…
취소
저장