forked from MapComplete/MapComplete
Fixes and simplification of the CSS
This commit is contained in:
parent
c7f33a9490
commit
6d5f4ade25
24 changed files with 191 additions and 344 deletions
|
@ -240,14 +240,12 @@ export class FilteredLayer {
|
|||
let content = undefined;
|
||||
marker.bindPopup(popup)
|
||||
.on("popupopen", () => {
|
||||
|
||||
if (content === undefined) {
|
||||
uiElement = self._showOnPopup(eventSource, feature);
|
||||
// Lazily create the content
|
||||
content = uiElement.Render();
|
||||
}
|
||||
popup.setContent(content);
|
||||
uiElement.Activate();
|
||||
uiElement.Update();
|
||||
});
|
||||
return marker;
|
||||
|
@ -290,8 +288,6 @@ export class FilteredLayer {
|
|||
.setLatLng(e.latlng)
|
||||
.openOn(State.state.bm.map);
|
||||
|
||||
uiElement.Update();
|
||||
uiElement.Activate();
|
||||
L.DomEvent.stop(e); // Marks the event as consumed
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ export class ImageSearcher extends UIEventSource<string[]> {
|
|||
private readonly _tags: UIEventSource<any>;
|
||||
private readonly _wdItem = new UIEventSource<string>("");
|
||||
private readonly _commons = new UIEventSource<string>("");
|
||||
private _activated: boolean = false;
|
||||
public _deletedImages = new UIEventSource<string[]>([]);
|
||||
|
||||
|
||||
|
@ -81,7 +80,7 @@ export class ImageSearcher extends UIEventSource<string[]> {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
this._tags.addCallbackAndRun(() => self.LoadImages());
|
||||
|
||||
}
|
||||
|
||||
|
@ -121,25 +120,14 @@ export class ImageSearcher extends UIEventSource<string[]> {
|
|||
return;
|
||||
}
|
||||
console.log("Deleting image...", key, " --> ", url);
|
||||
State.state.changes.addTag(this._tags.data.id, new Tag(key, ""));
|
||||
this._deletedImages.data.push(url);
|
||||
this._deletedImages.ping();
|
||||
this.ping();
|
||||
State.state?.changes?.addTag(this._tags.data.id, new Tag(key, ""));
|
||||
}
|
||||
|
||||
public Activate() {
|
||||
if (this._activated) {
|
||||
return;
|
||||
}
|
||||
this._activated = true;
|
||||
this.LoadImages();
|
||||
const self = this;
|
||||
this._tags.addCallback(() => self.LoadImages());
|
||||
}
|
||||
|
||||
private LoadImages(): void {
|
||||
if (!this._activated) {
|
||||
return;
|
||||
}
|
||||
const imageTag = this._tags.data.image;
|
||||
if (imageTag !== undefined) {
|
||||
const bareImages = imageTag.split(";");
|
||||
|
|
|
@ -31,16 +31,12 @@ export class StrayClickHandler {
|
|||
});
|
||||
const uiElement = uiToShow();
|
||||
const popup = L.popup().setContent(uiElement.Render());
|
||||
uiElement.Update();
|
||||
uiElement.Activate();
|
||||
self._lastMarker.addTo(map);
|
||||
self._lastMarker.bindPopup(popup);
|
||||
|
||||
self._lastMarker.on("click", () => {
|
||||
State.state.fullScreenMessage.setData(self._uiToShow());
|
||||
});
|
||||
uiElement.Update();
|
||||
uiElement.Activate();
|
||||
});
|
||||
|
||||
State.state.selectedElement.addCallback(() => {
|
||||
|
|
|
@ -465,7 +465,6 @@ export class TagUtils {
|
|||
let leftoverTag = undefined;
|
||||
if (keyValues[freeformKey] !== undefined && keyValues[freeformKey].length !== 0) {
|
||||
leftoverTag = new Tag(freeformKey, keyValues[freeformKey].join(";"));
|
||||
console.log("Leftovers are ", leftoverTag)
|
||||
if (freeformExtraTags !== undefined) {
|
||||
leftoverTag = new And([
|
||||
leftoverTag,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue