ソースを参照

improve the roaming #65

tags/2.5.0
Caven Chen 4年前
コミット
2bb0c45b88
2個のファイルの変更8行の追加6行の削除
  1. 7
    5
      modules/roaming/RoamingController.js
  2. 1
    1
      modules/roaming/RoamingPath.js

+ 7
- 5
modules/roaming/RoamingController.js ファイルの表示

@@ -3,6 +3,7 @@
* @Date: 2021-06-08 20:41:51
*/

import { Cesium } from '@dc-modules/namespace'
import { SceneEventType, PathEventType } from '@dc-modules/event'

class RoamingController {
@@ -23,11 +24,10 @@ class RoamingController {
return false
}
this._activedPath.pathEvent &&
this._activedPath.pathEvent.fire(
PathEventType.POST_RENDER,
this._viewer,
this._viewOption
)
this._activedPath.pathEvent.fire(PathEventType.POST_RENDER, {
viewer: this._viewer,
viewOption: this._viewOption
})
}

/**
@@ -123,6 +123,7 @@ class RoamingController {
this._activedPath && (this._activedPath.actived = false)
this._activedPath = undefined
this._viewer.off(SceneEventType.POST_RENDER, this._onPostRender, this)
this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY)
return this
}

@@ -135,6 +136,7 @@ class RoamingController {
this._activedPath && (this._activedPath.actived = false)
this._activedPath = undefined
this._viewer.off(SceneEventType.POST_RENDER, this._onPostRender, this)
this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY)
return this
}
}

+ 1
- 1
modules/roaming/RoamingPath.js ファイルの表示

@@ -101,7 +101,7 @@ class RoamingPath {
* @param viewOption
* @private
*/
_onPostRender(viewer, viewOption) {
_onPostRender({ viewer, viewOption }) {
if (!this.actived) {
return false
}

読み込み中…
キャンセル
保存