lyb-pixi-js 1.12.10 → 1.12.12

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) {
@@ -11,8 +11,7 @@ export class LibPixiTicker {
11
11
  this._callbacks.set(id, { fn, active: true });
12
12
  Ticker.shared.add(fn);
13
13
  return () => {
14
- Ticker.shared.remove(fn);
15
- this._callbacks.delete(id);
14
+ LibPixiTicker.remove(id);
16
15
  };
17
16
  }
18
17
  /** @description 删除回调 */
package/lyb-pixi.js CHANGED
@@ -49352,6 +49352,7 @@ void main(void)\r
49352
49352
  this._scrollContent = scrollContent;
49353
49353
  this._scrollbarColor = scrollbarColor;
49354
49354
  this._onScroll = onScroll;
49355
+ this._showScrollbar = scrollbar;
49355
49356
  this._content = new Container();
49356
49357
  this.addChild(this._content);
49357
49358
  this._content.addChild(this._scrollContent);
@@ -49368,7 +49369,7 @@ void main(void)\r
49368
49369
  );
49369
49370
  this._scrollbar.x = width - (scrollbarRgiht || scrollbarWidth);
49370
49371
  this.addChild(this._scrollbar);
49371
- this._scrollbar.visible = scrollbar;
49372
+ this._scrollbar.visible = this._showScrollbar;
49372
49373
  this._scrollbar.alpha = 0;
49373
49374
  this._updateScrollbarSize();
49374
49375
  libPixiEvent(
@@ -49567,6 +49568,8 @@ void main(void)\r
49567
49568
  }
49568
49569
  /** @description 更新滚动条大小 */
49569
49570
  _updateScrollbarSize() {
49571
+ if (!this._showScrollbar)
49572
+ return;
49570
49573
  const viewHeight = this._maskGraphics.height;
49571
49574
  const contentHeight = this._content.height;
49572
49575
  if (contentHeight <= viewHeight) {
@@ -58341,7 +58344,7 @@ void main(void){
58341
58344
  this._elementList = [];
58342
58345
  }
58343
58346
  }
58344
- class LibPixiTicker {
58347
+ const _LibPixiTicker = class _LibPixiTicker2 {
58345
58348
  /** @description 添加回调,重复 ID 会覆盖 */
58346
58349
  static add(id2, fn) {
58347
58350
  if (this._callbacks.has(id2)) {
@@ -58350,8 +58353,7 @@ void main(void){
58350
58353
  this._callbacks.set(id2, { fn, active: true });
58351
58354
  Ticker.shared.add(fn);
58352
58355
  return () => {
58353
- Ticker.shared.remove(fn);
58354
- this._callbacks.delete(id2);
58356
+ _LibPixiTicker2.remove(id2);
58355
58357
  };
58356
58358
  }
58357
58359
  /** @description 删除回调 */
@@ -58385,8 +58387,9 @@ void main(void){
58385
58387
  });
58386
58388
  this._callbacks.clear();
58387
58389
  }
58388
- }
58389
- LibPixiTicker._callbacks = /* @__PURE__ */ new Map();
58390
+ };
58391
+ _LibPixiTicker._callbacks = /* @__PURE__ */ new Map();
58392
+ let LibPixiTicker = _LibPixiTicker;
58390
58393
  const Components = {
58391
58394
  Base: {
58392
58395
  /** (已废弃)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.12.10",
3
+ "version": "1.12.12",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {