Skip to content

Commit

Permalink
Fixed #7413, setting drilldown.animation.duration to 0 caused orpha…
Browse files Browse the repository at this point in the history
…ned column shapes after drilling up.
  • Loading branch information
TorsteinHonsi committed Nov 20, 2017
1 parent b910bac commit 26dfbef
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions js/modules/drilldown.src.js
Expand Up @@ -15,7 +15,8 @@ import '../parts/Series.js';
import '../parts/ColumnSeries.js';
import '../parts/Tick.js';

var noop = H.noop,
var animObject = H.animObject,
noop = H.noop,
color = H.color,
defaultOptions = H.defaultOptions,
each = H.each,
Expand Down Expand Up @@ -689,7 +690,7 @@ ColumnSeries.prototype.animateDrillupTo = function (init) {


// Do dummy animation on first point to get to complete
setTimeout(function () {
H.syncTimeout(function () {
if (newSeries.points) { // May be destroyed in the meantime, #3389
each(newSeries.points, function (point, i) {
// Fade in other points
Expand Down Expand Up @@ -723,7 +724,7 @@ ColumnSeries.prototype.animateDrilldown = function (init) {
var series = this,
drilldownLevels = this.chart.drilldownLevels,
animateFrom,
animationOptions = this.chart.options.drilldown.animation,
animationOptions = animObject(this.chart.options.drilldown.animation),
xAxis = this.xAxis;

if (!init) {
Expand Down Expand Up @@ -769,7 +770,7 @@ ColumnSeries.prototype.animateDrilldown = function (init) {
* and animate them into the origin point in the upper series.
*/
ColumnSeries.prototype.animateDrillupFrom = function (level) {
var animationOptions = this.chart.options.drilldown.animation,
var animationOptions = animObject(this.chart.options.drilldown.animation),
group = this.group,
// For 3d column series all columns are added to one group
// so we should not delete the whole group. #5297
Expand Down Expand Up @@ -805,7 +806,7 @@ ColumnSeries.prototype.animateDrillupFrom = function (level) {
animateTo.fill = level.color;
/*= } =*/

if (animationOptions) {
if (animationOptions.duration) {
graphic.animate(
animateTo,
H.merge(animationOptions, { complete: complete })
Expand Down

0 comments on commit 26dfbef

Please sign in to comment.