[core] Swap order of Style::recalculate and Style::relayout
Style::relayout uses source.baseImpl->loaded, a flag which is updated by Style::recalculate. So recalculate first, then relayout.
This commit is contained in:
committed by
John Firebaugh
parent
b0a928dcbc
commit
28be37fcbe
@@ -24,7 +24,7 @@
|
||||
"lodash": "^4.16.4",
|
||||
"mapbox-gl-shaders": "mapbox/mapbox-gl-shaders#b51b85ffb8c512e228c36c5405293ce51d123519",
|
||||
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#49e8b407bdbbe6f7c92dbcb56d3d51f425fc2653",
|
||||
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#9252ffc5108131704b5acf52d78258ac05687871",
|
||||
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#66397c8ee0426537d25e8d4cfcac134ca21a021b",
|
||||
"mkdirp": "^0.5.1",
|
||||
"node-cmake": "^1.2.1",
|
||||
"request": "^2.72.0",
|
||||
|
||||
@@ -253,10 +253,6 @@ void Map::Impl::update() {
|
||||
annotationManager->updateData();
|
||||
}
|
||||
|
||||
if (updateFlags & Update::Layout) {
|
||||
style->relayout();
|
||||
}
|
||||
|
||||
if (updateFlags & Update::Classes) {
|
||||
style->cascade(timePoint, mode);
|
||||
}
|
||||
@@ -265,6 +261,10 @@ void Map::Impl::update() {
|
||||
style->recalculate(transform.getZoom(), timePoint, mode);
|
||||
}
|
||||
|
||||
if (updateFlags & Update::Layout) {
|
||||
style->relayout();
|
||||
}
|
||||
|
||||
style::UpdateParameters parameters(pixelRatio,
|
||||
debugOptions,
|
||||
transform.getState(),
|
||||
|
||||
Reference in New Issue
Block a user