lyb-pixi-js 1.12.11 → 1.12.13

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.
@@ -56,6 +56,8 @@ export declare class LibPixiScrollContainerY extends LibPixiContainer {
56
56
  private _scrollbar;
57
57
  /** 滚动条颜色 */
58
58
  private _scrollbarColor;
59
+ /** 是否显示滚动条 */
60
+ private _showScrollbar;
59
61
  /** 滚动触发 */
60
62
  private _onScroll?;
61
63
  constructor(params: LibPixiScrollContainerYParams);
@@ -31,6 +31,7 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
31
31
  this._scrollContent = scrollContent;
32
32
  this._scrollbarColor = scrollbarColor;
33
33
  this._onScroll = onScroll;
34
+ this._showScrollbar = scrollbar;
34
35
  // 创建内容容器
35
36
  this._content = new Container();
36
37
  this.addChild(this._content);
@@ -47,7 +48,7 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
47
48
  this._scrollbar = new LibPixiRectangle(scrollbarWidth, height, this._scrollbarColor);
48
49
  this._scrollbar.x = width - (scrollbarRgiht || scrollbarWidth);
49
50
  this.addChild(this._scrollbar);
50
- this._scrollbar.visible = scrollbar;
51
+ this._scrollbar.visible = this._showScrollbar;
51
52
  this._scrollbar.alpha = 0;
52
53
  this._updateScrollbarSize();
53
54
  //是否已经离开滚动条
@@ -259,6 +260,8 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
259
260
  }
260
261
  /** @description 更新滚动条大小 */
261
262
  _updateScrollbarSize() {
263
+ if (!this._showScrollbar)
264
+ return;
262
265
  const viewHeight = this._maskGraphics.height;
263
266
  const contentHeight = this._content.height;
264
267
  if (contentHeight <= viewHeight) {
@@ -25,8 +25,6 @@ export declare class LibPixiDialog extends LibPixiBaseContainer {
25
25
  private _size;
26
26
  /** 竖版初始大小 */
27
27
  private _initialSize;
28
- /** 是否处于关闭动画状态 */
29
- private _isCloseAnimating;
30
28
  /** 停止监听窗口 */
31
29
  private _offResize?;
32
30
  constructor(params?: Params);
@@ -19,8 +19,6 @@ export class LibPixiDialog extends LibPixiBaseContainer {
19
19
  super();
20
20
  /** 当前大小 */
21
21
  this._size = 1;
22
- /** 是否处于关闭动画状态 */
23
- this._isCloseAnimating = false;
24
22
  const { size = 1, onClickMask, needBg = true } = params || {};
25
23
  this._initialSize = size;
26
24
  //蒙版
@@ -36,10 +34,10 @@ export class LibPixiDialog extends LibPixiBaseContainer {
36
34
  if (onClickMask) {
37
35
  libPixiEvent(this._maskUI, "pointertap", () => {
38
36
  var _a;
39
- if (this._isCloseAnimating)
40
- return;
41
37
  onClickMask === null || onClickMask === void 0 ? void 0 : onClickMask();
42
38
  (_a = this._offResize) === null || _a === void 0 ? void 0 : _a.call(this);
39
+ }, {
40
+ once: true,
43
41
  });
44
42
  }
45
43
  //弹窗内容容器
@@ -97,10 +95,7 @@ export class LibPixiDialog extends LibPixiBaseContainer {
97
95
  close() {
98
96
  return __awaiter(this, void 0, void 0, function* () {
99
97
  var _a;
100
- if (this._isCloseAnimating)
101
- return;
102
98
  (_a = this._offResize) === null || _a === void 0 ? void 0 : _a.call(this);
103
- this._isCloseAnimating = true;
104
99
  gsap.to(this._dialogContainer.scale, {
105
100
  duration: LibPixiDialog.durationOut,
106
101
  ease: "back.in",
package/lyb-pixi.js CHANGED
@@ -49376,6 +49376,7 @@ void main(void)\r
49376
49376
  this._scrollContent = scrollContent;
49377
49377
  this._scrollbarColor = scrollbarColor;
49378
49378
  this._onScroll = onScroll;
49379
+ this._showScrollbar = scrollbar;
49379
49380
  this._content = new Container();
49380
49381
  this.addChild(this._content);
49381
49382
  this._content.addChild(this._scrollContent);
@@ -49392,7 +49393,7 @@ void main(void)\r
49392
49393
  );
49393
49394
  this._scrollbar.x = width - (scrollbarRgiht || scrollbarWidth);
49394
49395
  this.addChild(this._scrollbar);
49395
- this._scrollbar.visible = scrollbar;
49396
+ this._scrollbar.visible = this._showScrollbar;
49396
49397
  this._scrollbar.alpha = 0;
49397
49398
  this._updateScrollbarSize();
49398
49399
  libPixiEvent(
@@ -49591,6 +49592,8 @@ void main(void)\r
49591
49592
  }
49592
49593
  /** @description 更新滚动条大小 */
49593
49594
  _updateScrollbarSize() {
49595
+ if (!this._showScrollbar)
49596
+ return;
49594
49597
  const viewHeight = this._maskGraphics.height;
49595
49598
  const contentHeight = this._content.height;
49596
49599
  if (contentHeight <= viewHeight) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.12.11",
3
+ "version": "1.12.13",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {