text.js 564 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * text.js - text element for blessed
  3. * Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
  4. * https://github.com/chjj/blessed
  5. */
  6. /**
  7. * Modules
  8. */
  9. var Node = require('./node');
  10. var Element = require('./element');
  11. /**
  12. * Text
  13. */
  14. function Text(options) {
  15. if (!(this instanceof Node)) {
  16. return new Text(options);
  17. }
  18. options = options || {};
  19. options.shrink = true;
  20. Element.call(this, options);
  21. }
  22. Text.prototype.__proto__ = Element.prototype;
  23. Text.prototype.type = 'text';
  24. /**
  25. * Expose
  26. */
  27. module.exports = Text;