lyb-pixi-js 1.12.24 → 1.12.25
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.
|
@@ -31,7 +31,7 @@ export declare class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
31
31
|
/** @description 设置弹窗内容 */
|
|
32
32
|
setDialogContent(content: Container): void;
|
|
33
33
|
/** @description 重绘弹窗 */
|
|
34
|
-
redraw(w
|
|
34
|
+
redraw(w: number, h: number): void;
|
|
35
35
|
/** @description 关闭 */
|
|
36
36
|
close(): Promise<void>;
|
|
37
37
|
}
|
|
@@ -46,7 +46,16 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
46
46
|
/** @description 设置弹窗内容 */
|
|
47
47
|
setDialogContent(content) {
|
|
48
48
|
this._dialogContainer.addChild(content);
|
|
49
|
-
|
|
49
|
+
console.log(LibPixiDialog.adaptation);
|
|
50
|
+
if (LibPixiDialog.adaptation === "h") {
|
|
51
|
+
this.redraw(1920, 1080);
|
|
52
|
+
}
|
|
53
|
+
else if (LibPixiDialog.adaptation === "v") {
|
|
54
|
+
this.redraw(1080, 1920);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.redraw(window.innerWidth, window.innerHeight);
|
|
58
|
+
}
|
|
50
59
|
this._dialogContainer.scale.set(0);
|
|
51
60
|
this._dialogContainer.alpha = 0;
|
|
52
61
|
gsap.to(this._maskUI, {
|
|
@@ -59,7 +68,8 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
59
68
|
});
|
|
60
69
|
}
|
|
61
70
|
/** @description 重绘弹窗 */
|
|
62
|
-
redraw(w
|
|
71
|
+
redraw(w, h) {
|
|
72
|
+
console.log(w, h);
|
|
63
73
|
const dialogW = this._dialogContainer.width / 2;
|
|
64
74
|
const dialogH = this._dialogContainer.height / 2;
|
|
65
75
|
this._dialogContainer.pivot.set(dialogW, dialogH);
|
|
@@ -122,4 +132,4 @@ LibPixiDialog.bgAlpha = 0.5;
|
|
|
122
132
|
LibPixiDialog.durationIn = 0.5;
|
|
123
133
|
LibPixiDialog.durationOut = 0.5;
|
|
124
134
|
/** 是否支持横竖版 */
|
|
125
|
-
LibPixiDialog.adaptation = "
|
|
135
|
+
LibPixiDialog.adaptation = "h";
|