12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * @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;
|