box.js 530 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * box.js - box 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. * Box
  13. */
  14. function Box(options) {
  15. if (!(this instanceof Node)) {
  16. return new Box(options);
  17. }
  18. options = options || {};
  19. Element.call(this, options);
  20. }
  21. Box.prototype.__proto__ = Element.prototype;
  22. Box.prototype.type = 'box';
  23. /**
  24. * Expose
  25. */
  26. module.exports = Box;