mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 01:33:03 +00:00
Adjust timings a few places so draw handler doesn't interrupt reveal
This commit is contained in:
@@ -101,13 +101,15 @@ export function uiIntroArea(context, reveal) {
|
||||
|
||||
var padding = 120 * Math.pow(2, context.map().zoom() - 19);
|
||||
var box = pad(playground, padding, context);
|
||||
reveal(box, t('intro.areas.continue_playground'));
|
||||
reveal(box, t('intro.areas.continue_playground'), { duration: 250 });
|
||||
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
padding = 120 * Math.pow(2, context.map().zoom() - 19);
|
||||
box = pad(playground, padding, context);
|
||||
reveal(box, t('intro.areas.continue_playground'), {duration: 0});
|
||||
});
|
||||
timeout(function() {
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
padding = 120 * Math.pow(2, context.map().zoom() - 19);
|
||||
box = pad(playground, padding, context);
|
||||
reveal(box, t('intro.areas.continue_playground'), { duration: 0 });
|
||||
});
|
||||
}, 250); // after reveal
|
||||
|
||||
context.on('enter.intro', function(mode) {
|
||||
if (mode.id === 'draw-area') {
|
||||
|
||||
@@ -118,7 +118,7 @@ export function uiIntroLine(context, reveal) {
|
||||
}
|
||||
|
||||
tulipRoadId = context.mode().selectedIDs()[0];
|
||||
context.map().centerEase(tulipRoadMidpoint);
|
||||
context.map().centerEase(tulipRoadMidpoint, 500);
|
||||
|
||||
timeout(function() {
|
||||
var padding = 200 * Math.pow(2, context.map().zoom() - 18.5);
|
||||
@@ -137,7 +137,7 @@ export function uiIntroLine(context, reveal) {
|
||||
{ duration: 0 }
|
||||
);
|
||||
});
|
||||
}, 260); // after easing..
|
||||
}, 550); // after easing..
|
||||
|
||||
context.history().on('change.intro', function() {
|
||||
var entity = tulipRoadId && context.hasEntity(tulipRoadId);
|
||||
@@ -198,7 +198,7 @@ export function uiIntroLine(context, reveal) {
|
||||
var entity = tulipRoadId && context.hasEntity(tulipRoadId);
|
||||
if (!entity) return chapter.restart();
|
||||
|
||||
context.map().centerEase(tulipRoadIntersection);
|
||||
context.map().centerEase(tulipRoadIntersection, 500);
|
||||
|
||||
reveal('#surface', t('intro.lines.continue_line'));
|
||||
|
||||
|
||||
@@ -420,19 +420,21 @@ export function uiIntroNavigation(context, reveal) {
|
||||
|
||||
reveal(box,
|
||||
t('intro.navigation.selected_street', { name: t('intro.graph.name.spring-street') }),
|
||||
{ buttonText: t('intro.ok'), buttonCallback: onClick }
|
||||
{ duration: 600, buttonText: t('intro.ok'), buttonCallback: onClick }
|
||||
);
|
||||
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
var entity = context.hasEntity(springStreetEndId);
|
||||
if (!entity) return;
|
||||
var box = pointBox(entity.loc, context);
|
||||
box.height = 500;
|
||||
reveal(box,
|
||||
t('intro.navigation.selected_street', { name: t('intro.graph.name.spring-street') }),
|
||||
{ duration: 0, buttonText: t('intro.ok'), buttonCallback: onClick }
|
||||
);
|
||||
});
|
||||
timeout(function() {
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
var entity = context.hasEntity(springStreetEndId);
|
||||
if (!entity) return;
|
||||
var box = pointBox(entity.loc, context);
|
||||
box.height = 500;
|
||||
reveal(box,
|
||||
t('intro.navigation.selected_street', { name: t('intro.graph.name.spring-street') }),
|
||||
{ duration: 0, buttonText: t('intro.ok'), buttonCallback: onClick }
|
||||
);
|
||||
});
|
||||
}, 600); // after reveal.
|
||||
|
||||
context.on('enter.intro', function(mode) {
|
||||
if (!context.hasEntity(springStreetId)) {
|
||||
|
||||
@@ -257,14 +257,16 @@ export function uiIntroPoint(context, reveal) {
|
||||
|
||||
timeout(function() {
|
||||
var box = pointBox(entity.loc, context);
|
||||
reveal(box, t('intro.points.reselect'));
|
||||
reveal(box, t('intro.points.reselect'), { duration: 600 });
|
||||
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
var entity = context.hasEntity(pointId);
|
||||
if (!entity) return chapter.restart();
|
||||
var box = pointBox(entity.loc, context);
|
||||
reveal(box, t('intro.points.reselect'), { duration: 0 });
|
||||
});
|
||||
timeout(function() {
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
var entity = context.hasEntity(pointId);
|
||||
if (!entity) return chapter.restart();
|
||||
var box = pointBox(entity.loc, context);
|
||||
reveal(box, t('intro.points.reselect'), { duration: 0 });
|
||||
});
|
||||
}, 600); // after reveal..
|
||||
|
||||
context.on('enter.intro', function(mode) {
|
||||
if (mode.id !== 'select') return;
|
||||
@@ -344,14 +346,16 @@ export function uiIntroPoint(context, reveal) {
|
||||
context.enter(modeBrowse(context));
|
||||
|
||||
var box = pointBox(entity.loc, context);
|
||||
reveal(box, t('intro.points.rightclick'));
|
||||
reveal(box, t('intro.points.rightclick'), { duration: 600 });
|
||||
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
var entity = context.hasEntity(pointId);
|
||||
if (!entity) return chapter.restart();
|
||||
var box = pointBox(entity.loc, context);
|
||||
reveal(box, t('intro.points.rightclick'), { duration: 0 });
|
||||
});
|
||||
timeout(function() {
|
||||
context.map().on('move.intro drawn.intro', function() {
|
||||
var entity = context.hasEntity(pointId);
|
||||
if (!entity) return chapter.restart();
|
||||
var box = pointBox(entity.loc, context);
|
||||
reveal(box, t('intro.points.rightclick'), { duration: 0 });
|
||||
});
|
||||
}, 600); // after reveal
|
||||
|
||||
context.on('enter.intro', function(mode) {
|
||||
if (mode.id !== 'select') return;
|
||||
|
||||
Reference in New Issue
Block a user