forked from MapComplete/MapComplete
Make imageCarousel fit in with other elements (to make images optional or lower in the popup), add ghost bike popup
This commit is contained in:
parent
5970883adc
commit
54a01dfbef
15 changed files with 289 additions and 57 deletions
22
index.ts
22
index.ts
|
@ -102,7 +102,6 @@ const leftMessage = new UIEventSource<() => UIElement>(undefined);
|
|||
|
||||
const selectedElement = new UIEventSource<any>(undefined);
|
||||
|
||||
const preferedPictureLicense = new UIEventSource<string>(undefined);
|
||||
|
||||
const locationControl = new UIEventSource<{ lat: number, lon: number, zoom: number }>({
|
||||
zoom: questSetToRender.startzoom,
|
||||
|
@ -137,21 +136,6 @@ const bm = new Basemap("leafletDiv", locationControl, new VariableUiElement(
|
|||
));
|
||||
|
||||
|
||||
// ------------- Tie together user settings and UI -----------
|
||||
|
||||
|
||||
const picturesPrefName = "mapcomplete-pictures-license";
|
||||
preferedPictureLicense.addCallback((license) => {
|
||||
osmConnection.SetPreference(picturesPrefName, license);
|
||||
});
|
||||
|
||||
osmConnection.preferences.addCallback((prefs) => {
|
||||
if (prefs[picturesPrefName] !== undefined) {
|
||||
preferedPictureLicense.setData(prefs[picturesPrefName]);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// ------------- Setup the layers -------------------------------
|
||||
|
||||
const addButtons: {
|
||||
|
@ -175,8 +159,7 @@ for (const layer of questSetToRender.layers) {
|
|||
layer.title,
|
||||
layer.elementsToShow,
|
||||
changes,
|
||||
osmConnection.userDetails,
|
||||
preferedPictureLicense
|
||||
osmConnection.userDetails
|
||||
)
|
||||
};
|
||||
|
||||
|
@ -228,8 +211,7 @@ selectedElement.addCallback((data) => {
|
|||
layer.title,
|
||||
layer.elementsToShow,
|
||||
changes,
|
||||
osmConnection.userDetails,
|
||||
preferedPictureLicense
|
||||
osmConnection.userDetails
|
||||
));
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue