Skip to content

Commit

Permalink
fix flow
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey committed Feb 28, 2019
1 parent ebee883 commit 30cb3fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/render/draw_debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ function drawDebugTile(painter, sourceCache, coord) {
debugUniformValues(posMatrix, Color.red), id,
painter.debugBuffer, painter.tileBorderIndexBuffer, painter.debugSegments);

const tileSizeKb = Math.floor(sourceCache.getTileByID(coord.key).latestRawTileData && sourceCache.getTileByID(coord.key).latestRawTileData.byteLength / 1024);
const tileRawData = sourceCache.getTileByID(coord.key).latestRawTileData;
const tileByteLength = (tileRawData && tileRawData.byteLength) || 0;
const tileSizeKb = Math.floor(tileByteLength / 1024);
const vertices = createTextVertices(`${coord.toString()} ${tileSizeKb}kb`, 50, 200, 5);
const debugTextArray = new PosArray();
const debugTextIndices = new LineIndexArray();
Expand Down

0 comments on commit 30cb3fb

Please sign in to comment.