Merge pull request #7668 from ahocevar/hit-detect-text-background

Hit detect text background
This commit is contained in:
Andreas Hocevar
2018-01-01 18:04:00 +01:00
parent e065c851de
commit 61245fb83a
4 changed files with 38 additions and 14 deletions

View File

@@ -352,6 +352,9 @@ describe('ol.rendering.style.Text', function() {
}));
features[2].getStyle().getText().setPadding([5, 10, 15, 0]);
map.getView().fit(vectorSource.getExtent());
map.once('postrender', function() {
expect(map.getFeaturesAtPixel([178, 120])).to.have.length(1);
});
expectResemble(map, 'rendering/ol/style/expected/text-background.png', IMAGE_TOLERANCE, done);
});