]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Comment explaining hover animation (#6676)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Sat, 2 Nov 2019 13:19:50 +0000 (06:19 -0700)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sat, 2 Nov 2019 13:19:50 +0000 (09:19 -0400)
src/core/core.element.js

index 37fbee1f28ddb78e75922d67cf85e949884b4720..c489985fbb81919cbff632242a57cbdc9f65a7e6 100644 (file)
@@ -81,6 +81,8 @@ helpers.extend(Element.prototype, {
 
                // No animation -> No Transition
                if (!model || ease === 1) {
+                       // _model has to be cloned to _view
+                       // Otherwise, when _model properties are set on hover, _view.* is also set to the same value, and hover animation doesn't occur
                        me._view = helpers.extend({}, model);
                        me._start = null;
                        return me;