openlayers/openlayers — pull request #240 by ajkopinga (2012-02-22 16:52:14+00:00)
Title: Fix for selecting from an invisible canvas layer

I found out that it was still possible to select features after setVisibility(false) had been called on a layer that uses the canvas renderer. This is because the hit context canvas is internal to the renderer and therefore doesn't know anything about the main canvas.

My proposed (rather crude) fix is making getFeatureIdFromEvent return undefined when the canvas layer (the root of the renderer) isn't visible by checking if it's set to display:none.