walkthrough tweaks

This commit is contained in:
Ansis Brammanis
2013-03-27 17:35:05 -04:00
parent 986d7adb4f
commit e4be5cddd9
3 changed files with 11 additions and 9 deletions

View File

@@ -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.**"

View File

@@ -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() {

View File

@@ -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 = '<span>' + parts[0] + '</span>';
var html = parts[0] ? '<span>' + parts[0] + '</span>' : '';
if (parts[1]) html += '<span class="bold">' + parts[1] + '</span>';
tooltip