Fixed minor bugs
@@ -160,8 +160,8 @@ export class PIXITileLoader extends TileLoader {
|
||||
_onLoaded(loader, resource) {
|
||||
if (this.destroyed) {
|
||||
let texture = resource.texture
|
||||
let destroyBase = !deepZoomTileCache.has(resource.url)
|
||||
texture.destroy(destroyBase)
|
||||
let url = resource.url
|
||||
Tile.lateTexture(url, texture)
|
||||
console.warn("Received resource after destroy", texture)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ export default class Tile extends PIXI.Sprite {
|
||||
}
|
||||
else {
|
||||
// No longer registered and not pending
|
||||
if (count <= 0 && !Tile.isPending(url)) {
|
||||
if (count <= 0 && !Tile.isPending(this.url)) {
|
||||
let opts = { children: true, texture: true, baseTexture: true }
|
||||
super.destroy(opts)
|
||||
if (debug) console.log("Tile.destroy", registeredTiles.size, opts)
|
||||
@@ -187,6 +187,16 @@ export default class Tile extends PIXI.Sprite {
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Texture received too late. We do not need it.
|
||||
* @param {*} url
|
||||
* @param {*} texture
|
||||
*/
|
||||
static lateTexture(url, texture) {
|
||||
let destroyBase = !deepZoomTileCache.has(url)
|
||||
texture.destroy(destroyBase)
|
||||
}
|
||||
|
||||
static printInfos() {
|
||||
let references = new Map()
|
||||
let multiples = 0
|
||||
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |