mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 22:46:38 +02:00
Fix various issues that made the walkthrough non-completable
This commit is contained in:
@@ -343,7 +343,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
var node = selectMenuItem(context, 'orthogonalize').node();
|
||||
if (!node) return;
|
||||
continueTo(clickSquare);
|
||||
}, 300); // after menu visible
|
||||
}, 50); // after menu visible
|
||||
});
|
||||
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
@@ -386,7 +386,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
}
|
||||
});
|
||||
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
context.map().on('move.intro', function() {
|
||||
var node = selectMenuItem(context, 'orthogonalize').node();
|
||||
if (!wasChanged && !node) { return continueTo(rightClickHouse); }
|
||||
|
||||
@@ -412,7 +412,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
|
||||
function continueTo(nextStep) {
|
||||
context.on('enter.intro', null);
|
||||
context.map().on('move.intro drawn.intro', null);
|
||||
context.map().on('move.intro', null);
|
||||
context.history().on('change.intro', null);
|
||||
nextStep();
|
||||
}
|
||||
@@ -661,7 +661,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
var node = selectMenuItem(context, 'circularize').node();
|
||||
if (!node) return;
|
||||
continueTo(clickCircle);
|
||||
}, 300); // after menu visible
|
||||
}, 50); // after menu visible
|
||||
});
|
||||
|
||||
revealTank(tank, t('intro.buildings.rightclick_tank'));
|
||||
@@ -708,7 +708,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
}
|
||||
});
|
||||
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
context.map().on('move.intro', function() {
|
||||
var node = selectMenuItem(context, 'circularize').node();
|
||||
if (!wasChanged && !node) { return continueTo(rightClickTank); }
|
||||
|
||||
@@ -724,7 +724,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
|
||||
// Something changed. Wait for transition to complete and check undo annotation.
|
||||
timeout(function() {
|
||||
if (context.history().undoAnnotation() === t('operations.circularize.annotation.area')) {
|
||||
if (context.history().undoAnnotation() === t('operations.circularize.annotation.single')) {
|
||||
continueTo(play);
|
||||
} else {
|
||||
continueTo(retryClickCircle);
|
||||
@@ -734,7 +734,7 @@ export function uiIntroBuilding(context, reveal) {
|
||||
|
||||
function continueTo(nextStep) {
|
||||
context.on('enter.intro', null);
|
||||
context.map().on('move.intro drawn.intro', null);
|
||||
context.map().on('move.intro', null);
|
||||
context.history().on('change.intro', null);
|
||||
nextStep();
|
||||
}
|
||||
|
||||
@@ -125,7 +125,6 @@ export function uiIntro(context) {
|
||||
let chapters = chapterFlow.map((chapter, i) => {
|
||||
let s = chapterUi[chapter](context, curtain.reveal)
|
||||
.on('done', () => {
|
||||
presetManager.init(); // clear away "recent" presets
|
||||
|
||||
buttons
|
||||
.filter(d => d.title === s.title)
|
||||
|
||||
@@ -676,7 +676,7 @@ export function uiIntroLine(context, reveal) {
|
||||
var node = selectMenuItem(context, 'split').node();
|
||||
if (!node) return;
|
||||
continueTo(splitIntersection);
|
||||
}, 300); // after menu visible
|
||||
}, 50); // after menu visible
|
||||
});
|
||||
|
||||
context.history().on('change.intro', function() {
|
||||
|
||||
@@ -295,6 +295,11 @@ export function uiIntroNavigation(context, reveal) {
|
||||
|
||||
var onClick = function() { continueTo(fieldsTownHall); };
|
||||
|
||||
reveal('.entity-editor-pane .section-feature-type',
|
||||
t('intro.navigation.preset_townhall', { preset: preset.name() }),
|
||||
{ buttonText: t('intro.ok'), buttonCallback: onClick }
|
||||
);
|
||||
|
||||
context.on('exit.intro', function() {
|
||||
continueTo(clickTownHall);
|
||||
});
|
||||
@@ -305,11 +310,6 @@ export function uiIntroNavigation(context, reveal) {
|
||||
}
|
||||
});
|
||||
|
||||
reveal('.entity-editor .preset-list-item',
|
||||
t('intro.navigation.preset_townhall', { preset: preset.name() }),
|
||||
{ buttonText: t('intro.ok'), buttonCallback: onClick }
|
||||
);
|
||||
|
||||
function continueTo(nextStep) {
|
||||
context.on('exit.intro', null);
|
||||
context.history().on('change.intro', null);
|
||||
@@ -329,7 +329,7 @@ export function uiIntroNavigation(context, reveal) {
|
||||
|
||||
var onClick = function() { continueTo(closeTownHall); };
|
||||
|
||||
reveal('.inspector-body .preset-editor',
|
||||
reveal('.entity-editor-pane .section-preset-fields',
|
||||
t('intro.navigation.fields_townhall'),
|
||||
{ buttonText: t('intro.ok'), buttonCallback: onClick }
|
||||
);
|
||||
|
||||
@@ -388,7 +388,7 @@ export function uiIntroPoint(context, reveal) {
|
||||
reveal(box, t('intro.points.rightclick'), { duration: 600 });
|
||||
|
||||
timeout(function() {
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
context.map().on('move.intro', function() {
|
||||
var entity = context.hasEntity(_pointID);
|
||||
if (!entity) return chapter.restart();
|
||||
var box = pointBox(entity.loc, context);
|
||||
@@ -405,12 +405,12 @@ export function uiIntroPoint(context, reveal) {
|
||||
var node = selectMenuItem(context, 'delete').node();
|
||||
if (!node) return;
|
||||
continueTo(enterDelete);
|
||||
}, 300); // after menu visible
|
||||
}, 50); // after menu visible
|
||||
});
|
||||
|
||||
function continueTo(nextStep) {
|
||||
context.on('enter.intro', null);
|
||||
context.map().on('move.intro drawn.intro', null);
|
||||
context.map().on('move.intro', null);
|
||||
nextStep();
|
||||
}
|
||||
}
|
||||
@@ -429,7 +429,7 @@ export function uiIntroPoint(context, reveal) {
|
||||
);
|
||||
|
||||
timeout(function() {
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
context.map().on('move.intro', function() {
|
||||
revealEditMenu(entity.loc,
|
||||
t('intro.points.delete', { button: icon('#iD-operation-delete', 'pre-text') }),
|
||||
{ duration: 0}
|
||||
@@ -450,7 +450,7 @@ export function uiIntroPoint(context, reveal) {
|
||||
});
|
||||
|
||||
function continueTo(nextStep) {
|
||||
context.map().on('move.intro drawn.intro', null);
|
||||
context.map().on('move.intro', null);
|
||||
context.history().on('change.intro', null);
|
||||
context.on('exit.intro', null);
|
||||
nextStep();
|
||||
|
||||
Reference in New Issue
Block a user