first commit

This commit is contained in:
becarta
2025-05-16 00:17:42 +02:00
parent ea5c866137
commit bacf566ec9
6020 changed files with 1715262 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
/**
* @file
* Handles AE's layer parenting property.
*
*/
function HierarchyElement() {}
HierarchyElement.prototype = {
/**
* @function
* Initializes hierarchy properties
*
*/
initHierarchy: function () {
// element's parent list
this.hierarchy = [];
// if element is parent of another layer _isParent will be true
this._isParent = false;
this.checkParenting();
},
/**
* @function
* Sets layer's hierarchy.
* @param {array} hierarch
* layer's parent list
*
*/
setHierarchy: function (hierarchy) {
this.hierarchy = hierarchy;
},
/**
* @function
* Sets layer as parent.
*
*/
setAsParent: function () {
this._isParent = true;
},
/**
* @function
* Searches layer's parenting chain
*
*/
checkParenting: function () {
if (this.data.parent !== undefined) {
this.comp.buildElementParenting(this, this.data.parent, []);
}
},
};
export default HierarchyElement;