diff --git a/src/LabelBuffer.coffee b/src/LabelBuffer.coffee index a8fc693..84f355d 100644 --- a/src/LabelBuffer.coffee +++ b/src/LabelBuffer.coffee @@ -21,18 +21,18 @@ module.exports = class LabelBuffer project: (x, y) -> [Math.floor(x/2), Math.floor(y/4)] - writeIfPossible: (text, x, y) -> + writeIfPossible: (text, x, y, margin = @margin) -> point = @project x, y if @_hasSpace text, point[0], point[1] - @tree.insert @_calculateArea text, point[0], point[1] + @tree.insert @_calculateArea text, point[0], point[1], margin else false _hasSpace: (text, x, y) -> not @tree.collides @_calculateArea text, x, y, 0 - _calculateArea: (text, x, y, margin = @margin) -> + _calculateArea: (text, x, y, margin) -> minX: x-margin minY: y-margin maxX: x+margin+text.length diff --git a/src/Termap.coffee b/src/Termap.coffee index e14cd3f..225f3e2 100644 --- a/src/Termap.coffee +++ b/src/Termap.coffee @@ -66,7 +66,7 @@ module.exports = class Termap _resizeRenderer: (cb) -> @width = (process.stdout.columns-1) >> 1 << 2 - @height = process.stdout.rows >> 2 << 4 + @height = process.stdout.rows * 4 - 8 @renderer.setSize @width, @height diff --git a/styles/bright.json b/styles/bright.json index e6b9cf7..09ec750 100644 --- a/styles/bright.json +++ b/styles/bright.json @@ -1150,6 +1150,14 @@ } } }, + { + "type": "symbol", + "id": "housenum_label", + "paint": { + "text-color": "#333" + }, + "source-layer": "housenum_label" + }, { "type": "symbol", "id": "place_label_other",