From e4be5cddd98b753d319cbe1ce441e6662abcd772 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Wed, 27 Mar 2013 17:35:05 -0400 Subject: [PATCH] walkthrough tweaks --- data/intro.yaml | 2 +- js/id/ui/intro/point.js | 10 ++++++---- js/lib/d3.curtain.js | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/data/intro.yaml b/data/intro.yaml index 2fe30ff28..34b71011d 100644 --- a/data/intro.yaml +++ b/data/intro.yaml @@ -12,7 +12,7 @@ en: search: "There many different features that can be represented by points. The point you just added is a Cafe. **Search for 'Cafe' **" choose: "**Choose Cafe from the grid.**" describe: "The point is now marked as a cafe. Using the feature editor, we can add more information about the feature. **Add a name**" - close: "The feature editor can be closed by clicking on the close button, or anywhere on the map. **Close the feature editor**" + close: "The feature editor can be closed by clicking on the close button. **Close the feature editor**" reselect: "Often points will already exist, but have mistakes or be incomplete. We can edit existing points. **Select the point you just created.**" fixname: "**Change the name and close the feature editor.**" reselect_delete: "All features on the map can be deleted. **Reselect the point you created.**" diff --git a/js/id/ui/intro/point.js b/js/id/ui/intro/point.js index 3859f407e..54a0bb82b 100644 --- a/js/id/ui/intro/point.js +++ b/js/id/ui/intro/point.js @@ -48,16 +48,18 @@ iD.ui.intro.point = function(context, reveal) { function keySearch() { var first = d3.select('.grid-button-wrap:first-child'); if (first.datum().id === 'amenity/cafe') { - d3.select('.preset-grid-search').on('keyup.intro', null); + d3.select('.preset-grid-search').on('keyup.intro', null).node().blur(); reveal(first.select('.grid-entry').node(), 'intro.points.choose'); d3.selection.prototype.one.call(context.history(), 'change.intro', selectedPreset); } } function selectedPreset() { - reveal('.grid-pane', 'intro.points.describe'); - context.history().on('change.intro', closeEditor); - context.on('exit.intro', selectPoint); + setTimeout(function() { + reveal('.tag-wrap', 'intro.points.describe'); + context.history().on('change.intro', closeEditor); + context.on('exit.intro', selectPoint); + }, 400); } function closeEditor() { diff --git a/js/lib/d3.curtain.js b/js/lib/d3.curtain.js index e1723b000..96ad99cf1 100644 --- a/js/lib/d3.curtain.js +++ b/js/lib/d3.curtain.js @@ -31,11 +31,11 @@ d3.curtain = function() { }); d3.select(window).on('resize.curtain', function() { - var size = { + surface.attr({ width: window.innerWidth, height: window.innerHeight - }; - surface.attr(size); + }); + curtain.cut(darkness.datum()); }); tooltip = selection.append('div') @@ -82,7 +82,7 @@ d3.curtain = function() { // pseudo markdown bold text hack var parts = text.split('**'); - var html = '' + parts[0] + ''; + var html = parts[0] ? '' + parts[0] + '' : ''; if (parts[1]) html += '' + parts[1] + ''; tooltip