mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 01:33:03 +00:00
Pass entities to actions via id; this allows safe composition of actions that modify the same entity. Fix remaining ghost node cases (#213). Create more logical undo states when drawing.
9 lines
355 B
JavaScript
9 lines
355 B
JavaScript
describe("iD.actions.RemoveWayNode", function () {
|
|
it("removes a node from a way", function () {
|
|
var node = iD.Node({id: "n1"}),
|
|
way = iD.Way({id: "w1", nodes: ["n1"]}),
|
|
graph = iD.actions.RemoveWayNode(way.id, node.id)(iD.Graph({n1: node, w1: way}));
|
|
expect(graph.entity(way.id).nodes).to.eql([]);
|
|
});
|
|
});
|