Adjust position of Name Road prompt, simplify code

(closes #3992)
This commit is contained in:
Bryan Housel
2017-04-28 14:57:44 -04:00
parent ccbc0a3f91
commit 8395ca8b43
2 changed files with 6 additions and 11 deletions
+2 -1
View File
@@ -3696,7 +3696,8 @@ img.tile-removing {
display: inline-block;
}
.curtain-tooltip.intro-points-describe {
.curtain-tooltip.intro-points-describe ,
.curtain-tooltip.intro-lines-name_road {
top: 133px !important;
}
+4 -10
View File
@@ -288,16 +288,8 @@ export function uiIntroLine(context, reveal) {
timeout(function() {
var tooltip = reveal(subgrid.node(),
t('intro.lines.choose_preset_residential', { preset: residentialPreset.name() }),
{ duration: 300 }
{ tooltipBox: '.preset-highway-residential .preset-list-button', duration: 300 }
);
// put the tooltip near the "Residential Road" button
var button = d3.select('.preset-highway-residential .preset-list-button').node();
var buttonRect = button.getBoundingClientRect();
var tooltipRect = tooltip.node().getBoundingClientRect();
var top = buttonRect.top - (tooltipRect.height / 2) + (buttonRect.height / 2);
tooltip.style('top', top + 'px');
}, 300);
function continueTo(nextStep) {
@@ -342,8 +334,10 @@ export function uiIntroLine(context, reveal) {
});
timeout(function() {
var box = d3.select('.form-field-name').node().getBoundingClientRect();
reveal('.entity-editor-pane',
t('intro.lines.name_road', { button: icon('#icon-apply', 'pre-text') })
t('intro.lines.name_road', { button: icon('#icon-apply', 'pre-text') }),
{ tooltipClass: 'intro-lines-name_road' }
);
}, 500);