Skip to content

Commit

Permalink
Fixed #19373, map drilldown animation was impossible to disable.
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertkozik authored and TorsteinHonsi committed Aug 21, 2023
1 parent 5ce1355 commit 2b21bd9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
27 changes: 24 additions & 3 deletions samples/unit-tests/maps/drilldown/demo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions ts/Extensions/Drilldown.ts
Expand Up @@ -1777,22 +1777,29 @@ if (MapSeries) {
chart = this.chart,
group = this.group;

if (chart && group && series.options) {
if (
chart &&
group &&
series.options &&
chart.options.drilldown &&
chart.options.drilldown.animation
) {
// Initialize the animation
if (init && chart.mapView) {
group.attr({
opacity: 0.01
});
chart.mapView.allowTransformAnimation = false;
// stop duplicating and overriding animations
// Stop duplicating and overriding animations
series.options.inactiveOtherPoints = true;
series.options.enableMouseTracking = false;

// Run the animation
} else {
group.animate({
opacity: 1
}, (chart.options.drilldown as any).animation,
},
chart.options.drilldown.animation,
function (): void {
if (series.options) {
series.options.inactiveOtherPoints = false;
Expand Down

0 comments on commit 2b21bd9

Please sign in to comment.