소스 검색

添加修改popup

tags/1.0.0
Caven 5 년 전
부모
커밋
8c6fb168d5
2개의 변경된 파일6개의 추가작업 그리고 11개의 파일을 삭제
  1. 2
    2
      src/core/terrain/DC.TerrainFactory.js
  2. 4
    9
      src/core/widget/Popup.js

+ 2
- 2
src/core/terrain/DC.TerrainFactory.js 파일 보기

@@ -2,7 +2,7 @@
* @Author: Caven
* @Date: 2020-01-21 15:54:56
* @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:41:35
* @Last Modified time: 2020-03-02 15:30:47
*/
import Cesium from '@/namespace'

@@ -22,7 +22,7 @@ DC.TerrainFactory = class {
}

/**
* create coord terrain
* create google terrain
*/
static createGoogleTerrain(options) {
return new Cesium.GoogleEarthEnterpriseTerrainProvider(options)

+ 4
- 9
src/core/widget/Popup.js 파일 보기

@@ -2,7 +2,7 @@
* @Author: Caven
* @Date: 2020-01-15 19:16:45
* @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:34:21
* @Last Modified time: 2020-03-02 15:30:04
*/

import Widget from './Widget'
@@ -11,7 +11,6 @@ class Popup extends Widget {
constructor() {
super()
this._wapper = DC.DomUtil.create('div', 'dc-popup')
this._contentEl = DC.DomUtil.create('div', 'popup-content', this._wapper)
this._config = undefined
this.type = DC.WidgetType.POPUP
}
@@ -28,8 +27,6 @@ class Popup extends Widget {
} else if (this._config && this._config.position === 'right') {
x = windowCoord.x
}
if (this._config && this._config.arrow) {
}
this._wapper.style.cssText = `
visibility:visible;
z-index:1;
@@ -37,17 +34,15 @@ class Popup extends Widget {
`
}

_setCustomClass() {}
_setCustomBg() {}
_setCustomClass() {
DC.DomUtil.setClass(this._wapper, `dc-popup ${this._config.customClass}`)
}

_setArrowStyle() {}

set config(config) {
this._config = config
config.customClass && this._setCustomClass()
config.customBg && this._setCustomBg()
config.arrow && this._setArrowStyle()
}
}


Loading…
취소
저장