Skip to content

Commit 20559c0

Browse files
committed
Fix fill update
1 parent ce01ea7 commit 20559c0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/traces/scattergl/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,9 @@ function plot(container, subplot, cdata) {
781781
}
782782
// fill requires linked traces, so we generate it's positions here
783783
if(scene.fill2d) {
784-
scene.fillOptions.forEach(function(fillOptions, i) {
784+
var fillOptions = scene.fillOptions.map(function(fillOptions, i) {
785785
var cdscatter = cdata[i];
786-
if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return;
786+
if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return {positions: []};
787787
var cd = cdscatter[0];
788788
var trace = cd.trace;
789789
var stash = cd.t;
@@ -863,9 +863,11 @@ function plot(container, subplot, cdata) {
863863

864864
fillOptions.opacity = trace.opacity;
865865
fillOptions.positions = pos;
866+
867+
return fillOptions;
866868
});
867869

868-
scene.fill2d.update(scene.fillOptions);
870+
scene.fill2d.update(fillOptions);
869871
}
870872
}
871873

0 commit comments

Comments
 (0)