Fixed minor bugs

This commit is contained in:
Uwe Oestermeier 2019-06-01 12:31:38 +02:00
parent 895ec55a46
commit 05ecd0b048
11 changed files with 24 additions and 777 deletions

View File

@ -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
}

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

783
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "iwmlib",
"version": "1.0.9",
"version": "1.0.10",
"description": "An Open Source library for multi-touch, WebGL powered applications.",
"main": "index.js",
"directories": {