NeverTileDiscardPolicy.js 905 B

123456789101112131415161718192021222324252627282930
  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. /**
  12. * Determines if the discard policy is ready to process images.
  13. * @returns {Boolean} True if the discard policy is ready to process images; otherwise, false.
  14. */
  15. NeverTileDiscardPolicy.prototype.isReady = function() {
  16. return true;
  17. };
  18. /**
  19. * Given a tile image, decide whether to discard that image.
  20. *
  21. * @param {Image} image An image to test.
  22. * @returns {Boolean} True if the image should be discarded; otherwise, false.
  23. */
  24. NeverTileDiscardPolicy.prototype.shouldDiscardImage = function(image) {
  25. return false;
  26. };
  27. export default NeverTileDiscardPolicy;