lyb-pixi-js 1.12.48 → 1.12.49

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.
@@ -77,7 +77,7 @@ export declare class LibPixiScrollContainerY extends LibPixiContainer {
77
77
  */
78
78
  setDimensions(width: number, height: number): void;
79
79
  /** @description 返回顶部 */
80
- scrollToTop(): void;
80
+ scrollToTop(animate?: boolean): void;
81
81
  /** @description 往滚动内容添加元素 */
82
82
  addContent(container: Container): void;
83
83
  /** @description 更新右边距坐标 */
@@ -120,9 +120,14 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
120
120
  this._updateBottomMargin();
121
121
  }
122
122
  /** @description 返回顶部 */
123
- scrollToTop() {
123
+ scrollToTop(animate = false) {
124
124
  gsap.killTweensOf(this._content);
125
- this._content.y = 0;
125
+ if (animate) {
126
+ gsap.to(this._content, { y: 0, duration: 0.25 });
127
+ }
128
+ else {
129
+ this._content.y = 0;
130
+ }
126
131
  }
127
132
  /** @description 往滚动内容添加元素 */
128
133
  addContent(container) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.12.48",
3
+ "version": "1.12.49",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {