VerticalOrigin.js 1.1 KB

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