From 5cb79a9de23b3c37d011d6767c37e1c74593568c Mon Sep 17 00:00:00 2001 From: Gjum Date: Sun, 1 Jan 2017 03:33:53 +0100 Subject: [PATCH] add required border{Square,Circle}Radius property --- js/Main.js | 16 ++++++++++++---- web/index.html | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/js/Main.js b/js/Main.js index 8526862..e29ae03 100644 --- a/js/Main.js +++ b/js/Main.js @@ -158,8 +158,7 @@ export default class Main extends Component { } render() { - var tileBounds = Util.radiusToBounds(5120); - var borderBounds = Util.radiusToBounds(5000); + var tileBounds = Util.radiusToBounds(this.props.borderCircleRadius || this.props.borderSquareRadius); var minZoom = -6; return @@ -312,12 +311,21 @@ export default class Main extends Component { // updated directly through ref for performance reasons ref={r => {if (r) this.coordsDisplay = r}} /> - { !this.state.showBorder ? null : + { !this.state.showBorder ? null + : this.props.borderSquareRadius ? + : this.props.borderCircleRadius ? + + : null // no border } { this.state.claimOpacity > 0 && this.state.claims.map((claim, claimId) => diff --git a/web/index.html b/web/index.html index 82842e4..588942c 100644 --- a/web/index.html +++ b/web/index.html @@ -41,6 +41,7 @@ claimsPublishHelpUrl: 'https://github.com/dev3map/dev3map.github.io/wiki/Adding-and-editing-claims', tilesUrl: 'https://raw.githubusercontent.com/dev3map/tiles/master/', claimsUrl: 'https://raw.githubusercontent.com/dev3map/data/master/claims.json', + borderSquareRadius: 5000, basemaps: [ 'terrain', 'night',