lyb-pixi-js 1.12.7 → 1.12.9
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.
|
@@ -261,6 +261,12 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
|
|
|
261
261
|
_updateScrollbarSize() {
|
|
262
262
|
const viewHeight = this._maskGraphics.height;
|
|
263
263
|
const contentHeight = this._content.height;
|
|
264
|
+
if (contentHeight <= viewHeight) {
|
|
265
|
+
this._scrollbar.visible = false;
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
this._scrollbar.visible = true;
|
|
269
|
+
}
|
|
264
270
|
const ratio = viewHeight / contentHeight;
|
|
265
271
|
const barHeight = viewHeight * ratio;
|
|
266
272
|
this._scrollbar.clear();
|
|
@@ -15,7 +15,7 @@ export class LibPixiGridLayoutV2 extends Container {
|
|
|
15
15
|
}
|
|
16
16
|
/** @description 布局 */
|
|
17
17
|
layout() {
|
|
18
|
-
const { colNum = this._elementList.length, colGap = 325, rowGap = 75 } = this._params;
|
|
18
|
+
const { colNum = this._elementList.length, colGap = 325, rowGap = 75, } = this._params;
|
|
19
19
|
this._elementList.forEach((item, index) => {
|
|
20
20
|
const col = index % colNum;
|
|
21
21
|
const row = Math.floor(index / colNum);
|
|
@@ -27,4 +27,11 @@ export class LibPixiGridLayoutV2 extends Container {
|
|
|
27
27
|
getList() {
|
|
28
28
|
return this._elementList;
|
|
29
29
|
}
|
|
30
|
+
/** @description 销毁列表元素 */
|
|
31
|
+
destroyList() {
|
|
32
|
+
this._elementList.forEach((item) => {
|
|
33
|
+
item.destroy();
|
|
34
|
+
});
|
|
35
|
+
this._elementList = [];
|
|
36
|
+
}
|
|
30
37
|
}
|
package/lyb-pixi.js
CHANGED
|
@@ -49593,6 +49593,11 @@ void main(void)\r
|
|
|
49593
49593
|
_updateScrollbarSize() {
|
|
49594
49594
|
const viewHeight = this._maskGraphics.height;
|
|
49595
49595
|
const contentHeight = this._content.height;
|
|
49596
|
+
if (contentHeight <= viewHeight) {
|
|
49597
|
+
this._scrollbar.visible = false;
|
|
49598
|
+
} else {
|
|
49599
|
+
this._scrollbar.visible = true;
|
|
49600
|
+
}
|
|
49596
49601
|
const ratio = viewHeight / contentHeight;
|
|
49597
49602
|
const barHeight = viewHeight * ratio;
|
|
49598
49603
|
this._scrollbar.clear();
|
|
@@ -58336,7 +58341,11 @@ void main(void){
|
|
|
58336
58341
|
}
|
|
58337
58342
|
/** @description 布局 */
|
|
58338
58343
|
layout() {
|
|
58339
|
-
const {
|
|
58344
|
+
const {
|
|
58345
|
+
colNum = this._elementList.length,
|
|
58346
|
+
colGap = 325,
|
|
58347
|
+
rowGap = 75
|
|
58348
|
+
} = this._params;
|
|
58340
58349
|
this._elementList.forEach((item, index) => {
|
|
58341
58350
|
const col = index % colNum;
|
|
58342
58351
|
const row = Math.floor(index / colNum);
|
|
@@ -58348,6 +58357,13 @@ void main(void){
|
|
|
58348
58357
|
getList() {
|
|
58349
58358
|
return this._elementList;
|
|
58350
58359
|
}
|
|
58360
|
+
/** @description 销毁列表元素 */
|
|
58361
|
+
destroyList() {
|
|
58362
|
+
this._elementList.forEach((item) => {
|
|
58363
|
+
item.destroy();
|
|
58364
|
+
});
|
|
58365
|
+
this._elementList = [];
|
|
58366
|
+
}
|
|
58351
58367
|
}
|
|
58352
58368
|
const Components = {
|
|
58353
58369
|
Base: {
|