From 40111e0d8e7b826dc01cf828a0c299fc5b075526 Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Tue, 10 Jan 2017 15:17:35 +0100 Subject: [PATCH] Fix minzoom and maxzoom in source modal --- src/components/modals/SourcesModal.jsx | 8 ++++---- src/components/sources/SourceTypeEditor.jsx | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/modals/SourcesModal.jsx b/src/components/modals/SourcesModal.jsx index 46b21e0..a4a54fb 100644 --- a/src/components/modals/SourcesModal.jsx +++ b/src/components/modals/SourcesModal.jsx @@ -144,8 +144,8 @@ class AddSource extends React.Component { case 'tilexyz_vector': return { type: 'vector', tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'], - minZoom: source.minZoom || 0, - maxZoom: source.maxZoom || 14 + minZoom: source.minzoom || 0, + maxZoom: source.maxzoom || 14 } case 'tilejson_raster': return { type: 'raster', @@ -154,8 +154,8 @@ class AddSource extends React.Component { case 'tilexyz_raster': return { type: 'raster', tiles: source.tiles || ['http://localhost:3000/{x}/{y}/{z}.pbf'], - minZoom: source.minZoom || 0, - maxZoom: source.maxZoom || 14 + minzoom: source.minzoom || 0, + maxzoom: source.maxzoom || 14 } default: return {} } diff --git a/src/components/sources/SourceTypeEditor.jsx b/src/components/sources/SourceTypeEditor.jsx index 289b3ec..7ca2eff 100644 --- a/src/components/sources/SourceTypeEditor.jsx +++ b/src/components/sources/SourceTypeEditor.jsx @@ -46,19 +46,19 @@ class TileURLSourceEditor extends React.Component { {this.renderTileUrls()} this.props.onChange({ + value={this.props.source.minzoom || 0} + onChange={minzoom => this.props.onChange({ ...this.props.source, - minZoom: minZoom + minzoom: minzoom })} /> this.props.onChange({ + value={this.props.source.maxzoom || 22} + onChange={maxzoom => this.props.onChange({ ...this.props.source, - maxZoom: maxZoom + maxzoom: maxzoom })} />