Fix for being able to select a feature from an invisible layer that uses the Canvas renderer
This commit is contained in:
@@ -787,6 +787,10 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
|
|||||||
*/
|
*/
|
||||||
getFeatureIdFromEvent: function(evt) {
|
getFeatureIdFromEvent: function(evt) {
|
||||||
var featureId, feature;
|
var featureId, feature;
|
||||||
|
|
||||||
|
// if the drawing canvas isn't visible, return undefined.
|
||||||
|
if (this.root.style.display === "none") return feature;
|
||||||
|
|
||||||
if (this.hitDetection) {
|
if (this.hitDetection) {
|
||||||
// this dragging check should go in the feature handler
|
// this dragging check should go in the feature handler
|
||||||
if (!this.map.dragging) {
|
if (!this.map.dragging) {
|
||||||
|
|||||||
Reference in New Issue
Block a user