Skip to content

Axis constraints #1522

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 16 commits into from
Apr 3, 2017
Merged
Changes from 1 commit
Commits
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
23 changes: 21 additions & 2 deletions test/jasmine/tests/gl2d_click_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,20 @@ describe('Test hover and click interactions', function() {
pointNumber: 0
});

// after the restyle, autorange changes the y range
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I don't understand, when this test ran before my changes, the y-axis didn't get autoranged after the restyle, even though when I make the same restyle call on master in the test dashboard it does autorange. Anyway, now it does get autoranged during the test, as it should, which is why I needed to alter the run the second time around.

var run2 = makeRunner([435, 106], {
x: 8,
y: 18,
curveNumber: 2,
pointNumber: 0
});

Plotly.plot(gd, _mock)
.then(run)
.then(function() {
return Plotly.restyle(gd, 'visible', false, [1]);
})
.then(run)
.then(run2)
.catch(fail)
.then(done);
});
Expand All @@ -269,12 +277,23 @@ describe('Test hover and click interactions', function() {
pointNumber: 0
});

// after the restyle, autorange changes the x AND y ranges
// I don't get why the x range changes, nor why the y changes in
// a different way than in the previous test, but they do look
// correct on the screen during the test.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense that the axis ranges are different here than in the test above, as this is scattergl-fancy... but then why are they the same as the test above during the first run? This test suite baffles me...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Maybe I tried to be too fancy in this test suite.

var run2 = makeRunner([426, 116], {
x: 8,
y: 18,
curveNumber: 2,
pointNumber: 0
});

Plotly.plot(gd, _mock)
.then(run)
.then(function() {
return Plotly.restyle(gd, 'visible', false, [1]);
})
.then(run)
.then(run2)
.catch(fail)
.then(done);
});
Expand Down