forked from MapComplete/MapComplete
More work on the custom theme generator, add aed template, move bookcases to json template
This commit is contained in:
parent
146552e62c
commit
560c8e1567
34 changed files with 1048 additions and 590 deletions
|
@ -19,12 +19,9 @@ export class Changes {
|
|||
|
||||
public readonly pendingChangesES = new UIEventSource<number>(this._pendingChanges.length);
|
||||
public readonly isSaving = new UIEventSource(false);
|
||||
private readonly _changesetComment: string;
|
||||
|
||||
constructor(
|
||||
changesetComment: string,
|
||||
state: State) {
|
||||
this._changesetComment = changesetComment;
|
||||
|
||||
this.SetupAutoSave(state);
|
||||
this.LastEffortSave();
|
||||
|
@ -74,6 +71,9 @@ export class Changes {
|
|||
const eventSource = State.state.allElements.getElement(elementId);
|
||||
|
||||
eventSource.data[key] = value;
|
||||
if(value === undefined || value === ""){
|
||||
delete eventSource.data[key];
|
||||
}
|
||||
eventSource.ping();
|
||||
// We get the id from the event source, as that ID might be rewritten
|
||||
this._pendingChanges.push({elementId: eventSource.data.id, key: key, value: value});
|
||||
|
@ -223,7 +223,7 @@ export class Changes {
|
|||
|
||||
console.log("Beginning upload...");
|
||||
// At last, we build the changeset and upload
|
||||
State.state.osmConnection.UploadChangeset(self._changesetComment,
|
||||
State.state.osmConnection.UploadChangeset(
|
||||
function (csId) {
|
||||
|
||||
let modifications = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue