Initial
This commit is contained in:
19
resources/app/node_modules/@pixi/mixin-get-child-by-name/lib/index.js
generated
vendored
Normal file
19
resources/app/node_modules/@pixi/mixin-get-child-by-name/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
var display = require("@pixi/display");
|
||||
display.DisplayObject.prototype.name = null;
|
||||
display.Container.prototype.getChildByName = function(name, deep) {
|
||||
for (let i = 0, j = this.children.length; i < j; i++)
|
||||
if (this.children[i].name === name)
|
||||
return this.children[i];
|
||||
if (deep)
|
||||
for (let i = 0, j = this.children.length; i < j; i++) {
|
||||
const child = this.children[i];
|
||||
if (!child.getChildByName)
|
||||
continue;
|
||||
const target = child.getChildByName(name, !0);
|
||||
if (target)
|
||||
return target;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in New Issue
Block a user