Reverting getBounds to bound to avoid excessive loading of tiles.
This commit is contained in:
@@ -635,7 +635,7 @@ export class DeepZoomImage extends PIXI.Container {
|
||||
}
|
||||
|
||||
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
|
||||
// to excessive loading
|
||||
if (this.world != null) {
|
||||
@@ -1039,7 +1039,7 @@ export class DeepZoomImage extends PIXI.Container {
|
||||
this.ensureTiles(this.currentLevel, event.about)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let level = this.levelForScale(event.scale)
|
||||
let newLevel = Math.max(level, this.minimumLevel)
|
||||
if (newLevel != this.currentLevel) {
|
||||
@@ -1076,15 +1076,12 @@ export class DeepZoomImage extends PIXI.Container {
|
||||
*/
|
||||
deactivate() {
|
||||
this.destroyAllTiles()
|
||||
Object.keys(this.tileLayers).forEach(key => {
|
||||
this.destroyTiles(key)
|
||||
})
|
||||
this.tileContainer.destroy({ children: true })
|
||||
printTileCacheInfos()
|
||||
}
|
||||
|
||||
throwFinished() {
|
||||
console.log("throwFinished")
|
||||
//console.log("throwFinished")
|
||||
let key = this.currentLevel.toString()
|
||||
let currentTiles = this.tileLayers[key]
|
||||
if (typeof currentTiles == 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user