Skip to content

Commit

Permalink
fix style in viz.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Oct 19, 2018
1 parent 480e66a commit d3bf094
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions debug/viz.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ let y = 0;
let z = 0;

if (devicePixelRatio > 1) {
canvas.style.width = `${canvas.width }px`;
canvas.style.height = `${canvas.height }px`;
canvas.style.width = `${canvas.width}px`;
canvas.style.height = `${canvas.height}px`;
canvas.width *= 2;
canvas.height *= 2;
ctx.scale(2, 2);
Expand All @@ -34,7 +34,7 @@ ctx.fillText('Drag a GeoJSON or TopoJSON here', height / 2, height / 2);

function humanFileSize(size) {
const i = Math.floor(Math.log(size) / Math.log(1024));
return `${Math.round(100 * (size / Math.pow(1024, i))) / 100 } ${ ['B', 'kB', 'MB', 'GB'][i]}`;
return `${Math.round(100 * (size / Math.pow(1024, i))) / 100} ${['B', 'kB', 'MB', 'GB'][i]}`;
}

canvas.ondragover = function () {
Expand Down Expand Up @@ -96,9 +96,9 @@ function drawSquare(left, top) {

function drawTile() {

console.time(`getting tile z${ z }-${ x }-${ y}`);
console.time(`getting tile z${z}-${x}-${y}`);
const tile = tileIndex.getTile(z, x, y);
console.timeEnd(`getting tile z${ z }-${ x }-${ y}`);
console.timeEnd(`getting tile z${z}-${x}-${y}`);

if (!tile) {
console.log('tile empty');
Expand Down

0 comments on commit d3bf094

Please sign in to comment.