Skip to content

Commit e810c1e

Browse files
committed
🔪 layoutStyles call in drawFramework step
- this appear to be no longer needed - adapt plot_api test to relied on layoutStyles spy counts
1 parent e32434e commit e810c1e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/plot_api/plot_api.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ exports.plot = function(gd, data, layout, config) {
245245
.attr('height', fullLayout.height);
246246
}
247247

248-
return Lib.syncOrAsync([
249-
subroutines.layoutStyles
250-
], gd);
248+
return Plots.previousPromises(gd);
251249
}
252250

253251
// draw anything that can affect margins.

test/jasmine/tests/plot_api_test.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -2440,9 +2440,7 @@ describe('Test plot api', function() {
24402440

24412441
function countCalls(counts) {
24422442
var callsFinal = Lib.extendFlat({}, counts);
2443-
// TODO: do we really need to do layoutStyles twice in Plotly.plot?
2444-
// We get one from drawFramework and another directly from Plotly.plot.
2445-
callsFinal.layoutStyles = (counts.layoutStyles || 0) + 2 * (counts.plot || 0);
2443+
callsFinal.layoutStyles = (counts.layoutStyles || 0) + (counts.plot || 0);
24462444

24472445
mockedMethods.forEach(function(m) {
24482446
expect(subroutines[m]).toHaveBeenCalledTimes(callsFinal[m] || 0);

0 commit comments

Comments
 (0)