mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Remove Graph#freeze
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'}),
|
||||
|
||||
Reference in New Issue
Block a user