Use accessor for components
This commit is contained in:
@@ -79,8 +79,9 @@ ol.interaction.Modify.prototype.addIndex_ = function(layer, features) {
|
|||||||
var feature = features[i];
|
var feature = features[i];
|
||||||
var geometry = feature.getGeometry();
|
var geometry = feature.getGeometry();
|
||||||
if (geometry instanceof ol.geom.AbstractCollection) {
|
if (geometry instanceof ol.geom.AbstractCollection) {
|
||||||
for (var j = 0, jj = geometry.components.length; j < jj; ++j) {
|
var components = geometry.getComponents();
|
||||||
this.addSegments_(layer, feature, geometry.components[j]);
|
for (var j = 0, jj = components.length; j < jj; ++j) {
|
||||||
|
this.addSegments_(layer, feature, components[j]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.addSegments_(layer, feature, geometry);
|
this.addSegments_(layer, feature, geometry);
|
||||||
|
|||||||
Reference in New Issue
Block a user