Reverting getBounds to bound to avoid excessive loading of tiles.

This commit is contained in:
Uwe Oestermeier 2019-06-03 10:24:10 +02:00
parent 0c46c4e656
commit 0442df4287
3 changed files with 7 additions and 10 deletions

View File

@ -635,7 +635,7 @@ export class DeepZoomImage extends PIXI.Container {
} }
worldBounds() { worldBounds() {
let viewBounds = this.app.scene.getBounds() let viewBounds = this.app.scene.bounds // UO: Never use getBounds()
// Using getBounds extends visible scope after loading tiles and leads // Using getBounds extends visible scope after loading tiles and leads
// to excessive loading // to excessive loading
if (this.world != null) { if (this.world != null) {
@ -1076,15 +1076,12 @@ export class DeepZoomImage extends PIXI.Container {
*/ */
deactivate() { deactivate() {
this.destroyAllTiles() this.destroyAllTiles()
Object.keys(this.tileLayers).forEach(key => {
this.destroyTiles(key)
})
this.tileContainer.destroy({ children: true }) this.tileContainer.destroy({ children: true })
printTileCacheInfos() printTileCacheInfos()
} }
throwFinished() { throwFinished() {
console.log("throwFinished") //console.log("throwFinished")
let key = this.currentLevel.toString() let key = this.currentLevel.toString()
let currentTiles = this.tileLayers[key] let currentTiles = this.tileLayers[key]
if (typeof currentTiles == 'undefined') { if (typeof currentTiles == 'undefined') {

View File

@ -1,6 +1,6 @@
{ {
"name": "iwmlib", "name": "iwmlib",
"version": "1.0.10", "version": "1.0.11",
"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": {