ソースを参照

improve the pupup config

tags/2.6.1
Caven Chen 4年前
コミット
343cd019ae
1個のファイルの変更12行の追加2行の削除
  1. 12
    2
      modules/widget/type/Popup.js

+ 12
- 2
modules/widget/type/Popup.js ファイルの表示

@@ -80,11 +80,21 @@ class Popup extends Widget {
_updateWindowCoord(windowCoord) {
let x = windowCoord.x - this._wrapper.offsetWidth / 2
let y = windowCoord.y - this._wrapper.offsetHeight
if (this._config && this._config.position === 'left') {

if (this._config.position === 'topleft') {
x = windowCoord.x
y = windowCoord.y
} else if (this._config.position === 'topright') {
x = windowCoord.x - this._wrapper.offsetWidth
} else if (this._config && this._config.position === 'right') {
y = windowCoord.y
} else if (this._config.position === 'bottomleft') {
x = windowCoord.x
y = windowCoord.y - this._wrapper.offsetHeight
} else if (this._config.position === 'bottomright') {
x = windowCoord.x - this._wrapper.offsetWidth
y = windowCoord.y - this._wrapper.offsetHeight
}

this._wrapper.style.cssText = `
visibility:visible;
z-index:1;

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