lyb-pixi-js 1.12.14 → 1.12.16
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.
- package/Components/Custom/LibPixiScrollContainerY.d.ts +4 -0
- package/Components/Custom/LibPixiScrollContainerY.js +16 -5
- package/Utils/LibPixiDialogManager/ui/LibPixiDialog.d.ts +2 -2
- package/Utils/LibPixiDialogManager/ui/LibPixiDialog.js +32 -35
- package/lyb-pixi.js +101 -114
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@ export interface LibPixiScrollContainerYParams {
|
|
|
7
7
|
height: number;
|
|
8
8
|
/** 滚动内容 */
|
|
9
9
|
scrollContent: Container;
|
|
10
|
+
/** 顶部边距 */
|
|
11
|
+
topMargin?: number;
|
|
10
12
|
/** 底部边距 */
|
|
11
13
|
bottomMargin?: number;
|
|
12
14
|
/** 背景色,用于定位 */
|
|
@@ -61,6 +63,8 @@ export declare class LibPixiScrollContainerY extends LibPixiContainer {
|
|
|
61
63
|
/** 滚动触发 */
|
|
62
64
|
private _onScroll?;
|
|
63
65
|
constructor(params: LibPixiScrollContainerYParams);
|
|
66
|
+
/** @description 添加边距 */
|
|
67
|
+
addMargin(topMargin: number, bottomMargin: number): void;
|
|
64
68
|
/** @description 设置滚动容器可视区宽高
|
|
65
69
|
* @param width 宽度
|
|
66
70
|
* @param height 高度
|
|
@@ -8,7 +8,7 @@ import { LibPixiRectangle } from "../Base/LibPixiRectangle";
|
|
|
8
8
|
*/
|
|
9
9
|
export class LibPixiScrollContainerY extends LibPixiContainer {
|
|
10
10
|
constructor(params) {
|
|
11
|
-
const { width, height, scrollbar = false, scrollContent, scrollbarRgiht = 0, scrollbarWidth = 10, scrollbarColor = "#ffffff", onScroll, bgColor,
|
|
11
|
+
const { width, height, scrollbar = false, scrollContent, scrollbarRgiht = 0, scrollbarWidth = 10, scrollbarColor = "#ffffff", onScroll, bgColor, } = params;
|
|
12
12
|
super(width, height, bgColor);
|
|
13
13
|
/** 开始位置 */
|
|
14
14
|
this._startY = 0;
|
|
@@ -36,10 +36,6 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
|
|
|
36
36
|
this._content = new Container();
|
|
37
37
|
this.addChild(this._content);
|
|
38
38
|
this._content.addChild(this._scrollContent);
|
|
39
|
-
//创建底部边距
|
|
40
|
-
const bottomMarginBox = new Sprite();
|
|
41
|
-
this._content.addChild(bottomMarginBox);
|
|
42
|
-
bottomMarginBox.height = this._content.height + bottomMargin;
|
|
43
39
|
// 创建遮罩
|
|
44
40
|
this._maskGraphics = new LibPixiRectangle(width, height, "#000");
|
|
45
41
|
this.addChild(this._maskGraphics);
|
|
@@ -88,6 +84,21 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
|
|
|
88
84
|
this._onDragEnd();
|
|
89
85
|
});
|
|
90
86
|
}
|
|
87
|
+
/** @description 添加边距 */
|
|
88
|
+
addMargin(topMargin, bottomMargin) {
|
|
89
|
+
if (topMargin) {
|
|
90
|
+
const topMarginBox = new Sprite();
|
|
91
|
+
this._content.addChild(topMarginBox);
|
|
92
|
+
topMarginBox.height = topMargin;
|
|
93
|
+
this._scrollContent.y += topMargin;
|
|
94
|
+
}
|
|
95
|
+
if (bottomMargin) {
|
|
96
|
+
const bottomMarginBox = new Sprite();
|
|
97
|
+
this._content.addChild(bottomMarginBox);
|
|
98
|
+
bottomMarginBox.height = bottomMargin;
|
|
99
|
+
bottomMarginBox.y = topMargin + this._scrollContent.height;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
91
102
|
/** @description 设置滚动容器可视区宽高
|
|
92
103
|
* @param width 宽度
|
|
93
104
|
* @param height 高度
|
|
@@ -25,13 +25,13 @@ export declare class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
25
25
|
private _size;
|
|
26
26
|
/** 竖版初始大小 */
|
|
27
27
|
private _initialSize;
|
|
28
|
-
/** 窗口变化 */
|
|
29
|
-
private _resize?;
|
|
30
28
|
/** 停止监听窗口 */
|
|
31
29
|
private _offResize?;
|
|
32
30
|
constructor(params?: Params);
|
|
33
31
|
/** @description 设置弹窗内容 */
|
|
34
32
|
setDialogContent(content: Container): void;
|
|
33
|
+
/** @description 重绘弹窗 */
|
|
34
|
+
redraw(w: number, h: number): void;
|
|
35
35
|
/** @description 关闭 */
|
|
36
36
|
close(): Promise<void>;
|
|
37
37
|
}
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Container } from "pixi.js";
|
|
11
11
|
import gsap from "gsap";
|
|
12
12
|
import { LibJsResizeWatcher } from "lyb-js/Base/LibJsResizeWatcher.js";
|
|
13
|
-
import {
|
|
13
|
+
import { LibPixiRectangle } from "../../../Components/Base/LibPixiRectangle";
|
|
14
14
|
import { libPixiEvent } from "../../LibPixiEvent";
|
|
15
15
|
import { LibPixiBaseContainer } from "./LibPixiBaseContainer";
|
|
16
16
|
/** @description 弹窗组件 */
|
|
@@ -22,11 +22,7 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
22
22
|
const { size = 1, onClickMask, needBg = true } = params || {};
|
|
23
23
|
this._initialSize = size;
|
|
24
24
|
//蒙版
|
|
25
|
-
this._maskUI = new
|
|
26
|
-
width: 2700,
|
|
27
|
-
height: 1080,
|
|
28
|
-
bgColor: "#000",
|
|
29
|
-
});
|
|
25
|
+
this._maskUI = new LibPixiRectangle(2700, 1080, "#000");
|
|
30
26
|
this.addChild(this._maskUI);
|
|
31
27
|
this._maskUI.alpha = 0;
|
|
32
28
|
this._maskUI.eventMode = "static";
|
|
@@ -44,10 +40,11 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
44
40
|
this._dialogContainer = new Container();
|
|
45
41
|
this.addChild(this._dialogContainer);
|
|
46
42
|
this._dialogContainer.eventMode = "static";
|
|
43
|
+
const resize = new LibJsResizeWatcher(LibPixiDialog.adaptation);
|
|
44
|
+
this._offResize = resize.on(this.redraw.bind(this));
|
|
47
45
|
}
|
|
48
46
|
/** @description 设置弹窗内容 */
|
|
49
47
|
setDialogContent(content) {
|
|
50
|
-
var _a, _b;
|
|
51
48
|
this._dialogContainer.addChild(content);
|
|
52
49
|
const w = this._dialogContainer.width / 2;
|
|
53
50
|
const h = this._dialogContainer.height / 2;
|
|
@@ -62,36 +59,36 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
62
59
|
duration: LibPixiDialog.durationIn,
|
|
63
60
|
alpha: 1,
|
|
64
61
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
62
|
+
}
|
|
63
|
+
/** @description 重绘弹窗 */
|
|
64
|
+
redraw(w, h) {
|
|
65
|
+
const halfW = 1920 / 2;
|
|
66
|
+
const halfH = 1080 / 2;
|
|
67
|
+
if (w > h) {
|
|
68
|
+
this._maskUI.width = 2700;
|
|
69
|
+
this._maskUI.height = 1080;
|
|
70
|
+
this._maskUI.x = -(2700 - 1920) / 2;
|
|
71
|
+
this._dialogContainer.position.set(halfW, halfH);
|
|
72
|
+
this._size = 1;
|
|
73
|
+
if (this._dialogContainer.scale.x === this._initialSize) {
|
|
74
|
+
this._dialogContainer.scale.set(1);
|
|
79
75
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this._maskUI.width = 1080;
|
|
79
|
+
this._maskUI.height = 2700;
|
|
80
|
+
this._maskUI.x = 0;
|
|
81
|
+
this._dialogContainer.position.set(halfH, halfW);
|
|
82
|
+
this._size = this._initialSize;
|
|
83
|
+
if (this._dialogContainer.scale.x === 1) {
|
|
84
|
+
this._dialogContainer.scale.set(this._initialSize);
|
|
88
85
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
}
|
|
87
|
+
gsap.to(this._dialogContainer.scale, {
|
|
88
|
+
duration: LibPixiDialog.durationIn,
|
|
89
|
+
ease: "back.out",
|
|
90
|
+
x: this._size,
|
|
91
|
+
y: this._size,
|
|
95
92
|
});
|
|
96
93
|
}
|
|
97
94
|
/** @description 关闭 */
|
package/lyb-pixi.js
CHANGED
|
@@ -1315,7 +1315,7 @@
|
|
|
1315
1315
|
var ys = arrObjKeys(obj, inspect2);
|
|
1316
1316
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
1317
1317
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
1318
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
1318
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
|
|
1319
1319
|
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
1320
1320
|
var tag2 = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
1321
1321
|
if (ys.length === 0) {
|
|
@@ -1337,25 +1337,25 @@
|
|
|
1337
1337
|
return $replace$1.call(String(s2), /"/g, """);
|
|
1338
1338
|
}
|
|
1339
1339
|
function isArray$3(obj) {
|
|
1340
|
-
return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1340
|
+
return toStr$1(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1341
1341
|
}
|
|
1342
1342
|
function isDate(obj) {
|
|
1343
|
-
return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1343
|
+
return toStr$1(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1344
1344
|
}
|
|
1345
1345
|
function isRegExp$1(obj) {
|
|
1346
|
-
return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1346
|
+
return toStr$1(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1347
1347
|
}
|
|
1348
1348
|
function isError(obj) {
|
|
1349
|
-
return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1349
|
+
return toStr$1(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1350
1350
|
}
|
|
1351
1351
|
function isString(obj) {
|
|
1352
|
-
return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1352
|
+
return toStr$1(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1353
1353
|
}
|
|
1354
1354
|
function isNumber(obj) {
|
|
1355
|
-
return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1355
|
+
return toStr$1(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1356
1356
|
}
|
|
1357
1357
|
function isBoolean(obj) {
|
|
1358
|
-
return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1358
|
+
return toStr$1(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1359
1359
|
}
|
|
1360
1360
|
function isSymbol(obj) {
|
|
1361
1361
|
if (hasShammedSymbols) {
|
|
@@ -1391,7 +1391,7 @@
|
|
|
1391
1391
|
function has$3(obj, key) {
|
|
1392
1392
|
return hasOwn$1.call(obj, key);
|
|
1393
1393
|
}
|
|
1394
|
-
function toStr(obj) {
|
|
1394
|
+
function toStr$1(obj) {
|
|
1395
1395
|
return objectToString.call(obj);
|
|
1396
1396
|
}
|
|
1397
1397
|
function nameOf(f2) {
|
|
@@ -1700,7 +1700,7 @@
|
|
|
1700
1700
|
var uri = URIError;
|
|
1701
1701
|
var abs$2 = Math.abs;
|
|
1702
1702
|
var floor$2 = Math.floor;
|
|
1703
|
-
var max$
|
|
1703
|
+
var max$3 = Math.max;
|
|
1704
1704
|
var min$2 = Math.min;
|
|
1705
1705
|
var pow$2 = Math.pow;
|
|
1706
1706
|
var round$3 = Math.round;
|
|
@@ -1833,102 +1833,78 @@
|
|
|
1833
1833
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
1834
1834
|
return Object_getPrototypeOf;
|
|
1835
1835
|
}
|
|
1836
|
-
var
|
|
1837
|
-
var
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
var
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
var
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
var joiny = function(arr, joiner) {
|
|
1864
|
-
var str = "";
|
|
1865
|
-
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
1866
|
-
str += arr[i2];
|
|
1867
|
-
if (i2 + 1 < arr.length) {
|
|
1868
|
-
str += joiner;
|
|
1869
|
-
}
|
|
1836
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
1837
|
+
var toStr = Object.prototype.toString;
|
|
1838
|
+
var max$2 = Math.max;
|
|
1839
|
+
var funcType = "[object Function]";
|
|
1840
|
+
var concatty = function concatty2(a2, b2) {
|
|
1841
|
+
var arr = [];
|
|
1842
|
+
for (var i2 = 0; i2 < a2.length; i2 += 1) {
|
|
1843
|
+
arr[i2] = a2[i2];
|
|
1844
|
+
}
|
|
1845
|
+
for (var j2 = 0; j2 < b2.length; j2 += 1) {
|
|
1846
|
+
arr[j2 + a2.length] = b2[j2];
|
|
1847
|
+
}
|
|
1848
|
+
return arr;
|
|
1849
|
+
};
|
|
1850
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
1851
|
+
var arr = [];
|
|
1852
|
+
for (var i2 = offset || 0, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
|
|
1853
|
+
arr[j2] = arrLike[i2];
|
|
1854
|
+
}
|
|
1855
|
+
return arr;
|
|
1856
|
+
};
|
|
1857
|
+
var joiny = function(arr, joiner) {
|
|
1858
|
+
var str = "";
|
|
1859
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
1860
|
+
str += arr[i2];
|
|
1861
|
+
if (i2 + 1 < arr.length) {
|
|
1862
|
+
str += joiner;
|
|
1870
1863
|
}
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
);
|
|
1886
|
-
if (Object(result) === result) {
|
|
1887
|
-
return result;
|
|
1888
|
-
}
|
|
1889
|
-
return this;
|
|
1890
|
-
}
|
|
1891
|
-
return target.apply(
|
|
1892
|
-
that,
|
|
1864
|
+
}
|
|
1865
|
+
return str;
|
|
1866
|
+
};
|
|
1867
|
+
var implementation$1 = function bind2(that) {
|
|
1868
|
+
var target = this;
|
|
1869
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
1870
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1871
|
+
}
|
|
1872
|
+
var args = slicy(arguments, 1);
|
|
1873
|
+
var bound;
|
|
1874
|
+
var binder = function() {
|
|
1875
|
+
if (this instanceof bound) {
|
|
1876
|
+
var result = target.apply(
|
|
1877
|
+
this,
|
|
1893
1878
|
concatty(args, arguments)
|
|
1894
1879
|
);
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
boundArgs[i2] = "$" + i2;
|
|
1900
|
-
}
|
|
1901
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
1902
|
-
if (target.prototype) {
|
|
1903
|
-
var Empty = function Empty2() {
|
|
1904
|
-
};
|
|
1905
|
-
Empty.prototype = target.prototype;
|
|
1906
|
-
bound.prototype = new Empty();
|
|
1907
|
-
Empty.prototype = null;
|
|
1880
|
+
if (Object(result) === result) {
|
|
1881
|
+
return result;
|
|
1882
|
+
}
|
|
1883
|
+
return this;
|
|
1908
1884
|
}
|
|
1909
|
-
return
|
|
1885
|
+
return target.apply(
|
|
1886
|
+
that,
|
|
1887
|
+
concatty(args, arguments)
|
|
1888
|
+
);
|
|
1910
1889
|
};
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
functionCall = Function.prototype.call;
|
|
1930
|
-
return functionCall;
|
|
1931
|
-
}
|
|
1890
|
+
var boundLength = max$2(0, target.length - args.length);
|
|
1891
|
+
var boundArgs = [];
|
|
1892
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
1893
|
+
boundArgs[i2] = "$" + i2;
|
|
1894
|
+
}
|
|
1895
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
1896
|
+
if (target.prototype) {
|
|
1897
|
+
var Empty = function Empty2() {
|
|
1898
|
+
};
|
|
1899
|
+
Empty.prototype = target.prototype;
|
|
1900
|
+
bound.prototype = new Empty();
|
|
1901
|
+
Empty.prototype = null;
|
|
1902
|
+
}
|
|
1903
|
+
return bound;
|
|
1904
|
+
};
|
|
1905
|
+
var implementation = implementation$1;
|
|
1906
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
1907
|
+
var functionCall = Function.prototype.call;
|
|
1932
1908
|
var functionApply;
|
|
1933
1909
|
var hasRequiredFunctionApply;
|
|
1934
1910
|
function requireFunctionApply() {
|
|
@@ -1939,14 +1915,14 @@
|
|
|
1939
1915
|
return functionApply;
|
|
1940
1916
|
}
|
|
1941
1917
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1942
|
-
var bind$2 =
|
|
1918
|
+
var bind$2 = functionBind;
|
|
1943
1919
|
var $apply$1 = requireFunctionApply();
|
|
1944
|
-
var $call$2 =
|
|
1920
|
+
var $call$2 = functionCall;
|
|
1945
1921
|
var $reflectApply = reflectApply;
|
|
1946
1922
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
1947
|
-
var bind$1 =
|
|
1923
|
+
var bind$1 = functionBind;
|
|
1948
1924
|
var $TypeError$4 = type;
|
|
1949
|
-
var $call$1 =
|
|
1925
|
+
var $call$1 = functionCall;
|
|
1950
1926
|
var $actualApply = actualApply;
|
|
1951
1927
|
var callBindApplyHelpers = function callBindBasic2(args) {
|
|
1952
1928
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -2015,7 +1991,7 @@
|
|
|
2015
1991
|
hasRequiredHasown = 1;
|
|
2016
1992
|
var call = Function.prototype.call;
|
|
2017
1993
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
2018
|
-
var bind2 =
|
|
1994
|
+
var bind2 = functionBind;
|
|
2019
1995
|
hasown = bind2.call(call, $hasOwn);
|
|
2020
1996
|
return hasown;
|
|
2021
1997
|
}
|
|
@@ -2030,7 +2006,7 @@
|
|
|
2030
2006
|
var $URIError = uri;
|
|
2031
2007
|
var abs$1 = abs$2;
|
|
2032
2008
|
var floor$1 = floor$2;
|
|
2033
|
-
var max$1 = max$
|
|
2009
|
+
var max$1 = max$3;
|
|
2034
2010
|
var min$1 = min$2;
|
|
2035
2011
|
var pow$1 = pow$2;
|
|
2036
2012
|
var round$2 = round$3;
|
|
@@ -2064,7 +2040,7 @@
|
|
|
2064
2040
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
2065
2041
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
2066
2042
|
var $apply = requireFunctionApply();
|
|
2067
|
-
var $call =
|
|
2043
|
+
var $call = functionCall;
|
|
2068
2044
|
var needsEval = {};
|
|
2069
2045
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
2070
2046
|
var INTRINSICS = {
|
|
@@ -2234,7 +2210,7 @@
|
|
|
2234
2210
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2235
2211
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2236
2212
|
};
|
|
2237
|
-
var bind =
|
|
2213
|
+
var bind = functionBind;
|
|
2238
2214
|
var hasOwn = requireHasown();
|
|
2239
2215
|
var $concat = bind.call($call, Array.prototype.concat);
|
|
2240
2216
|
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
@@ -49359,8 +49335,7 @@ void main(void)\r
|
|
|
49359
49335
|
scrollbarWidth = 10,
|
|
49360
49336
|
scrollbarColor = "#ffffff",
|
|
49361
49337
|
onScroll,
|
|
49362
|
-
bgColor
|
|
49363
|
-
bottomMargin = 0
|
|
49338
|
+
bgColor
|
|
49364
49339
|
} = params;
|
|
49365
49340
|
super(width, height, bgColor);
|
|
49366
49341
|
this._startY = 0;
|
|
@@ -49380,9 +49355,6 @@ void main(void)\r
|
|
|
49380
49355
|
this._content = new Container();
|
|
49381
49356
|
this.addChild(this._content);
|
|
49382
49357
|
this._content.addChild(this._scrollContent);
|
|
49383
|
-
const bottomMarginBox = new Sprite();
|
|
49384
|
-
this._content.addChild(bottomMarginBox);
|
|
49385
|
-
bottomMarginBox.height = this._content.height + bottomMargin;
|
|
49386
49358
|
this._maskGraphics = new LibPixiRectangle(width, height, "#000");
|
|
49387
49359
|
this.addChild(this._maskGraphics);
|
|
49388
49360
|
this.mask = this._maskGraphics;
|
|
@@ -49435,6 +49407,21 @@ void main(void)\r
|
|
|
49435
49407
|
this._onDragEnd();
|
|
49436
49408
|
});
|
|
49437
49409
|
}
|
|
49410
|
+
/** @description 添加边距 */
|
|
49411
|
+
addMargin(topMargin, bottomMargin) {
|
|
49412
|
+
if (topMargin) {
|
|
49413
|
+
const topMarginBox = new Sprite();
|
|
49414
|
+
this._content.addChild(topMarginBox);
|
|
49415
|
+
topMarginBox.height = topMargin;
|
|
49416
|
+
this._scrollContent.y += topMargin;
|
|
49417
|
+
}
|
|
49418
|
+
if (bottomMargin) {
|
|
49419
|
+
const bottomMarginBox = new Sprite();
|
|
49420
|
+
this._content.addChild(bottomMarginBox);
|
|
49421
|
+
bottomMarginBox.height = bottomMargin;
|
|
49422
|
+
bottomMarginBox.y = topMargin + this._scrollContent.height;
|
|
49423
|
+
}
|
|
49424
|
+
}
|
|
49438
49425
|
/** @description 设置滚动容器可视区宽高
|
|
49439
49426
|
* @param width 宽度
|
|
49440
49427
|
* @param height 高度
|