VerticalOrigin.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import freezeObject from '../Core/freezeObject.js';
  2. /**
  3. * The vertical location of an origin relative to an object, e.g., a {@link Billboard}
  4. * or {@link Label}. For example, setting the vertical origin to <code>TOP</code>
  5. * or <code>BOTTOM</code> will display a billboard above or below (in screen space)
  6. * the anchor position.
  7. * <br /><br />
  8. * <div align='center'>
  9. * <img src='Images/Billboard.setVerticalOrigin.png' width='695' height='175' /><br />
  10. * </div>
  11. *
  12. * @exports VerticalOrigin
  13. *
  14. * @see Billboard#verticalOrigin
  15. * @see Label#verticalOrigin
  16. */
  17. var VerticalOrigin = {
  18. /**
  19. * The origin is at the vertical center between <code>BASELINE</code> and <code>TOP</code>.
  20. *
  21. * @type {Number}
  22. * @constant
  23. */
  24. CENTER : 0,
  25. /**
  26. * The origin is at the bottom of the object.
  27. *
  28. * @type {Number}
  29. * @constant
  30. */
  31. BOTTOM : 1,
  32. /**
  33. * If the object contains text, the origin is at the baseline of the text, else the origin is at the bottom of the object.
  34. *
  35. * @type {Number}
  36. * @constant
  37. */
  38. BASELINE : 2,
  39. /**
  40. * The origin is at the top of the object.
  41. *
  42. * @type {Number}
  43. * @constant
  44. */
  45. TOP : -1
  46. };
  47. export default freezeObject(VerticalOrigin);