selection -> selectedIDs

Overloading "selection" is a bad idea.
This commit is contained in:
John Firebaugh
2013-06-03 15:47:13 -07:00
parent eebd9aa030
commit a84a3364cc
23 changed files with 82 additions and 82 deletions
+4 -4
View File
@@ -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]);
});
});