Skip to content

Commit

Permalink
text-size -> text-max-size, size -> text-size, close #1
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Apr 4, 2014
1 parent 427ed4f commit ee45f0f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
5 changes: 3 additions & 2 deletions migrations/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = function upgrade(v0) {
// text styles
if (v0bucket.text_field) styles['text-field'] = v0bucket.text_field;
if (v0bucket.font) styles['text-font'] = v0bucket.font;
if (v0bucket.fontSize) styles['text-size'] = v0bucket.fontSize;
if (v0bucket.fontSize) styles['text-max-size'] = v0bucket.fontSize;
if (v0bucket.path) styles['text-path'] = v0bucket.path;
if (v0bucket.padding) styles['text-padding'] = v0bucket.padding;

Expand Down Expand Up @@ -134,7 +134,8 @@ module.exports = function upgrade(v0) {
antialias: 'antialias',
alignment: 'alignment',
radius: 'radius',
blur: 'blur'
blur: 'blur',
size: 'size'
};

var otherRules = {
Expand Down
32 changes: 16 additions & 16 deletions test/styles/bright-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@
"text-halo-color": [1, 1, 1, 0.8],
"min-zoom": 3,
"text-field": "name",
"text-size": 13,
"text-max-size": 13,
"text-path": "horizontal"
},
"country_label_line": {
Expand All @@ -747,21 +747,21 @@
"text-color": "marine_text",
"text-halo-color": [1, 1, 1, 0.8],
"text-field": "name",
"text-size": 22,
"text-max-size": 22,
"text-path": "curve"
},
"marin_label_2": {
"text-color": "marine_text",
"text-halo-color": [1, 1, 1, 0.8],
"text-field": "name",
"text-size": 16,
"text-max-size": 16,
"text-path": "curve"
},
"marin_label_3": {
"text-color": "marine_text",
"text-halo-color": [1, 1, 1, 0.8],
"text-field": "name",
"text-size": 14,
"text-max-size": 14,
"text-path": "curve"
},
"place_label_city_point": {
Expand All @@ -771,73 +771,73 @@
"place_label_city": {
"text-color": "#333",
"text-halo-color": [1, 1, 1, 0.8],
"size": {
"text-size": {
"fn": "stops",
"stops": [[0, 10], [10, 18], [12, 24]]
},
"text-translate": [0, 30],
"text-field": "name",
"text-size": 24,
"text-max-size": 24,
"text-path": "horizontal"
},
"place_label_town": {
"text-color": "#333",
"text-halo-color": [1, 1, 1, 0.8],
"size": {
"text-size": {
"fn": "stops",
"stops": [[0, 14], [12, 16], [14, 20], [16, 24]]
},
"text-field": "name",
"text-size": 24,
"text-max-size": 24,
"text-path": "horizontal"
},
"place_label_village": {
"text-color": "#333",
"text-halo-color": [1, 1, 1, 0.8],
"size": {
"text-size": {
"fn": "stops",
"stops": [[0, 12], [12, 14], [14, 28], [16, 22]]
},
"text-field": "name",
"text-size": 22,
"text-max-size": 22,
"text-path": "horizontal"
},
"place_label_other": {
"text-color": "#633",
"text-halo-color": [1, 1, 1, 0.8],
"size": {
"text-size": {
"fn": "stops",
"stops": [[0, 10], [14, 11], [15, 12], [16, 14]]
},
"text-field": "name",
"text-size": 14,
"text-max-size": 14,
"text-path": "horizontal"
},
"poi_label": {
"text-color": "#666",
"text-halo-color": [1, 1, 1, 0.5],
"text-field": "name",
"text-size": 12,
"text-max-size": 12,
"text-path": "horizontal",
"text-padding": 2
},
"road_label": {
"text-color": "#765",
"text-halo-color": [1, 1, 1, 0.5],
"size": {
"text-size": {
"fn": "stops",
"stops": [[0, 12], [14, 12], [15, 13]]
},
"text-field": "name",
"text-size": 13,
"text-max-size": 13,
"text-path": "curve",
"text-padding": 2
},
"water_label": {
"text-color": "marine_text",
"text-halo-color": [1, 1, 1, 0.75],
"text-field": "name",
"text-size": 12,
"text-max-size": 12,
"text-path": "horizontal"
},
"poi_airport": {
Expand Down
10 changes: 5 additions & 5 deletions test/styles/debug-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
"text-color": "text",
"text-field": "name",
"text-font": "Open Sans, Jomolhari, Siyam Rupali, Alef, Arial Unicode MS",
"text-size": 16,
"text-max-size": 16,
"text-path": "horizontal",
"text-padding": 10
},
Expand All @@ -380,15 +380,15 @@
"text-color": "text",
"text-field": "name",
"text-font": "Open Sans, Jomolhari, Siyam Rupali, Alef, Arial Unicode MS",
"text-size": 18,
"text-max-size": 18,
"text-path": "horizontal",
"text-always-visible": true
},
"road_label": {
"text-color": "text",
"text-halo-color": [1, 1, 1, 0.7],
"text-halo-width": "stroke_width",
"size": {
"text-size": {
"fn": "exponential",
"z": 14,
"val": 8,
Expand All @@ -398,7 +398,7 @@
},
"text-field": "name",
"text-font": "Open Sans, Jomolhari, Siyam Rupali, Alef, Arial Unicode MS",
"text-size": 12,
"text-max-size": 12,
"text-path": "curve",
"text-min-dist": 250,
"text-max-angle": 1.04
Expand Down Expand Up @@ -440,7 +440,7 @@
"place_label": {
"text-field": "name",
"text-font": "Open Sans, Jomolhari, Siyam Rupali, Alef, Arial Unicode MS",
"text-size": 18,
"text-max-size": 18,
"text-path": "horizontal",
"text-always-visible": true
},
Expand Down

0 comments on commit ee45f0f

Please sign in to comment.