8000 Fix race condition in animation resolution by rreusser · Pull Request #1108 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix race condition in animation resolution #1108

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 7 commits into from
Nov 10, 2016
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
Prev Previous commit
Fix a broken animation test
  • Loading branch information
rreusser committed Nov 9, 2016
commit c100d6ccbbbce2d904590b5af11c5c5dda4f6514
7 changes: 5 additions & 2 deletions test/jasmine/tests/animate_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,10 +593,11 @@ describe('Animate API details', function() {

var gd;
var dur = 30;
var mockCopy;

beforeEach(function(done) {
gd = createGraphDiv();
var mockCopy = Lib.extendDeep({}, mock);
mockCopy = Lib.extendDeep({}, mock);
Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(done);
});

Expand Down Expand Up @@ -685,7 +686,9 @@ describe('Animate API details', function() {
var cnt = 0;
gd.on('plotly_animatingframe', function() {cnt++;});

Plotly.animate(gd, ['frame0', null, undefined], {transition: {duration: 0}, frame: {duration: 0}}).then(function() {
Plotly.addFrames(gd, mockCopy.frames).then(function() {
return Plotly.animate(gd, ['frame0', null, undefined], {transition: {duration: 0}, frame: {duration: 0}});
}).then(function() {
// Check only one animating was fired:
expect(cnt).toEqual(1);

Expand Down
0