lyb-pixi-js 1.12.86 → 1.12.88

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.
@@ -73,7 +73,7 @@ export class LibPixiScrollContainerX extends LibPixiContainer {
73
73
  if (rightMargin) {
74
74
  this._rightMarginBox = new Sprite();
75
75
  this._content.addChild(this._rightMarginBox);
76
- this._rightMarginBox.height = rightMargin;
76
+ this._rightMarginBox.width = rightMargin;
77
77
  this._rightMarginBox.x = leftMargin + this._scrollContent.width;
78
78
  }
79
79
  }
@@ -2,6 +2,8 @@ import { Container, type ITextStyle } from "pixi.js";
2
2
  interface TextItem {
3
3
  text: string | number;
4
4
  style?: Partial<ITextStyle>;
5
+ anchorX?: number;
6
+ anchorY?: number;
5
7
  }
6
8
  interface TextGroupOptions {
7
9
  items: TextItem[];
@@ -10,8 +10,9 @@ export class LibPixiTextGroupWrap extends Container {
10
10
  let currentLine = [];
11
11
  let x = 0;
12
12
  // 分行
13
- for (const { text, style = {} } of items) {
13
+ for (const { text, anchorX, anchorY, style = {} } of items) {
14
14
  const instance = new Text(text, Object.assign(Object.assign({}, defaultStyle), style));
15
+ instance.anchor.set(anchorX, anchorY);
15
16
  const w = instance.width;
16
17
  if (wordWrapWidth && x + w > wordWrapWidth && x > 0) {
17
18
  lineGroups.push(currentLine);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.12.86",
3
+ "version": "1.12.88",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {
File without changes