element-container.js 877 B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var index_1 = require("../css/index");
  4. var bounds_1 = require("../css/layout/bounds");
  5. var node_parser_1 = require("./node-parser");
  6. var ElementContainer = /** @class */ (function () {
  7. function ElementContainer(element) {
  8. this.styles = new index_1.CSSParsedDeclaration(window.getComputedStyle(element, null));
  9. this.textNodes = [];
  10. this.elements = [];
  11. if (this.styles.transform !== null && node_parser_1.isHTMLElementNode(element)) {
  12. // getBoundingClientRect takes transforms into account
  13. element.style.transform = 'none';
  14. }
  15. this.bounds = bounds_1.parseBounds(element);
  16. this.flags = 0;
  17. }
  18. return ElementContainer;
  19. }());
  20. exports.ElementContainer = ElementContainer;
  21. //# sourceMappingURL=element-container.js.map