| @@ -2,7 +2,7 @@ | |||
| * @Author: Caven | |||
| * @Date: 2019-12-30 09:24:37 | |||
| * @Last Modified by: Caven | |||
| * @Last Modified time: 2020-02-29 20:15:49 | |||
| * @Last Modified time: 2020-03-03 12:25:35 | |||
| */ | |||
| import Cesium from '@/namespace' | |||
| @@ -30,6 +30,11 @@ class ViewerOption { | |||
| } | |||
| _setCanvasOption(options) { | |||
| options.tabIndex && | |||
| this._viewer.delegate.scene.canvas.setAttribute( | |||
| 'tabIndex', | |||
| options.tabIndex | |||
| ) | |||
| return this | |||
| } | |||
| @@ -2,7 +2,7 @@ | |||
| * @Author: Caven | |||
| * @Date: 2019-12-27 17:13:24 | |||
| * @Last Modified by: Caven | |||
| * @Last Modified time: 2020-03-02 21:43:30 | |||
| * @Last Modified time: 2020-03-03 23:43:35 | |||
| */ | |||
| import Cesium from '@/namespace' | |||
| @@ -115,6 +115,16 @@ DC.Viewer = class { | |||
| return this._tooltip | |||
| } | |||
| get cameraPosition() { | |||
| let position = DC.T.transformCartesianToWSG84(this.camera.positionWC) | |||
| if (position) { | |||
| position.heading = Cesium.Math.toDegrees(this.camera.heading) | |||
| position.pitch = Cesium.Math.toDegrees(this.camera.pitch) | |||
| position.roll = Cesium.Math.toDegrees(this.camera.roll) | |||
| } | |||
| return position | |||
| } | |||
| _addLayerCallback(layer) { | |||
| if (layer && layer.layerEvent && layer.state !== DC.LayerState.ADDED) { | |||
| !this._layerCache[layer.type] && (this._layerCache[layer.type] = {}) | |||
| @@ -2,7 +2,7 @@ | |||
| * @Author: Caven | |||
| * @Date: 2020-01-15 19:16:45 | |||
| * @Last Modified by: Caven | |||
| * @Last Modified time: 2020-03-02 15:30:04 | |||
| * @Last Modified time: 2020-03-03 22:05:07 | |||
| */ | |||
| import Widget from './Widget' | |||
| @@ -20,6 +20,9 @@ class Popup extends Widget { | |||
| } | |||
| _updateWindowCoord(windowCoord) { | |||
| if (!windowCoord) { | |||
| return | |||
| } | |||
| let x = windowCoord.x - this._wapper.offsetWidth / 2 | |||
| let y = windowCoord.y - this._wapper.offsetHeight | |||
| if (this._config && this._config.position === 'left') { | |||
| @@ -2,7 +2,7 @@ | |||
| * @Author: Caven | |||
| * @Date: 2020-02-13 20:19:54 | |||
| * @Last Modified by: Caven | |||
| * @Last Modified time: 2020-02-29 18:13:15 | |||
| * @Last Modified time: 2020-03-03 22:30:35 | |||
| */ | |||
| import Layer from '@/core/layer/Layer' | |||
| @@ -47,6 +47,7 @@ DC.MapvLayer = class extends Layer { | |||
| this._dataSet || new DC.MapvDataSet([]), | |||
| this._option | |||
| ) | |||
| viewer.delegate.scene.canvas.setAttribute('tabIndex', 0) | |||
| this._state = DC.LayerState.ADDED | |||
| } | |||
| @@ -2,7 +2,7 @@ | |||
| * @Author: Caven | |||
| * @Date: 2019-12-30 09:35:51 | |||
| * @Last Modified by: Caven | |||
| * @Last Modified time: 2020-02-29 01:12:48 | |||
| * @Last Modified time: 2020-03-03 00:03:23 | |||
| */ | |||
| import Cesium from '@/namespace' | |||
| @@ -10,8 +10,8 @@ DC.Cartesian2 = Cesium.Cartesian2 | |||
| DC.Cartesian3 = Cesium.Cartesian3 | |||
| DC.Cartesian4 = Cesium.Cartesian4 | |||
| DC.SceneMode = Cesium.SceneMode | |||
| DC.TilesetStyle = Cesium.Cesium3DTileStyle | |||
| DC.CallbackProperty = Cesium.CallbackProperty | |||
| DC.JulianDate = Cesium.JulianDate | |||
| DC.Math = Cesium.Math | |||