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.
package/dist/js/components/UI.js
CHANGED
|
@@ -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?.
|
|
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
|