8000 Improved animation merging for layout and traces by rreusser · Pull Request #1041 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Improved animation merging for layout and traces #1041

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 9 commits into from
Oct 17, 2016
Next Next commit
Add failing test fro transition transform
  • Loading branch information
rreusser committed Oct 14, 2016
commit 0e86edd43d3cc59f80d2406a80672d51b778ff7b
35 changes: 35 additions & 0 deletions test/jasmine/tests/transition_test.js
A587
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,41 @@ function runTests(transitionDuration) {
}).catch(fail).then(done);
});

it('transitions a transform', function(done) {
Plotly.restyle(gd, {
'transforms[0]': {
enabled: true,
type: 'filter',
operation: '<',
filtersrc: 'x',
value: 10
}
}, [0]).then(function() {
expect(gd._fullData[0].transforms).toEqual([{
enabled: true,
type: 'filter',
operation: '<',
filtersrc: 'x',
value: 10
}]);

return Plots.transition(gd, [{
'transforms[0].operation': '>'
}], null, [0],
{redraw: true, duration: transitionDuration},
{duration: transitionDuration, easing: 'cubic-in-out'}
);
}).then(function() {
expect(gd._fullData[0].transforms).toEqual([{
enabled: true,
type: 'filter',
operation: '>',
filtersrc: 'x',
value: 10
}]);
}).catch(fail).then(done);
});

// This doesn't really test anything that the above tests don't cover, but it combines
// the behavior and attempts to ensure chaining and events happen in the correct order.
it('transitions may be chained', function(done) {
Expand Down
0