Remove useless "geometry" FeatureProperty
This commit is contained in:
+2
-3
@@ -12,7 +12,6 @@ goog.require('ol.style.Style');
|
|||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
ol.FeatureProperty = {
|
ol.FeatureProperty = {
|
||||||
GEOMETRY: 'geometry',
|
|
||||||
STYLE_FUNCTION: 'styleFunction'
|
STYLE_FUNCTION: 'styleFunction'
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -44,7 +43,7 @@ ol.Feature = function(opt_geometryOrValues) {
|
|||||||
* @type {string}
|
* @type {string}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.geometryName_ = ol.FeatureProperty.GEOMETRY;
|
this.geometryName_ = 'geometry';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -59,7 +58,7 @@ ol.Feature = function(opt_geometryOrValues) {
|
|||||||
this.geometryChangeKey_ = null;
|
this.geometryChangeKey_ = null;
|
||||||
|
|
||||||
goog.events.listen(
|
goog.events.listen(
|
||||||
this, ol.Object.getChangeEventType(ol.FeatureProperty.GEOMETRY),
|
this, ol.Object.getChangeEventType(this.geometryName_),
|
||||||
this.handleGeometryChanged_, false, this);
|
this.handleGeometryChanged_, false, this);
|
||||||
goog.events.listen(
|
goog.events.listen(
|
||||||
this, ol.Object.getChangeEventType(ol.FeatureProperty.STYLE_FUNCTION),
|
this, ol.Object.getChangeEventType(ol.FeatureProperty.STYLE_FUNCTION),
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ describe('ol.Feature', function() {
|
|||||||
it('sets the default geometry', function() {
|
it('sets the default geometry', function() {
|
||||||
var feature = new ol.Feature();
|
var feature = new ol.Feature();
|
||||||
feature.setGeometry(point);
|
feature.setGeometry(point);
|
||||||
expect(feature.get(ol.FeatureProperty.GEOMETRY)).to.be(point);
|
expect(feature.get('geometry')).to.be(point);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('replaces previous default geometry', function() {
|
it('replaces previous default geometry', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user