From 9a4894a328468807e422a768f17a98d99d45cbc5 Mon Sep 17 00:00:00 2001 From: tyr Date: Sat, 24 Aug 2013 15:23:19 +0200 Subject: [PATCH] Fix walkthrough --- js/id/ui/intro.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/id/ui/intro.js b/js/id/ui/intro.js index 7ef4e6723..0ce6c778b 100644 --- a/js/id/ui/intro.js +++ b/js/id/ui/intro.js @@ -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