Make renderIntent private and add a getter

This commit is contained in:
ahocevar
2013-11-11 22:07:18 +01:00
parent 299d729936
commit 0ed208b710
8 changed files with 24 additions and 13 deletions

View File

@@ -45,8 +45,9 @@ ol.Feature = function(opt_values) {
/**
* The render intent for this feature.
* @type {ol.layer.VectorLayerRenderIntent|string}
* @private
*/
this.renderIntent = ol.layer.VectorLayerRenderIntent.DEFAULT;
this.renderIntent_ = ol.layer.VectorLayerRenderIntent.DEFAULT;
/**
* @type {Array.<ol.style.Symbolizer>}
@@ -175,12 +176,21 @@ ol.Feature.prototype.setGeometry = function(geometry) {
};
/**
* Gets the renderIntent for this feature.
* @return {string} Render intent.
*/
ol.Feature.prototype.getRenderIntent = function() {
return this.renderIntent_;
};
/**
* Changes the renderIntent for this feature.
* @param {string} renderIntent Render intent.
*/
ol.Feature.prototype.setRenderIntent = function(renderIntent) {
this.renderIntent = renderIntent;
this.renderIntent_ = renderIntent;
var geometry = this.getGeometry();
if (!goog.isNull(geometry)) {
this.dispatchEvent(new ol.FeatureEvent(