Skip to content

Commit

Permalink
Fix #424: incorrect opacity on NA entry in legend
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheng5 committed May 4, 2017
1 parent 00bb41c commit ca5eedb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inst/htmlwidgets/leaflet.js
Expand Up @@ -1839,7 +1839,7 @@ methods.addLegend = function (options) {
});

if (options.na_color) {
(0, _jquery2.default)(div).append("<div><i style=\"background:" + options.na_color + "\"></i> " + options.na_label + "</div>");
(0, _jquery2.default)(div).append("<div><i style=\"background:" + options.na_color + ";opacity:" + options.opacity + ";\"></i> " + options.na_label + "</div>");
}
})();
} else {
Expand Down
3 changes: 2 additions & 1 deletion javascript/src/methods.js
Expand Up @@ -774,7 +774,8 @@ methods.addLegend = function(options) {

if (options.na_color) {
$(div).append("<div><i style=\"background:" + options.na_color +
"\"></i> " + options.na_label + "</div>");
";opacity:" + options.opacity +
";\"></i> " + options.na_label + "</div>");
}
} else {
if (options.na_color) {
Expand Down

0 comments on commit ca5eedb

Please sign in to comment.