HorizontalOrigin.js 963 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * The horizontal location of an origin relative to an object, e.g., a {@link Billboard}
  3. * or {@link Label}. For example, setting the horizontal origin to <code>LEFT</code>
  4. * or <code>RIGHT</code> will display a billboard to the left or right (in screen space)
  5. * of the anchor position.
  6. * <br /><br />
  7. * <div align='center'>
  8. * <img src='Images/Billboard.setHorizontalOrigin.png' width='648' height='196' /><br />
  9. * </div>
  10. *
  11. * @enum {number}
  12. *
  13. * @see Billboard#horizontalOrigin
  14. * @see Label#horizontalOrigin
  15. */
  16. const HorizontalOrigin = {
  17. /**
  18. * The origin is at the horizontal center of the object.
  19. *
  20. * @type {number}
  21. * @constant
  22. */
  23. CENTER: 0,
  24. /**
  25. * The origin is on the left side of the object.
  26. *
  27. * @type {number}
  28. * @constant
  29. */
  30. LEFT: 1,
  31. /**
  32. * The origin is on the right side of the object.
  33. *
  34. * @type {number}
  35. * @constant
  36. */
  37. RIGHT: -1,
  38. };
  39. export default Object.freeze(HorizontalOrigin);