]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Support hover animation duration during updates (#4300)
authorRicardo Costa <ricardocosta89@users.noreply.github.com>
Sun, 11 Jun 2017 16:06:39 +0000 (17:06 +0100)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sun, 11 Jun 2017 16:06:39 +0000 (12:06 -0400)
commit009ae4dec6db9d8b94a77cad3dffbf907e720ad4
treeecf50d46afec8ff9a7a1a53aec2970759e2bc646
parent5e581148486c310ff96c777e32701dcae3df8a57
Support hover animation duration during updates (#4300)

See discussion in the issue for context and possible approaches.

When invoking update() inside an event handler, such as onHover,
`options.hover.animationDuration` was not being respected. Given that
some use cases may require additional animation properties for the
manual update call, this commit changes that method signature to accept
a configuration object.

This object provides backwards compatibility with duration and lazy
properties, and also introduces the easing property so that the event
animation is different from the global one.

Add tests that guarantee that when update is called manually with
arguments, it properly builds the _bufferedRequest or calls render with
the proper arguments.
It includes test cases for when update is called with legacy arguments
(duration and lazy) instead of the config object.

.update() documentation was previously updated but .render() was left
out. Since the backwards compatible change was also made to render(),
this commit adds documentation for it.
docs/developers/api.md
src/core/core.controller.js
test/specs/core.controller.tests.js
test/specs/global.deprecations.tests.js