make sure the initial hidden state of the legend component matches the v...

...isibility of the layer, this will prevent legends showing up after drag and drop even if the layer itself is not visible