Merge branch 'master' of github.com:systemed/iD

This commit is contained in:
Tom MacWright
2013-03-27 16:07:30 -04:00
14 changed files with 111 additions and 146 deletions
+35 -18
View File
@@ -215,9 +215,11 @@ ul.toggle-list li a {
text-overflow:ellipsis;
overflow:hidden;
}
ul.toggle-list li a:focus,
ul.toggle-list li a:hover { background-color: #ececec;}
ul.toggle-list li a.selected { background-color: #e8ebff;}
ul.link-list li {
display: inline-block;
float: right;
@@ -1037,6 +1039,7 @@ input[type=number] {
.checkselect label:hover {
cursor: pointer;
cursor: url(../img/cursor-pointer.png) 6 1, pointer;
background: #f1f1f1;
}
@@ -1170,6 +1173,7 @@ div.combobox {
padding: 5px;
width: 100%;
cursor: pointer;
cursor: url(../img/cursor-pointer.png) 6 1, pointer;
display: block;
text-align: center;
}
@@ -1473,6 +1477,7 @@ img.wiki-image {
display: block;
float: left;
cursor: pointer;
cursor: url(../img/cursor-pointer.png) 6 1, pointer;
}
.opacity-options li .select-box{
@@ -1739,6 +1744,7 @@ div.typeahead a {
height: 30px;
line-height: 30px;
cursor: pointer;
cursor: url(../img/cursor-pointer.png) 6 1, pointer;
display: block;
border-top:1px solid #ccc;
background-color: #fff;
@@ -1979,6 +1985,8 @@ div.typeahead a:first-child {
position: absolute;
display: none;
color:#333;
text-align: left;
font-size: 12px;
}
.tooltip.in {
@@ -1989,29 +1997,26 @@ div.typeahead a:first-child {
}
.tooltip.top {
margin-top: -10px;
margin-top: -20px;
text-align: center;
}
.tooltip.right {
margin-left: 10px;
text-align: left;
margin-left: 20px;
}
.tooltip.bottom {
margin-top: 10px;
margin-top: 20px;
text-align: center;
}
.tooltip.left {
margin-left: -10px;
text-align: right;
margin-left: -20px;
}
.tooltip-inner {
display: inline-block;
padding: 10px;
font-size: 12px;
font-weight: normal;
background-color: white;
}
@@ -2106,6 +2111,7 @@ div.typeahead a:first-child {
.add-point .tooltip {
left: -20px !important; }
.add-point .tooltip .tooltip-arrow {
left: 60px;
}
@@ -2215,6 +2221,7 @@ div.typeahead a:first-child {
/* Scrollbars
----------------------------------------------------- */
::-webkit-scrollbar {
height: 20px;
overflow: visible;
@@ -2265,7 +2272,8 @@ div.typeahead a:first-child {
background: transparent
}
/* Intro */
/* Intro walkthrough
----------------------------------------------------- */
.curtain-darkness {
fill-opacity: 0.7;
@@ -2288,28 +2296,37 @@ div.typeahead a:first-child {
background: #76FF70;
}
.intro-nav-wrap button.step.finished h3 {
color: #269C21;
.curtain-tooltip .tooltip-inner {
text-align: left;
padding: 20px;
}
.intro-nav-wrap button.step h3 {
font-weight: normal;
}
.curtain-tooltip.left .tooltip-arrow,
.curtain-tooltip.right .tooltip-arrow {
top: 0;
top: -5px;
}
.curtain-tooltip.right .tooltip-inner,
.curtain-tooltip.left .tooltip-inner {
margin-top: -50%;
margin-top: -30%;
}
.curtain-tooltip .tooltip-inner {
font-size: 14px;
font-weight: normal;
font-size: 15px;
}
.curtain-tooltip .tooltip-inner .bold {
font-weight: bold;
display: block;
border-top: 1px solid #CCC;
margin-top: 10px;
margin-left: -20px;
margin-right: -20px;
padding: 10px 20px 0 20px;
}
.curtain-tooltip .tooltip-inner .bold:only-child {
border: 0;
padding: 0;
margin: 0;
}
+1 -1
View File
@@ -861,7 +861,7 @@ text.point {
#map .line:active,
#map .area:active,
#map .midpoint:active,
.mode-select .selected {
#map .mode-select .selected {
cursor: url(../img/cursor-select-acting.png), pointer;
}
+3 -3
View File
@@ -1,6 +1,6 @@
en:
intro:
navigation:
navigation:
drag: "The main map area shows OpenStreetMap data on top of background imagery. You can navigate by dragging and scrolling, just like any web map. **Drag the map!**"
select: "Map features can be represented three ways: using points, lines or areas. All features can be selected by clicking on them. **Click on the point to select it.**"
header: "The header shows us the feature type."
@@ -11,9 +11,9 @@ en:
place: "The point can be placed by clicking on the map. **Place the point on top of the building.**"
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 and address**"
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**"
reselect: "Often points will already exist, but have mistakes or be incomplete. We can edit existing points. **Select the point you just created.**"
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.**"
delete: "The menu around the point contains operations that can be performed on it, including delete. **Delete the point.**"
+14 -61
View File
@@ -13,7 +13,7 @@
height="320"
id="svg12393"
version="1.1"
inkscape:version="0.48.1 r9760"
inkscape:version="0.48.2 r9819"
sodipodi:docname="sprite.svg"
inkscape:export-filename="/Users/saman/work_repos/iD/img/sprite.png"
inkscape:export-xdpi="90"
@@ -39,11 +39,11 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="219.96873"
inkscape:cy="105.14154"
inkscape:cx="30.966568"
inkscape:cy="129.65104"
inkscape:document-units="px"
inkscape:current-layer="layer12"
showgrid="true"
showgrid="false"
inkscape:window-width="1483"
inkscape:window-height="804"
inkscape:window-x="131"
@@ -417,19 +417,7 @@
height="15.000003"
width="15.000003"
id="rect7407"
style="color:#000000;fill:#f7f7f7;fill-opacity:1;stroke:#b0b0b0;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/Users/saman/work_repos/iD/img/source/layerswitcher-expanded.png"
ry="9.5"
rx="9.5"
y="315.5"
x="85.5"
height="9.0000029"
width="9.0000029"
id="rect7542"
style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
style="color:#000000;fill:#e2e9ff;fill-opacity:1;stroke:#e2e9ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
<g
transform="translate(-35,-90.000001)"
@@ -446,21 +434,9 @@
height="15"
width="15"
id="rect7320-0"
style="color:#000000;fill:#aaaaaa;fill-opacity:1;fill-rule:nonzero;stroke:#aaaaaa;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
style="color:#000000;fill:#e2e9ff;fill-opacity:1;fill-rule:nonzero;stroke:#e2e9ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/Users/saman/work_repos/iD/img/source/layerswitcher-expanded.png"
style="color:#000000;fill:#f7f7f7;fill-opacity:1;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect7439-7"
width="14"
height="14"
x="83"
y="273"
rx="9.5"
ry="9.5" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#bbcaff;fill-opacity:1;stroke:none;stroke-width:0.99999987999999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect32489"
width="10.000001"
height="10.000001"
@@ -482,14 +458,14 @@
height="8"
width="8"
id="rect7681-6"
style="color:#000000;fill:#e7e7e7;fill-opacity:1;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
style="color:#000000;fill:#bbcaff;fill-opacity:1;stroke:none;stroke-width:0.99999987999999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
<g
id="g35608"
style="display:inline"
transform="translate(-15,-90.000001)">
<rect
style="color:#000000;fill:#f7f7f7;fill-opacity:1;fill-rule:nonzero;stroke:#222222;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#e2e9ff;fill-opacity:1;fill-rule:nonzero;stroke:#e2e9ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect35610"
width="15"
height="15"
@@ -500,18 +476,6 @@
inkscape:export-filename="/Users/saman/work_repos/iD/img/source/layerswitcher-expanded.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
ry="9.5"
rx="9.5"
y="273"
x="83"
height="14"
width="14"
id="rect35612"
style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:export-filename="/Users/saman/work_repos/iD/img/source/layerswitcher-expanded.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
@@ -525,7 +489,7 @@
id="rect35614"
style="color:#000000;fill:#e2e9ff;fill-opacity:1;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<rect
style="color:#000000;fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#7092ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect35616"
width="10"
height="10"
@@ -2343,21 +2307,10 @@
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#e06d5f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:12;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
</g>
<path
sodipodi:type="arc"
style="color:#000000;fill:none;stroke:#7092ff;stroke-width:11.66666508;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path4227"
sodipodi:cx="450"
sodipodi:cy="270"
sodipodi:rx="35"
sodipodi:ry="35"
d="m 485,270 c 0,19.32997 -15.67003,35 -35,35 -19.32997,0 -35,-15.67003 -35,-35 0,-19.32997 15.67003,-35 35,-35 19.32997,0 35,15.67003 35,35 z"
transform="matrix(0.85714295,0,0,0.85714295,89.285677,38.571404)" />
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
id="path4233"
d="m 482,228 3,0 12,12 -12,12 -3,0 -2,-2 0,-20 z"
style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#7092ff;fill-opacity:1;stroke:none;stroke-width:11.66666508;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
d="M 450 235 C 430.72926 235 415 250.72926 415 270 C 415 289.27074 430.72926 305 450 305 C 469.27075 305 485 289.27074 485 270 C 485 258.33433 479.23332 247.9627 470.40625 241.59375 L 463.21875 248.78125 C 470.3012 253.17882 475 260.99881 475 270 C 475 283.86634 463.86635 295 450 295 C 436.13366 295 425 283.86634 425 270 C 425 256.13366 436.13366 245 450 245 C 451.71227 245 453.38712 245.17652 455 245.5 L 455 235.375 C 453.36389 235.13858 451.69943 235 450 235 z "
transform="translate(25,-3.0624999e-6)"
id="path4227" />
<path
style="color:#000000;fill:#7092ff;fill-opacity:1;stroke:none;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 475,228 3,0 12,12 -12,12 -3,0 -2,-2 0,-20 z"

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 152 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

-7
View File
@@ -116,9 +116,6 @@ iD.ui.Background = function(context) {
.placement('right')
);
layerInner.insert('span')
.attr('class', 'icon toggle icon-pre-text');
layerInner.insert('span').text(function(d) {
return d.data.name;
});
@@ -218,10 +215,6 @@ iD.ui.Background = function(context) {
.placement('right'))
.on('click.set-gpx', clickGpx);
gpxLayerItem
.append('span')
.attr('class', 'icon toggle icon-pre-text');
gpxLayerItem.append('span')
.text(t('gpx.local_layer'));
+5 -1
View File
@@ -28,8 +28,12 @@ iD.ui.intro = function(context) {
var curtain = d3.curtain();
selection.call(curtain);
function reveal(box, textid, duration) {
curtain.reveal(box, t(textid), textid.replace(/\./g, '-'), duration);
}
var steps = ['navigation', 'point', 'area', 'line', 'startEditing'].map(function(step, i) {
var s = iD.ui.intro[step](context, curtain)
var s = iD.ui.intro[step](context, reveal)
.on('done', function() {
entered.filter(function(d) {
return d.name === s.name;
+9 -9
View File
@@ -1,4 +1,4 @@
iD.ui.intro.area = function(context, curtain) {
iD.ui.intro.area = function(context, reveal) {
var event = d3.dispatch('done'),
timeout;
@@ -12,7 +12,7 @@ iD.ui.intro.area = function(context, curtain) {
var playground = [-85.63552, 41.94159],
corner = [-85.63565411045074, 41.9417715536927];
context.map().centerZoom(playground, 19);
curtain.reveal('button.add-area', t('intro.areas.add'));
reveal('button.add-area', 'intro.areas.add');
context.on('enter.intro', addArea);
@@ -22,12 +22,12 @@ iD.ui.intro.area = function(context, curtain) {
var padding = 120 * Math.pow(2, context.map().zoom() - 19);
var pointBox = iD.ui.intro.pad(context.projection(corner), padding);
curtain.reveal(pointBox, t('intro.areas.corner'));
reveal(pointBox, 'intro.areas.corner');
context.map().on('move.intro', function() {
padding = 120 * Math.pow(2, context.map().zoom() - 19);
pointBox = iD.ui.intro.pad(context.projection(corner), padding);
curtain.reveal(pointBox, t('intro.areas.corner'), 0);
reveal(pointBox, 'intro.areas.corner', 0);
});
}
@@ -37,12 +37,12 @@ iD.ui.intro.area = function(context, curtain) {
var padding = 150 * Math.pow(2, context.map().zoom() - 19);
var pointBox = iD.ui.intro.pad(context.projection(playground), padding);
curtain.reveal(pointBox, t('intro.areas.place'));
reveal(pointBox, 'intro.areas.place');
context.map().on('move.intro', function() {
padding = 150 * Math.pow(2, context.map().zoom() - 19);
pointBox = iD.ui.intro.pad(context.projection(playground), padding);
curtain.reveal(pointBox, t('intro.areas.place'), 0);
reveal(pointBox, 'intro.areas.place', 0);
});
}
@@ -52,7 +52,7 @@ iD.ui.intro.area = function(context, curtain) {
context.on('enter.intro', null);
timeout = setTimeout(function() {
curtain.reveal('.preset-grid-search', t('intro.areas.search'));
reveal('.preset-grid-search', 'intro.areas.search');
d3.select('.preset-grid-search').on('keyup.intro', keySearch);
}, 500);
}
@@ -60,14 +60,14 @@ iD.ui.intro.area = function(context, curtain) {
function keySearch() {
var first = d3.select('.grid-button-wrap:first-child');
if (first.datum().id === 'leisure/playground') {
curtain.reveal(first.select('.grid-entry').node(), t('intro.areas.choose'));
reveal(first.select('.grid-entry').node(), 'intro.areas.choose');
d3.selection.prototype.one.call(context.history(), 'change.intro', selectedPreset);
d3.select('.preset-grid-search').on('keyup.intro', null);
}
}
function selectedPreset() {
curtain.reveal('.pane', t('intro.areas.describe'));
reveal('.pane', 'intro.areas.describe');
context.on('exit.intro', event.done);
}
+14 -15
View File
@@ -1,4 +1,4 @@
iD.ui.intro.line = function(context, curtain) {
iD.ui.intro.line = function(context, reveal) {
var event = d3.dispatch('done'),
timeouts = [];
@@ -22,8 +22,8 @@ iD.ui.intro.line = function(context, curtain) {
var start = [-85.6297754121684, 41.9583158176903];
var intersection = [-85.62974496187628, 41.95742515554585];
context.map().centerZoom(start, 19);
curtain.reveal('button.add-line', t('intro.lines.add'));
context.map().centerZoom(start, 18);
reveal('button.add-line', 'intro.lines.add');
context.on('enter.intro', addLine);
@@ -31,14 +31,14 @@ iD.ui.intro.line = function(context, curtain) {
if (mode.id !== 'add-line') return;
context.on('enter.intro', drawLine);
var padding = 150 * Math.pow(2, context.map().zoom() - 19);
var padding = 150 * Math.pow(2, context.map().zoom() - 18);
var pointBox = iD.ui.intro.pad(context.projection(start), padding);
curtain.reveal(pointBox, t('intro.lines.start'));
reveal(pointBox, 'intro.lines.start');
context.map().on('move.intro', function() {
padding = 150 * Math.pow(2, context.map().zoom() - 19);
padding = 150 * Math.pow(2, context.map().zoom() - 18);
pointBox = iD.ui.intro.pad(context.projection(start), padding);
curtain.reveal(pointBox, t('intro.lines.start'), 0);
reveal(pointBox, 'intro.lines.start', 0);
});
}
function drawLine (mode) {
@@ -48,12 +48,12 @@ iD.ui.intro.line = function(context, curtain) {
var padding = 300 * Math.pow(2, context.map().zoom() - 19);
var pointBox = iD.ui.intro.pad(context.projection(midpoint), padding);
curtain.reveal(pointBox, t('intro.lines.intersect'));
reveal(pointBox, 'intro.lines.intersect');
context.map().on('move.intro', function() {
padding = 300 * Math.pow(2, context.map().zoom() - 19);
pointBox = iD.ui.intro.pad(context.projection(midpoint), padding);
curtain.reveal(pointBox, t('intro.lines.intersect'), 0);
reveal(pointBox, 'intro.lines.intersect', 0);
});
}
@@ -66,12 +66,12 @@ iD.ui.intro.line = function(context, curtain) {
var padding = 900 * Math.pow(2, context.map().zoom() - 19);
var pointBox = iD.ui.intro.pad(context.projection(centroid), padding);
curtain.reveal(pointBox, t('intro.lines.finish'));
reveal(pointBox, 'intro.lines.finish');
context.map().on('move.intro', function() {
padding = 900 * Math.pow(2, context.map().zoom() - 19);
pointBox = iD.ui.intro.pad(context.projection(centroid), padding);
curtain.reveal(pointBox, t('intro.lines.finish'), 0);
reveal(pointBox, 'intro.lines.finish', 0);
});
}
}
@@ -85,7 +85,7 @@ iD.ui.intro.line = function(context, curtain) {
var road = d3.select('.preset-grid .grid-entry').filter(function(d) {
return d.id === 'Road';
});
curtain.reveal(road.node(), t('intro.lines.road'));
reveal(road.node(), 'intro.lines.road');
road.one('click.intro', roadCategory);
}, 500);
}
@@ -93,7 +93,7 @@ iD.ui.intro.line = function(context, curtain) {
function roadCategory() {
timeout(function() {
var grid = d3.select('.subgrid');
curtain.reveal(grid.node(), t('intro.lines.residential'));
reveal(grid.node(), 'intro.lines.residential');
grid.selectAll('.grid-entry').filter(function(d) {
return d.id === 'highway/residential';
}).one('click.intro', roadDetails);
@@ -101,7 +101,7 @@ iD.ui.intro.line = function(context, curtain) {
}
function roadDetails() {
curtain.reveal('.pane', t('intro.lines.describe'));
reveal('.pane', 'intro.lines.describe');
context.on('exit.intro', event.done);
}
@@ -113,7 +113,6 @@ iD.ui.intro.line = function(context, curtain) {
context.on('exit.intro', null);
context.map().on('move.intro', null);
context.history().on('change.intro', null);
curtain.hide();
};
return d3.rebind(step, event, 'on');
+6 -6
View File
@@ -1,4 +1,4 @@
iD.ui.intro.navigation = function(context, curtain) {
iD.ui.intro.navigation = function(context, reveal) {
var event = d3.dispatch('done'),
timeouts = [];
@@ -32,7 +32,7 @@ iD.ui.intro.navigation = function(context, curtain) {
context.map().centerZoom([-85.63591, 41.94285], 19);
curtain.reveal(map, t('intro.navigation.drag'));
reveal(map, 'intro.navigation.drag');
context.map().on('move.intro', _.debounce(function() {
context.map().on('move.intro', null);
@@ -43,12 +43,12 @@ iD.ui.intro.navigation = function(context, curtain) {
function townhall() {
var hall = d3.select('.node.tag-amenity-townhall');
var box = iD.ui.intro.pointBox(context.projection(hall.datum().loc));
curtain.reveal(box, t('intro.navigation.select'));
reveal(box, 'intro.navigation.select');
context.map().on('move.intro', function() {
var hall = d3.select('.node.tag-amenity-townhall');
var box = iD.ui.intro.pointBox(context.projection(hall.datum().loc));
curtain.reveal(box, t('intro.navigation.select'), 0);
reveal(box, 'intro.navigation.select', 0);
});
}
@@ -56,8 +56,8 @@ iD.ui.intro.navigation = function(context, curtain) {
if (mode.id !== 'select') return;
context.on('enter.intro', null);
context.map().on('move.intro', null);
set(function() { curtain.reveal('.header', t('intro.navigation.header')); }, 700);
set(function() { curtain.reveal('.tag-wrap', t('intro.navigation.pane')); }, 4000);
set(function() { reveal('.header', 'intro.navigation.header'); }, 700);
set(function() { reveal('.tag-wrap', 'intro.navigation.pane'); }, 4000);
set(event.done, 7000);
}
+14 -14
View File
@@ -1,4 +1,4 @@
iD.ui.intro.point = function(context, curtain) {
iD.ui.intro.point = function(context, reveal) {
var event = d3.dispatch('done'),
timeouts = [];
@@ -14,7 +14,7 @@ iD.ui.intro.point = function(context, curtain) {
step.enter = function() {
context.map().centerZoom([-85.63279, 41.94394], 19);
curtain.reveal('button.add-point', t('intro.points.add'));
reveal('button.add-point', 'intro.points.add');
var corner = [-85.632481,41.944094];
@@ -25,11 +25,11 @@ iD.ui.intro.point = function(context, curtain) {
context.on('enter.intro', enterSelect);
var pointBox = iD.ui.intro.pad(context.projection(corner), 150);
curtain.reveal(pointBox, t('intro.points.place'));
reveal(pointBox, 'intro.points.place');
context.map().on('move.intro', function() {
pointBox = iD.ui.intro.pad(context.projection(corner), 150);
curtain.reveal(pointBox, t('intro.points.place'), 0);
reveal(pointBox, 'intro.points.place', 0);
});
}
@@ -40,7 +40,7 @@ iD.ui.intro.point = function(context, curtain) {
context.on('enter.intro', null);
setTimeout(function() {
curtain.reveal('.preset-grid-search', t('intro.points.search'));
reveal('.preset-grid-search', 'intro.points.search');
d3.select('.preset-grid-search').on('keyup.intro', keySearch);
}, 500);
}
@@ -49,20 +49,20 @@ iD.ui.intro.point = function(context, curtain) {
var first = d3.select('.grid-button-wrap:first-child');
if (first.datum().id === 'amenity/cafe') {
d3.select('.preset-grid-search').on('keyup.intro', null);
curtain.reveal(first.select('.grid-entry').node(), t('intro.points.choose'));
reveal(first.select('.grid-entry').node(), 'intro.points.choose');
d3.selection.prototype.one.call(context.history(), 'change.intro', selectedPreset);
}
}
function selectedPreset() {
curtain.reveal('.grid-pane', t('intro.points.describe'));
reveal('.grid-pane', 'intro.points.describe');
context.history().on('change.intro', closeEditor);
context.on('exit.intro', selectPoint);
}
function closeEditor() {
context.history().on('change.intro', null);
curtain.reveal('.tag-pane', t('intro.points.close'));
reveal('.tag-pane', 'intro.points.close');
}
function selectPoint() {
@@ -71,11 +71,11 @@ iD.ui.intro.point = function(context, curtain) {
context.on('enter.intro', enterReselect);
var pointBox = iD.ui.intro.pad(context.projection(corner), 150);
curtain.reveal(pointBox, t('intro.points.reselect'));
reveal(pointBox, 'intro.points.reselect');
context.map().on('move.intro', function() {
pointBox = iD.ui.intro.pad(context.projection(corner), 150);
curtain.reveal(pointBox, t('intro.points.reselect'), 0);
reveal(pointBox, 'intro.points.reselect', 0);
});
}
@@ -85,7 +85,7 @@ iD.ui.intro.point = function(context, curtain) {
context.on('enter.intro', null);
setTimeout(function() {
curtain.reveal('.tag-pane', t('intro.points.fixname'));
reveal('.tag-pane', 'intro.points.fixname');
context.on('exit.intro', deletePoint);
}, 500);
}
@@ -95,11 +95,11 @@ iD.ui.intro.point = function(context, curtain) {
context.on('enter.intro', enterDelete);
var pointBox = iD.ui.intro.pad(context.projection(corner), 150);
curtain.reveal(pointBox, t('intro.points.reselect_delete'));
reveal(pointBox, 'intro.points.reselect_delete');
context.map().on('move.intro', function() {
pointBox = iD.ui.intro.pad(context.projection(corner), 150);
curtain.reveal(pointBox, t('intro.points.reselect_delete'), 0);
reveal(pointBox, 'intro.points.reselect_delete', 0);
});
}
@@ -114,7 +114,7 @@ iD.ui.intro.point = function(context, curtain) {
setTimeout(function() {
var node = d3.select('.radial-menu-item-delete').node();
var pointBox = iD.ui.intro.pad(node.getBoundingClientRect(), 50);
curtain.reveal(pointBox, t('intro.points.delete'));
reveal(pointBox, 'intro.points.delete');
}, 300);
}
+4 -4
View File
@@ -1,4 +1,4 @@
iD.ui.intro.startEditing = function(context, curtain) {
iD.ui.intro.startEditing = function(context, reveal) {
var event = d3.dispatch('done', 'startEditing'),
timeouts = [];
@@ -13,14 +13,14 @@ iD.ui.intro.startEditing = function(context, curtain) {
step.enter = function() {
curtain.reveal('.map-control.help-control', t('intro.startediting.help'));
reveal('.map-control.help-control', 'intro.startediting.help');
timeout(function() {
curtain.reveal('#bar button.save', t('intro.startediting.save'));
reveal('#bar button.save', 'intro.startediting.save');
}, 3500);
timeout(function() {
curtain.reveal('#surface', t('intro.startediting.save'));
reveal('#surface', 'intro.startediting.save');
}, 7000);
timeout(event.startEditing, 7500);
+3 -3
View File
@@ -1,7 +1,7 @@
iD.ui.Splash = function(context) {
return function(selection) {
if (context.storage('sawSplash'))
return;
// if (context.storage('sawSplash'))
// return;
context.storage('sawSplash', true);
@@ -26,7 +26,7 @@ iD.ui.Splash = function(context) {
website: '<a href="http://ideditor.com/">ideditor.com</a>',
github: '<a href="https://github.com/systemed/iD">github.com</a>'
}));
var buttons = introModal.append('div').attr('class', 'modal-actions cf');
buttons.append('button')
+3 -4
View File
@@ -67,7 +67,7 @@ d3.curtain = function() {
tooltip.classed('in', false);
};
curtain.reveal = function(box, text, duration) {
curtain.reveal = function(box, text, tooltipclass, duration) {
if (typeof box === 'string') box = d3.select(box).node();
if (box.getBoundingClientRect) box = box.getBoundingClientRect();
@@ -100,14 +100,13 @@ d3.curtain = function() {
// pseudo markdown bold text hack
var parts = text.split('**');
var html = parts[0];
var html = '<span>' + parts[0] + '</span>';
if (parts[1]) html += '<span class="bold">' + parts[1] + '</span>';
tooltip
.style('top', pos[1] + 'px')
.style('left', pos[0] + 'px')
.attr('class', 'curtain-tooltip tooltip in ' + side)
.attr('class', 'curtain-tooltip tooltip in ' + side + ' ' + tooltipclass)
.select('.tooltip-inner')
.html(html);