-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix collisions for stretchable images with a
content
area (#9041)
- Loading branch information
Showing
5 changed files
with
193 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+7.6 KB
...ion/render-tests/icon-text-fit/stretch-nine-part-content-collision/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
156 changes: 156 additions & 0 deletions
156
test/integration/render-tests/icon-text-fit/stretch-nine-part-content-collision/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 200, | ||
"height": 150 | ||
} | ||
}, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": "local://geojson/anchors.json" | ||
} | ||
}, | ||
"sprite": "local://sprites/stretch", | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"layers": [ | ||
{ | ||
"id": "anchor-center", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "center"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "center", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-left", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "left"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "left", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-top-left", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "top-left"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "top-left", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-top", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "top"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "top", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-top-right", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "top-right"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "top-right", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-right", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "right"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "right", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-bottom-left", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "bottom-left"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "bottom-left", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-bottom", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "bottom"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "bottom", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchor-bottom-right", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"filter": ["==", "anchor", "bottom-right"], | ||
"layout": { | ||
"text-field": "ABC", | ||
"text-size": 20, | ||
"text-anchor": "bottom-right", | ||
"text-font": [ "Open Sans Semibold", "Arial Unicode MS Bold" ], | ||
"icon-image": "nine-part-content", | ||
"icon-text-fit": "both" | ||
} | ||
}, | ||
{ | ||
"id": "anchors", | ||
"type": "circle", | ||
"source": "geojson", | ||
"paint": { | ||
"circle-radius": 2, | ||
"circle-color": "green", | ||
"circle-stroke-color": "white", | ||
"circle-stroke-width": 1 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters