text-align.js 936 B

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var IPropertyDescriptor_1 = require("../IPropertyDescriptor");
  4. var TEXT_ALIGN;
  5. (function (TEXT_ALIGN) {
  6. TEXT_ALIGN[TEXT_ALIGN["LEFT"] = 0] = "LEFT";
  7. TEXT_ALIGN[TEXT_ALIGN["CENTER"] = 1] = "CENTER";
  8. TEXT_ALIGN[TEXT_ALIGN["RIGHT"] = 2] = "RIGHT";
  9. })(TEXT_ALIGN = exports.TEXT_ALIGN || (exports.TEXT_ALIGN = {}));
  10. exports.textAlign = {
  11. name: 'text-align',
  12. initialValue: 'left',
  13. prefix: false,
  14. type: IPropertyDescriptor_1.PropertyDescriptorParsingType.IDENT_VALUE,
  15. parse: function (textAlign) {
  16. switch (textAlign) {
  17. case 'right':
  18. return TEXT_ALIGN.RIGHT;
  19. case 'center':
  20. case 'justify':
  21. return TEXT_ALIGN.CENTER;
  22. case 'left':
  23. default:
  24. return TEXT_ALIGN.LEFT;
  25. }
  26. }
  27. };
  28. //# sourceMappingURL=text-align.js.map