Merge master

This commit is contained in:
Pieter Vander Vennet 2021-01-25 03:23:00 +01:00
commit 149e117887
11 changed files with 44 additions and 63 deletions

View file

@ -97,7 +97,7 @@ export default class ScrollableFullScreen extends UIElement {
}
private static PatchLeaflet(htmlElement) {
if(htmlElement === null){
if(htmlElement === undefined || htmlElement === null){
return;
}
do {
@ -141,8 +141,9 @@ export default class ScrollableFullScreen extends UIElement {
}
public PrepFullscreen(htmlElement = undefined) {
htmlElement = htmlElement ?? document.getElementById(this.id);
ScrollableFullScreen.PatchLeaflet(htmlElement);
htmlElement = htmlElement ?? document.getElementById(this.id);
ScrollableFullScreen.HideClutter(htmlElement);
}

View file

@ -74,7 +74,7 @@ export default class EditableTagRendering extends UIElement {
// And at last, set up the skip button
const cancelbutton =
Translations.t.general.cancel.Clone()
.SetClass("cancel")
.SetClass("btn btn-secondary mr-3")
.onClick(() => {
self._editMode.setData(false)
});

View file

@ -33,7 +33,7 @@ export default class QuestionBox extends UIElement {
self._skippedQuestions.ping();
},
Translations.t.general.skip.Clone()
.SetClass("cancel")
.SetClass("btn btn-secondary mr-3")
.onClick(() => {
self._skippedQuestions.data.push(i);
self._skippedQuestions.ping();

View file

@ -22,15 +22,14 @@ export class SaveButton extends UIElement {
}
InnerRender(): string {
let clss = "save";
if(this._userDetails != undefined && !this._userDetails.data.loggedIn){
return this._friendlyLogin.Render();
}
let inactive_class = ''
if (this._value.data === false || (this._value.data ?? "") === "") {
clss = "save-non-active";
inactive_class = "btn-disabled";
}
return Translations.t.general.save.Clone().SetClass(clss).Render();
return Translations.t.general.save.Clone().SetClass(`btn ${inactive_class}`).Render();
}
}

View file

@ -148,7 +148,7 @@ export default class ShowDataLayer {
leafletLayer.on("click", () => {
// We set the element as selected...
uiElement.Activate(e => e.PrepFullscreen());
uiElement.Activate();
State.state.selectedElement.setData(feature);
});