瀏覽代碼

完善加载蒙层

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 查看文件

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

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

<span>海拔:${alt.toFixed(2)} 米</span>` <span>海拔:${alt.toFixed(2)} 米</span>`
} }


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

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

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

Loading…
取消
儲存