Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding legend items do not work in IE 11 and Edge #36

Closed
dgrechka opened this issue Apr 12, 2016 · 0 comments · Fixed by #37
Closed

Hiding legend items do not work in IE 11 and Edge #36

dgrechka opened this issue Apr 12, 2016 · 0 comments · Fixed by #37

Comments

@dgrechka
Copy link
Contributor

Removing plots causes the following code to execute:

var removeLegendItem = function (i) {
                    var legend = plotLegends[i];
                    plotLegends.splice(i, 1);
                    removeLegend(legend);
                    legend.plot.host.unbind("childrenChanged", childrenChangedHandler);
                    legend.plot.host.unbind("visibleChanged", visibleChangedHandler);
                    if (legend.onLegendRemove) legend.onLegendRemove();
                    legend[0].innerHTML = "";
                    if (isCompact) legend.removeClass("idd-legend-item-compact");
                    else legend.removeClass("idd-legend-item");
                    _jqdiv[0].removeChild(legend[0]);
                    var childDivs = legend.plot.children;
                    childDivs.forEach(function (childPlot) {
                        for (var j = 0, len = plotLegends.length; j < len; j++)
                            if (plotLegends[j].plot === childPlot) {
                                removeLegendItem(plotLegends[j]);
                            }
                    });
                    legend[0].style = "display: none";
                    if (plotLegends.length == 0) divStyle.display = "none";
                };
                for (var i = 0, len = plotLegends.length; i < len; i++)
                    if (plotLegends[i].plot === params.plot) {
                        removeLegendItem(i);
                        break;

The bold line causes error in IE11 and Edge:

SCRIPT5045: Assignment to read-only properties is not allowed in strict mode
idd.js (2177,21)

@dgrechka dgrechka mentioned this issue Apr 12, 2016
@dgrechka dgrechka changed the title Hiding legend items do not wirk in IE 11 and Edge Hiding legend items do not work in IE 11 and Edge Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant