I have gone through every line of every file that has to do with the TOC and legend and I still can not find the spot where the legend knows a layer has been turned on.
Anyone know where this happens? It is not an event listener since it still works without it somehow.