Initialize properties in the constructor

This commit is contained in:
Éric Lemoine
2014-02-18 23:11:56 +01:00
parent 497a71ca6e
commit aee620d2d9
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ ol.Feature = function(opt_geometryOrValues) {
* @private * @private
* @type {ol.feature.FeatureStyleFunction|undefined} * @type {ol.feature.FeatureStyleFunction|undefined}
*/ */
this.styleFunction_; this.styleFunction_ = undefined;
/** /**
* @private * @private
+3 -3
View File
@@ -40,10 +40,10 @@ ol.layer.Vector = function(opt_options) {
/** /**
* Style function for use within the library. * Style function for use within the library.
* @type {ol.feature.StyleFunction} * @type {ol.feature.StyleFunction|undefined}
* @private * @private
*/ */
this.styleFunction_; this.styleFunction_ = undefined;
if (goog.isDef(options.style)) { if (goog.isDef(options.style)) {
this.setStyle(options.style); this.setStyle(options.style);
@@ -80,7 +80,7 @@ ol.layer.Vector.prototype.getStyle = function() {
/** /**
* Get the style function. * Get the style function.
* @return {ol.feature.StyleFunction} Layer style function. * @return {ol.feature.StyleFunction|undefined} Layer style function.
* @todo stability experimental * @todo stability experimental
*/ */
ol.layer.Vector.prototype.getStyleFunction = function() { ol.layer.Vector.prototype.getStyleFunction = function() {