Merge pull request #3629 from tsauerwein/snap-xyz

Problems with XYZ coordinates in snap interaction
This commit is contained in:
Tobias Sauerwein
2015-04-27 08:53:34 +02:00
2 changed files with 61 additions and 1 deletions

View File

@@ -583,7 +583,7 @@ ol.interaction.Snap.SegmentDataType;
ol.interaction.Snap.handleEvent_ = function(evt) {
var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
if (result.snapped) {
evt.coordinate = result.vertex;
evt.coordinate = result.vertex.slice(0, 2);
evt.pixel = result.vertexPixel;
}
return ol.interaction.Pointer.handleEvent.call(this, evt);