mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
Fix issues with the walkthrough
This commit is contained in:
@@ -271,7 +271,10 @@ export function presetIndex(context) {
|
||||
};
|
||||
|
||||
all.defaults = function(geometry, n) {
|
||||
var rec = all.recent().matchGeometry(geometry).collection.slice(0, 4);
|
||||
var rec = [];
|
||||
if (!context.inIntro()) {
|
||||
rec = all.recent().matchGeometry(geometry).collection.slice(0, 4);
|
||||
}
|
||||
var def = utilArrayUniq(rec.concat(_defaults[geometry].collection)).slice(0, n - 1);
|
||||
return presetCollection(utilArrayUniq(rec.concat(def).concat(all.fallback(geometry))));
|
||||
};
|
||||
@@ -451,9 +454,11 @@ export function presetIndex(context) {
|
||||
};
|
||||
|
||||
all.setMostRecent = function(preset, geometry) {
|
||||
geometry = all.fallback(geometry).id;
|
||||
if (context.inIntro()) return;
|
||||
if (preset.searchable === false) return;
|
||||
|
||||
geometry = all.fallback(geometry).id;
|
||||
|
||||
var items = all.getRecents();
|
||||
var item = all.recentMatching(preset, geometry);
|
||||
if (item) {
|
||||
|
||||
@@ -20,7 +20,7 @@ export function uiIntroLine(context, reveal) {
|
||||
var tulipRoadStart = [-85.6297754121684, 41.95805253325314];
|
||||
var tulipRoadMidpoint = [-85.62975395449628, 41.95787501510204];
|
||||
var tulipRoadIntersection = [-85.62974496187628, 41.95742515554585];
|
||||
var roadCategory = context.presets().item('category-road');
|
||||
var roadCategory = context.presets().item('category-road_minor');
|
||||
var residentialPreset = context.presets().item('highway/residential');
|
||||
var woodRoadID = 'w525';
|
||||
var woodRoadEndID = 'n2862';
|
||||
@@ -241,7 +241,7 @@ export function uiIntroLine(context, reveal) {
|
||||
return chapter.restart();
|
||||
});
|
||||
|
||||
var button = d3_select('.preset-category-road .preset-list-button');
|
||||
var button = d3_select('.preset-category-road_minor .preset-list-button');
|
||||
if (button.empty()) return chapter.restart();
|
||||
|
||||
// disallow scrolling
|
||||
@@ -277,7 +277,7 @@ export function uiIntroLine(context, reveal) {
|
||||
return chapter.restart();
|
||||
});
|
||||
|
||||
var subgrid = d3_select('.preset-category-road .subgrid');
|
||||
var subgrid = d3_select('.preset-category-road_minor .subgrid');
|
||||
if (subgrid.empty()) return chapter.restart();
|
||||
|
||||
subgrid.selectAll(':not(.preset-highway-residential) .preset-list-button')
|
||||
|
||||
Reference in New Issue
Block a user