@mapbox/mapbox-gl-style-spec
Advanced tools
Comparing version 13.23.0 to 13.23.1-beta.1
@@ -0,1 +1,7 @@ | ||
# 13.23.1-beta.1 | ||
### ✨ Features and improvements | ||
* Improve `coalesce` expressions to return a `ResolvedImage` when images are missing. ([#11371](https://github.com/mapbox/mapbox-gl-js/pull/11371)) | ||
# 13.23.0 | ||
@@ -2,0 +8,0 @@ |
@@ -57,3 +57,3 @@ // @flow | ||
let argCount = 0; | ||
let requestedImageName; | ||
let firstImage; | ||
for (const arg of this.args) { | ||
@@ -63,10 +63,12 @@ argCount++; | ||
// we need to keep track of the first requested image in a coalesce statement | ||
// if coalesce can't find a valid image, we return the first image name so styleimagemissing can fire | ||
// if coalesce can't find a valid image, we return the first image so styleimagemissing can fire | ||
if (result && result instanceof ResolvedImage && !result.available) { | ||
if (!requestedImageName) { | ||
requestedImageName = result.name; | ||
// set to first image | ||
if (!firstImage) { | ||
firstImage = result; | ||
} | ||
result = null; | ||
// if we reach the end, return the first image | ||
if (argCount === this.args.length) { | ||
result = requestedImageName; | ||
return firstImage; | ||
} | ||
@@ -73,0 +75,0 @@ } |
@@ -13,3 +13,4 @@ // @flow | ||
constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) { | ||
this.text = text; | ||
// combine characters so that diacritic marks are not separate code points | ||
this.text = text.normalize ? text.normalize() : text; | ||
this.image = image; | ||
@@ -16,0 +17,0 @@ this.scale = scale; |
{ | ||
"name": "@mapbox/mapbox-gl-style-spec", | ||
"description": "a specification for mapbox gl styles", | ||
"version": "13.23.0", | ||
"version": "13.23.1-beta.1", | ||
"author": "Mapbox", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3043600
45325
2