Fix flickering and drag-node breakage in line endpoint walkthrough step

This commit is contained in:
Bryan Housel
2018-01-18 22:02:56 -05:00
parent efc2678610
commit 1697c48360
-12
View File
@@ -467,10 +467,6 @@ export function uiIntroLine(context, reveal) {
if (!context.hasEntity(woodRoadId) || !context.hasEntity(woodRoadEndId)) {
return continueTo(updateLine);
}
if (context.selectedIDs().indexOf(woodRoadId) === -1) {
context.enter(modeSelect(context, [woodRoadId]));
}
var padding = 100 * Math.pow(2, context.map().zoom() - 19);
var box = pad(woodRoadDragEndpoint, padding, context);
reveal(box, t('intro.lines.start_drag_endpoint'));
@@ -489,16 +485,8 @@ export function uiIntroLine(context, reveal) {
}
});
context.on('enter.intro', function(mode) {
if (mode.id !== 'select') {
// keep Wood Road selected so endpoint stays draggable..
context.enter(modeSelect(context, [woodRoadId]));
}
});
function continueTo(nextStep) {
context.map().on('move.intro drawn.intro', null);
context.on('enter.intro', null);
nextStep();
}
}