Skip to content

Commit b90fda1

Browse files
committed
remove opacity transition if _context.staticPlot
1 parent 1cd206f commit b90fda1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/snapshot/helpers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ exports.getDelay = function(fullLayout) {
1515
return (
1616
fullLayout._has('gl3d') ||
1717
fullLayout._has('gl2d') ||
18-
fullLayout._has('sankey') ||
1918
fullLayout._has('mapbox')
2019
) ? 500 : 0;
2120
};

src/traces/sankey/render.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ module.exports = function(gd, svg, calcData, layout, callbacks) {
736736
.attr('d', linkPath());
737737

738738
sankeyLink
739-
.style('opacity', 0)
739+
.style('opacity', function() { return gd._context.staticPlot ? 1 : 0;})
740740
.transition()
741741
.ease(c.ease).duration(c.duration)
742742
.style('opacity', 1);
@@ -775,7 +775,7 @@ module.exports = function(gd, svg, calcData, layout, callbacks) {
775775
.append('g')
776776
.classed(c.cn.sankeyNode, true)
777777
.call(updateNodePositions)
778-
.style('opacity', 0);
778+
.style('opacity', function(n) { return (!gd._context.staticPlot && n.partOfGroup) ? 0 : 1;});
779779

780780
sankeyNode
781781
.call(attachPointerEvents, sankey, callbacks.nodeEvents)

0 commit comments

Comments
 (0)