Add viewpoint for buurtnatuur, add translation of AddPointPoi

This commit is contained in:
Pieter Vander Vennet 2020-07-24 15:52:21 +02:00
parent 7bbc140f05
commit c3d04c79b9
13 changed files with 271 additions and 71 deletions

View file

@ -1,4 +1,5 @@
import {UIElement} from "../UIElement";
import Locale from "../i18n/Locale";
export class Button extends UIElement {
private _text: UIElement;
@ -6,7 +7,7 @@ export class Button extends UIElement {
private _clss: string;
constructor(text: UIElement, onclick: (() => void), clss: string = "") {
super(undefined);
super(Locale.language);
this._text = text;
this._onclick = onclick;
if (clss !== "") {
@ -28,9 +29,7 @@ export class Button extends UIElement {
InnerUpdate(htmlElement: HTMLElement) {
super.InnerUpdate(htmlElement);
const self = this;
console.log("Update for ", htmlElement)
document.getElementById("button-"+this.id).onclick = function(){
console.log("Clicked");
self._onclick();
}
}