diff --git a/main.js b/main.js index afc3337..462b9ed 100644 --- a/main.js +++ b/main.js @@ -31,12 +31,12 @@ const argv = require('yargs') }) .option('width', { alias: 'w', - description: 'Fixed width of rendering in dot units', + description: 'Fixed width of rendering', type: 'number', }) .option('height', { alias: 'h', - description: 'Fixed height of rendering in dot units', + description: 'Fixed height of rendering', type: 'number', }) .option('braille', { @@ -78,7 +78,7 @@ const options = { headless: argv.headless, source: argv.tile_source, styleFile: argv.style_file, -} +}; const mapscii = new Mapscii(options); mapscii.init().catch((err) => { diff --git a/src/Mapscii.js b/src/Mapscii.js index 133d756..5872279 100644 --- a/src/Mapscii.js +++ b/src/Mapscii.js @@ -93,8 +93,8 @@ class Mapscii { } _resizeRenderer() { - this.width = config.size && config.size.width ? config.size.width : config.output.columns >> 1 << 2; - this.height = config.size && config.size.height ? config.size.height : config.output.rows * 4 - 4; + this.width = config.size && config.size.width ? config.size.width * 2 : config.output.columns >> 1 << 2; + this.height = config.size && config.size.height ? config.size.height * 4 : config.output.rows * 4 - 4; this.minZoom = 4-Math.log(4096/this.width)/Math.LN2;