NeverTileDiscardPolicy.js 808 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * A {@link TileDiscardPolicy} specifying that tile images should never be discard.
  3. *
  4. * @alias NeverTileDiscardPolicy
  5. * @constructor
  6. *
  7. * @see DiscardMissingTileImagePolicy
  8. */
  9. function NeverTileDiscardPolicy(options) {}
  10. /**
  11. * Determines if the discard policy is ready to process images.
  12. * @returns {boolean} True if the discard policy is ready to process images; otherwise, false.
  13. */
  14. NeverTileDiscardPolicy.prototype.isReady = function () {
  15. return true;
  16. };
  17. /**
  18. * Given a tile image, decide whether to discard that image.
  19. *
  20. * @param {HTMLImageElement} image An image to test.
  21. * @returns {boolean} True if the image should be discarded; otherwise, false.
  22. */
  23. NeverTileDiscardPolicy.prototype.shouldDiscardImage = function (image) {
  24. return false;
  25. };
  26. export default NeverTileDiscardPolicy;