lyb-pixi-js 1.12.13 → 1.12.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Container } from "pixi.js";
|
|
11
11
|
import gsap from "gsap";
|
|
12
|
+
import { LibJsResizeWatcher } from "lyb-js/Base/LibJsResizeWatcher.js";
|
|
12
13
|
import { LibPixiRectBgColor } from "../../../Components/Base/LibPixiRectBgColor";
|
|
13
14
|
import { libPixiEvent } from "../../LibPixiEvent";
|
|
14
15
|
import { LibPixiBaseContainer } from "./LibPixiBaseContainer";
|
|
15
|
-
import { LibJsResizeWatcher } from "lyb-js/Base/LibJsResizeWatcher.js";
|
|
16
16
|
/** @description 弹窗组件 */
|
|
17
17
|
export class LibPixiDialog extends LibPixiBaseContainer {
|
|
18
18
|
constructor(params) {
|
|
@@ -47,6 +47,7 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
47
47
|
}
|
|
48
48
|
/** @description 设置弹窗内容 */
|
|
49
49
|
setDialogContent(content) {
|
|
50
|
+
var _a, _b;
|
|
50
51
|
this._dialogContainer.addChild(content);
|
|
51
52
|
const w = this._dialogContainer.width / 2;
|
|
52
53
|
const h = this._dialogContainer.height / 2;
|
|
@@ -61,8 +62,10 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
61
62
|
duration: LibPixiDialog.durationIn,
|
|
62
63
|
alpha: 1,
|
|
63
64
|
});
|
|
64
|
-
|
|
65
|
-
this.
|
|
65
|
+
//部分场景需要重复调用此方法来重新更新布局重新监听尺寸变化,所以需要判断一下
|
|
66
|
+
(_a = this._resize) !== null && _a !== void 0 ? _a : (this._resize = new LibJsResizeWatcher(LibPixiDialog.adaptation));
|
|
67
|
+
(_b = this._offResize) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
68
|
+
this._offResize = this._resize.on((w, h) => {
|
|
66
69
|
const halfW = 1920 / 2;
|
|
67
70
|
const halfH = 1080 / 2;
|
|
68
71
|
if (w > h) {
|