mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-02 13:11:41 +02:00
selection -> selectedIDs
Overloading "selection" is a bad idea.
This commit is contained in:
@@ -34,7 +34,7 @@ describe("iD.behavior.Select", function() {
|
||||
|
||||
specify("click on entity selects the entity", function() {
|
||||
happen.click(context.surface().select('.' + a.id).node());
|
||||
expect(context.selection()).to.eql([a.id]);
|
||||
expect(context.selectedIDs()).to.eql([a.id]);
|
||||
});
|
||||
|
||||
specify("click on empty space clears the selection", function() {
|
||||
@@ -46,13 +46,13 @@ describe("iD.behavior.Select", function() {
|
||||
specify("shift-click on unselected entity adds it to the selection", function() {
|
||||
context.enter(iD.modes.Select(context, [a.id]));
|
||||
happen.click(context.surface().select('.' + b.id).node(), {shiftKey: true});
|
||||
expect(context.selection()).to.eql([a.id, b.id]);
|
||||
expect(context.selectedIDs()).to.eql([a.id, b.id]);
|
||||
});
|
||||
|
||||
specify("shift-click on selected entity removes it from the selection", function() {
|
||||
context.enter(iD.modes.Select(context, [a.id, b.id]));
|
||||
happen.click(context.surface().select('.' + b.id).node(), {shiftKey: true});
|
||||
expect(context.selection()).to.eql([a.id]);
|
||||
expect(context.selectedIDs()).to.eql([a.id]);
|
||||
});
|
||||
|
||||
specify("shift-click on last selected entity clears the selection", function() {
|
||||
@@ -64,6 +64,6 @@ describe("iD.behavior.Select", function() {
|
||||
specify("shift-click on empty space leaves the selection unchanged", function() {
|
||||
context.enter(iD.modes.Select(context, [a.id]));
|
||||
happen.click(context.surface().node(), {shiftKey: true});
|
||||
expect(context.selection()).to.eql([a.id]);
|
||||
expect(context.selectedIDs()).to.eql([a.id]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user