NullElement.js 983 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {
  2. extendPrototype,
  3. } from '../utils/functionExtensions';
  4. import BaseElement from './BaseElement';
  5. import TransformElement from './helpers/TransformElement';
  6. import HierarchyElement from './helpers/HierarchyElement';
  7. import FrameElement from './helpers/FrameElement';
  8. function NullElement(data, globalData, comp) {
  9. this.initFrame();
  10. this.initBaseData(data, globalData, comp);
  11. this.initFrame();
  12. this.initTransform(data, globalData, comp);
  13. this.initHierarchy();
  14. }
  15. NullElement.prototype.prepareFrame = function (num) {
  16. this.prepareProperties(num, true);
  17. };
  18. NullElement.prototype.renderFrame = function () {
  19. };
  20. NullElement.prototype.getBaseElement = function () {
  21. return null;
  22. };
  23. NullElement.prototype.destroy = function () {
  24. };
  25. NullElement.prototype.sourceRectAtTime = function () {
  26. };
  27. NullElement.prototype.hide = function () {
  28. };
  29. extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement);
  30. export default NullElement;