Use accessor for components

This commit is contained in:
ahocevar
2013-10-05 11:14:11 -06:00
parent c669dda2b1
commit 0e673a492a

View File

@@ -79,8 +79,9 @@ ol.interaction.Modify.prototype.addIndex_ = function(layer, features) {
var feature = features[i];
var geometry = feature.getGeometry();
if (geometry instanceof ol.geom.AbstractCollection) {
for (var j = 0, jj = geometry.components.length; j < jj; ++j) {
this.addSegments_(layer, feature, geometry.components[j]);
var components = geometry.getComponents();
for (var j = 0, jj = components.length; j < jj; ++j) {
this.addSegments_(layer, feature, components[j]);
}
} else {
this.addSegments_(layer, feature, geometry);