Remove Graph#freeze

This commit is contained in:
Bryan Housel
2015-01-07 11:51:55 -05:00
parent b2ad17f1cb
commit d9f204cf45
2 changed files with 3 additions and 15 deletions

View File

@@ -258,15 +258,9 @@ iD.Graph.prototype = {
arguments[i].call(graph, graph);
}
return this.frozen ? graph.freeze() : this;
},
if (this.frozen) graph.frozen = true;
freeze: function() {
this.frozen = true;
// No longer freezing entities here due to in-place updates needed in rebase.
return this;
return graph;
},
// Obliterates any existing entities

View File

@@ -30,7 +30,7 @@ describe('iD.Graph', function() {
});
it("remains mutable if passed true as second argument", function () {
expect(iD.Graph([], true).frozen).not.to.be.true;
expect(iD.Graph([], true).frozen).to.be.false;
});
});
@@ -58,12 +58,6 @@ describe('iD.Graph', function() {
});
});
describe("#freeze", function () {
it("sets the frozen flag", function () {
expect(iD.Graph([], true).freeze().frozen).to.be.true;
});
});
describe("#rebase", function () {
it("preserves existing entities", function () {
var node = iD.Node({id: 'n'}),