10000 catcup 8 sept by ErwanMAS · Pull Request #1 · ErwanMAS/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

catcup 8 sept #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Sep 8, 2018
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c87ccb3
Lib.sort
alexcjohnson Aug 24, 2018
1f4898c
fix a bunch of edge cases in cartesian autorange
alexcjohnson Aug 31, 2018
0541cd1
rangemode only applies to linear axes
alexcjohnson Aug 31, 2018
4e71dfa
lint fx/hover
alexcjohnson Aug 31, 2018
2fde3dc
better ordering of trace hoverlabels for matching positions
alexcjohnson Aug 31, 2018
68b489d
continue lines off the edge toward invalid log values
alexcjohnson Sep 1, 2018
be38e93
stacked area charts!
alexcjohnson Sep 1, 2018
8547cf8
test duplicate position stacking
alexcjohnson Sep 4, 2018
eed76c6
comment on log_lines_fills mock structure and purple points
alexcjohnson Sep 4, 2018
13b54da
include chrome/ff versions in Lib.sort docstring
alexcjohnson Sep 4, 2018
2092354
convert some stacked area TODOs to Notes since we've discussed them
alexcjohnson Sep 5, 2018
cb37565
add responsive option to config
antoinerg Sep 5, 2018
069b0e2
fix typo in comment
antoinerg Sep 5, 2018
00d7d22
clarify stacked area groupnorm description
alexcjohnson Sep 5, 2018
08d6736
several improvements to responsive charts
antoinerg Sep 5, 2018
712652b
update comments
antoinerg Sep 5, 2018
d82447a
improve tests for responsive charts
antoinerg Sep 6, 2018
62145e9
fix test to check responsive charts only have one resize handler
antoinerg Sep 6, 2018
ec9ffa1
properly purge plots after each test
antoinerg Sep 6, 2018
11b237d
Merge branch 'master' into stacked-area
alexcjohnson Sep 7, 2018
9fdf522
remove "alwaysSupplyDefaults" so visible: false does not contribute t…
alexcjohnson Sep 7, 2018
1262172
clear responsive handlers in `Plotly.plot` if needed
antoinerg Sep 7, 2018
70fcaad
Merge pull request #2960 from plotly/stacked-area
alexcjohnson Sep 7, 2018
cfc720b
Merge pull request #2974 from plotly/2969-responsive-charts
antoinerg Sep 7, 2018
5d573ee
compare legend width with pushed margins
antoinerg Sep 7, 2018
9d8c158
add baseline for legend_large_margin
antoinerg Sep 7, 2018
dbea03d
simplifies the check to see if legend fits
antoinerg Sep 7, 2018
9070705
Merge pull request #2983 from plotly/2971-legend_large_margin
antoinerg Sep 7, 2018
a6e90cb
sankey fix translateX for subplots
antoinerg Sep 7, 2018
5dcdfb4
sankey add baseline for subplots positioning
antoinerg Sep 7, 2018
ff3c324
Merge pull request #2984 from plotly/2878-sankey-domain-x
antoinerg Sep 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
properly purge plots after each test
  • Loading branch information
antoinerg committed Sep 6, 2018
commit ec9ffa1e70468b74fcc35b2d6f6e96c8ef647d14
37 changes: 19 additions & 18 deletions test/jasmine/tests/config_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ describe('config argument', function() {
});

afterEach(function() {
Plotly.purge(gd); // Needed to remove all event listeners
destroyGraphDiv();
viewport.reset();
});
Expand All @@ -572,24 +573,6 @@ describe('config argument', function() {
.catch(failTest);
}

it('should only have one resize handler when plotted more than once', function(done) {
var cntWindowResize = 0;
window.addEventListener('resize', function() {cntWindowResize++;});
spyOn(Plotly.Plots, 'resize').and.callThrough();

Plotly.plot(gd, data, {}, {responsive: true})
.then(function() {return Plotly.restyle(gd, 'y[0]', data[0].y[0] + 2);})
.then(function() {viewport.set(newWidth, newHeight);})
.then(delay(200))
// .then(function() {viewport.set(newWidth, 2 * newHeight);}).then(delay(200))
.then(function() {
expect(cntWindowResize).toBe(1);
expect(Plotly.Plots.resize.calls.count()).toBe(1);
})
.catch(failTest)
.then(done);
});

it('should resize when the viewport width/height changes', function(done) {
Plotly.plot(gd, data, {}, {responsive: true})
.then(testResponsive)
Expand All @@ -610,6 +593,24 @@ describe('config argument', function() {
.then(done);
});

it('should only have one resize handler when plotted more than once', function(done) {
var cntWindowResize = 0;
window.addEventListener('resize', function() {cntWindowResize++;});
spyOn(Plotly.Plots, 'resize').and.callThrough();

Plotly.plot(gd, data, {}, {responsive: true})
.then(function() {return Plotly.restyle(gd, 'y[0]', data[0].y[0] + 2);})
.then(function() {viewport.set(newWidth, newHeight);})
.then(delay(200))
// .then(function() {viewport.set(newWidth, 2 * newHeight);}).then(delay(200))
.then(function() {
expect(cntWindowResize).toBe(1);
expect(Plotly.Plots.resize.calls.count()).toBe(1);
})
.catch(failTest)
.then(done);
});

it('should become responsive if configured as such via Plotly.react', function(done) {
Plotly.plot(gd, data, {}, {responsive: false})
.then(function() {return Plotly.react(gd, data, {}, {responsive: true});})
Expand Down
0