[tests] Test updating icon and pattern images

This commit is contained in:
John Firebaugh
2017-06-07 16:49:11 -07:00
parent 0b68731207
commit f610e9bef9
3 changed files with 6 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ module.exports = function (style, options, callback) {
applyOperations(operations.slice(1), callback);
});
} else if (operation[0] === 'addImage') {
} else if (operation[0] === 'addImage' || operation[0] === 'updateImage') {
var img = PNG.sync.read(fs.readFileSync(path.join(__dirname, '../../../mapbox-gl-js/test/integration', operation[2])));
map.addImage(operation[1], img.data, {

View File

@@ -207,7 +207,10 @@ void RenderStyle::update(const UpdateParameters& parameters) {
needsRendering = true;
}
if (hasLayoutDifference(layerDiff, layer->id) || !imageDiff.changed.empty()) {
if (hasLayoutDifference(layerDiff, layer->id) ||
!imageDiff.added.empty() ||
!imageDiff.removed.empty() ||
!imageDiff.changed.empty()) {
needsRelayout = true;
}