Skip to content

Commit 0acffce

Browse files
authored
Merge pull request #1407 from ropensci/retain-opacity-0
Properly retain original opacity of 0
2 parents 044afe0 + f3d22ce commit 0acffce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inst/htmlwidgets/plotly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ function TraceManager(graphDiv, highlight) {
533533
// avoid doing this over and over
534534
this.origOpacity = [];
535535
for (var i = 0; i < this.origData.length; i++) {
536-
this.origOpacity[i] = this.origData[i].opacity || 1;
536+
this.origOpacity[i] = this.origData[i].opacity === 0 ? 0 : (this.origData[i].opacity || 1);
537537
}
538538

539539
// key: group name, value: null or array of keys representing the

0 commit comments

Comments
 (0)