Fixed minor bugs
@ -160,8 +160,8 @@ export class PIXITileLoader extends TileLoader {
|
|||||||
_onLoaded(loader, resource) {
|
_onLoaded(loader, resource) {
|
||||||
if (this.destroyed) {
|
if (this.destroyed) {
|
||||||
let texture = resource.texture
|
let texture = resource.texture
|
||||||
let destroyBase = !deepZoomTileCache.has(resource.url)
|
let url = resource.url
|
||||||
texture.destroy(destroyBase)
|
Tile.lateTexture(url, texture)
|
||||||
console.warn("Received resource after destroy", texture)
|
console.warn("Received resource after destroy", texture)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ export default class Tile extends PIXI.Sprite {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// No longer registered and not pending
|
// 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 }
|
let opts = { children: true, texture: true, baseTexture: true }
|
||||||
super.destroy(opts)
|
super.destroy(opts)
|
||||||
if (debug) console.log("Tile.destroy", registeredTiles.size, opts)
|
if (debug) console.log("Tile.destroy", registeredTiles.size, opts)
|
||||||
@ -187,6 +187,16 @@ export default class Tile extends PIXI.Sprite {
|
|||||||
return null
|
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() {
|
static printInfos() {
|
||||||
let references = new Map()
|
let references = new Map()
|
||||||
let multiples = 0
|
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 |
783
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "iwmlib",
|
"name": "iwmlib",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"description": "An Open Source library for multi-touch, WebGL powered applications.",
|
"description": "An Open Source library for multi-touch, WebGL powered applications.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|