mirror of
https://github.com/rastapasta/mapscii.git
synced 2024-11-07 08:44:14 +01:00
Change the unit of width and length options to full characters
This commit is contained in:
parent
9eb2e5ef25
commit
5c8ded81dc
6
main.js
6
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) => {
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user