HorizontalOrigin.js 1.2 KB

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