mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-27 16:03:52 +00:00
Fix way dragging distortion. Fixes #258
This commit is contained in:
@@ -19,13 +19,14 @@ iD.modes.Select = function (entity) {
|
||||
mode.history.perform(iD.actions.Noop());
|
||||
}
|
||||
|
||||
entity.nodes.forEach(function(n) {
|
||||
var node = mode.history.graph().entity(n.id),
|
||||
_.uniq(_.pluck(entity.nodes, 'id'))
|
||||
.forEach(function(id) {
|
||||
var node = mode.history.graph().entity(id),
|
||||
start = mode.map.projection(node.loc),
|
||||
end = mode.map.projection.invert([
|
||||
start[0] + d3.event.dx,
|
||||
start[1] + d3.event.dy]);
|
||||
mode.history.replace(iD.actions.Move(node.id, end));
|
||||
start[0] + d3.event.dx,
|
||||
start[1] + d3.event.dy]);
|
||||
mode.history.replace(iD.actions.Move(id, end));
|
||||
});
|
||||
})
|
||||
.on('dragend', function () {
|
||||
|
||||
Reference in New Issue
Block a user