Garrett Johnson 4 роки тому
батько
коміт
36cf3ebda2
2 змінених файлів з 2 додано та 3 видалено
  1. 1 1
      example/index.js
  2. 1 2
      src/base/traverseFunctions.js

+ 1 - 1
example/index.js

@@ -609,7 +609,7 @@ function render() {
 
 	}
 
-	const cacheFullness = tiles.lruCache.itemList.length / tiles.lruCache.minSize;
+	const cacheFullness = tiles.lruCache.itemList.length / tiles.lruCache.maxSize;
 	let str = `Downloading: ${ tiles.stats.downloading } Parsing: ${ tiles.stats.parsing } Visible: ${ tiles.group.children.length - 2 }`;
 
 	if ( params.enableCacheDisplay ) {

+ 1 - 2
src/base/traverseFunctions.js

@@ -235,8 +235,7 @@ export function markUsedSetLeaves( tile, renderer ) {
 
 				// TODO: we should check for external tilesets here
 				// TODO: we get a blink when a node has no children
-				const finishedLoading = isDownloadFinished( c.__loadingState ) && ( ! c.__contentEmpty || c.__externalTileSet );
-				const childLoaded = finishedLoading || c.__allChildrenLoaded;
+				const childLoaded = ( ! c.__contentEmpty && isDownloadFinished( c.__loadingState ) ) || c.__allChildrenLoaded;
 				allChildrenLoaded = allChildrenLoaded && childLoaded;
 
 			}