Merge pull request #8045 from plotly/bugfix/7750-margin-pushers-again · plotly/plotly.js@8ffa227 · GitHub
Skip to content

Commit 8ffa227

Browse files
authored
Merge pull request #8045 from plotly/bugfix/7750-margin-pushers-again
Fix plot shifting on axis when automargin applied to title
2 parents d0c808b + 42fa76e commit 8ffa227

4 files changed

Lines changed: 50 additions & 4 deletions

File tree

‎draftlogs/8045_fix.md‎

Lines changed: 1 addition & 0 deletions

‎src/plot_api/plot_api.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ function _doPlot(gd, data, layout, config) {
331331
function marginPushersAgain() {
332332
if (!Plots.didMarginChange(oldMargins, fullLayout._size)) return;
333333

334-
return Lib.syncOrAsync([marginPushers, subroutines.layoutStyles], gd);
334+
return marginPushers();
335335
}
336336

337337
function positionAndAutorange() {

‎test/jasmine/tests/plot_api_react_test.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ describe('@noCIdep Plotly.react', function() {
210210
return Plotly.react(gd, data, layout);
211211
})
212212
.then(function() {
213-
// we get an extra call to layoutStyles from marginPushersAgain due to the colorbar.
214-
// Really need to simplify that pipeline...
215-
countCalls({plot: 1, layoutStyles: 1});
213+
countCalls({plot: 1});
216214

217215
layout.scene.camera = {up: {x: 1, y: 0, z: -1}};
218216

‎test/jasmine/tests/titles_test.js‎

Lines changed: 47 additions & 0 deletions

0 commit comments

Comments
 (0)