Closed neveldo closed 7 years ago
Hmm, I will check ASAP why my pull-request broke the unit tests pass (don't know if it's related with my update)
Hi @Indigo744 ,
You are right, thanks, I just saw it in the travis log. It's now fixed (I also fixed the conflict)
It is a good fix :) I'll go ahead and squash it to master.
1 - The option "display" should be checked before checking the existence of a container with a class 'cssClass' (otherwise, users are forced to add a legend container even if just want to display a choropleth without displaying the related legend)
2 - I think that, even if the option 'display' is set to true, we shouldn't rise an error if the container doesn't exist. In fact, some user define their own default options along with some default ones for the legend (in order to customize fonts, colors, etc), and they extend their default options object in order to display both legended and non-legended maps. As the 'display' option is set to true by default within mapael, it will raise an error for the non-legended maps in this case.