asajs 4.0.14-indev → 4.0.15-indev

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.
@@ -94,7 +94,7 @@ export class UI extends Class {
94
94
  throw new Error("Cannot add a child to itself");
95
95
  const childName = name || RandomString(16);
96
96
  this.controls.set(childName, [child, properties || {}]);
97
- callback?.apply(this, [childName]);
97
+ callback?.(childName, this);
98
98
  return this;
99
99
  }
100
100
  addAnimations(...anims) {
@@ -59,7 +59,7 @@ export declare class UI<T extends Type, K extends Renderer | null = null> extend
59
59
  * @param name
60
60
  * @returns
61
61
  */
62
- addChild<T extends Type, K extends Renderer | null>(child: UI<T, K>, properties?: Properties<T, K>, name?: string, callback?: (name: string) => void): this;
62
+ addChild<T extends Type, K extends Renderer | null>(child: UI<T, K>, properties?: Properties<T, K>, name?: string, callback?: (name: string, parent: UI<T, K>) => void): this;
63
63
  addAnimations(...anims: (Animation<AnimType> | AnimationKeyframe<AnimType>)[]): this;
64
64
  /**
65
65
  * Return a extend of this element
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asajs",
3
- "version": "4.0.14-indev",
3
+ "version": "4.0.15-indev",
4
4
  "description": "Create your Minecraft JSON-UI resource packs using JavaScript",
5
5
  "keywords": [
6
6
  "Minecraft",