Respect geometry stride in modify interaction

This commit is contained in:
Antoine Abt
2014-12-12 11:22:15 +01:00
parent 31f7279de1
commit e7db23761c

View File

@@ -433,6 +433,10 @@ ol.interaction.Modify.prototype.handlePointerDrag = function(evt) {
var segment = segmentData.segment;
var index = dragSegment[1];
while (vertex.length < geometry.getStride()) {
vertex.push(0);
}
switch (geometry.getType()) {
case ol.geom.GeometryType.POINT:
coordinates = vertex;
@@ -588,6 +592,10 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
var index = segmentData.index;
var coordinates;
while (vertex.length < geometry.getStride()) {
vertex.push(0);
}
switch (geometry.getType()) {
case ol.geom.GeometryType.MULTI_LINE_STRING:
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString);