Adjust language, keep Wood road selected when editing midpoint/endpoint

This commit is contained in:
Bryan Housel
2017-04-06 17:46:36 -04:00
parent 8fe33d9430
commit fc774a1c64
4 changed files with 18 additions and 4 deletions
+14
View File
@@ -387,6 +387,9 @@ 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);
@@ -407,8 +410,16 @@ 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();
}
}
@@ -453,6 +464,9 @@ 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 = 80 * Math.pow(2, context.map().zoom() - 19);
+2 -2
View File
@@ -8,7 +8,7 @@ export function uiIntroNavigation(context, reveal) {
var dispatch = d3.dispatch('done'),
timeouts = [],
hallId = 'n2061',
springSt = [-85.63585099140167, 41.942506848938926];
springStreet = [-85.63585099140167, 41.942506848938926];
var chapter = {
@@ -175,7 +175,7 @@ export function uiIntroNavigation(context, reveal) {
function selectedStreet() {
context.map().centerEase(springSt);
context.map().centerEase(springStreet);
timeout(function() {
reveal('.entity-editor-pane',