adds a new getVisibility method in the Feature.Vector class, used in the SelectFeature control this method now allows us to tell the select feature box handler wether to select or not the features, r=ahocevar, (Closes #2418)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10064 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -166,6 +166,27 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {
|
||||
}
|
||||
return onScreen;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: getVisibility
|
||||
* Determine whether the feature is displayed or not. It may not displayed
|
||||
* because:
|
||||
* - its style display property is set to 'none',
|
||||
* - it doesn't belong to any layer,
|
||||
* - the styleMap creates a symbolizer with display property set to 'none'
|
||||
* for it,
|
||||
* - the layer which it belongs to is not visible.
|
||||
*
|
||||
* Returns:
|
||||
* {Boolean} The feature is currently displayed.
|
||||
*/
|
||||
getVisibility: function() {
|
||||
return !(this.style && this.style.display == 'none' ||
|
||||
!this.layer ||
|
||||
this.layer && this.layer.styleMap &&
|
||||
this.layer.styleMap.createSymbolizer(this, this.renderIntent).display == 'none' ||
|
||||
this.layer && !this.layer.getVisibility());
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: createMarker
|
||||
|
||||
Reference in New Issue
Block a user