浏览代码

完善加载蒙层

tags/1.16.0
Caven Chen 4 年前
父节点
当前提交
b3eddedc76
共有 3 个文件被更改,包括 8 次插入5 次删除
  1. 1
    1
      src/core/widget/LoadingMask.js
  2. 4
    0
      src/core/widget/LocationBar.js
  3. 3
    4
      src/themes/loading-mask.scss

+ 1
- 1
src/core/widget/LoadingMask.js 查看文件

@@ -10,7 +10,7 @@ import Widget from './Widget'
class LoadingMask extends Widget {
constructor() {
super()
this._wrapper = DomUtil.create('div', 'dc-loading-container')
this._wrapper = DomUtil.create('div', 'dc-loading-mask')
this.type = Widget.getWidgetType('loading_mask')
this._state = State.INITIALIZED
}

+ 4
- 0
src/core/widget/LocationBar.js 查看文件

@@ -86,6 +86,10 @@ class LocationBar extends Widget {
<span>海拔:${alt.toFixed(2)} 米</span>`
}

/**
*
* @private
*/
_cameraHandler() {
let now = Cesium.getTimestamp()
if (now < this._lastUpdate + 300) {

+ 3
- 4
src/themes/loading-mask.scss 查看文件

@@ -1,10 +1,9 @@
.dc-loading-container {
width: 100%;
height: 100%;
.dc-loading-mask {
position: absolute;
z-index: 2;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;

正在加载...
取消
保存