mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Merge pull request #1739 from tyrasd/patch-1737
Fix loading graph of unserialized objects. Fixes walkthrough
This commit is contained in:
@@ -12,12 +12,18 @@ iD.ui.intro = function(context) {
|
||||
background = context.background().baseLayerSource(),
|
||||
opacity = d3.select('.background-layer').style('opacity'),
|
||||
loadedTiles = context.connection().loadedTiles(),
|
||||
baseEntities = context.history().graph().base().entities;
|
||||
baseEntities = context.history().graph().base().entities,
|
||||
introGraph;
|
||||
|
||||
// Load semi-real data used in intro
|
||||
context.connection().toggle(false).flush();
|
||||
context.history().save().reset();
|
||||
context.history().merge(iD.Graph().load(JSON.parse(iD.introGraph)).entities);
|
||||
|
||||
introGraph = JSON.parse(iD.introGraph);
|
||||
for (var key in introGraph) {
|
||||
introGraph[key] = iD.Entity(introGraph[key]);
|
||||
}
|
||||
context.history().merge(iD.Graph().load(introGraph).entities);
|
||||
context.background().bing();
|
||||
|
||||
// Block saving
|
||||
|
||||
Reference in New Issue
Block a user