get-width.js 391 B

123456789101112
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var get_style_1 = require("./get-style");
  4. function getHeight(el, defaultValue) {
  5. var width = (0, get_style_1.default)(el, 'width', defaultValue);
  6. if (width === 'auto') {
  7. width = el.offsetWidth;
  8. }
  9. return parseFloat(width);
  10. }
  11. exports.default = getHeight;
  12. //# sourceMappingURL=get-width.js.map