Remove debug output

This commit is contained in:
pietervdvn 2021-03-22 00:28:10 +01:00
parent d24b421e46
commit 14309e29b0

View file

@ -27,7 +27,6 @@ class TitleElement extends UIElement {
InnerRender(): string { InnerRender(): string {
const defaultTitle = Translations.WT(this._layoutToUse.data?.title)?.txt ?? "MapComplete" const defaultTitle = Translations.WT(this._layoutToUse.data?.title)?.txt ?? "MapComplete"
console.log("Default title: ", defaultTitle)
const feature = this._selectedFeature.data; const feature = this._selectedFeature.data;
if (feature === undefined) { if (feature === undefined) {
@ -60,13 +59,10 @@ export default class TitleHandler {
selectedFeature: UIEventSource<any>, selectedFeature: UIEventSource<any>,
allElementsStorage: ElementStorage) { allElementsStorage: ElementStorage) {
console.log("Titlehandler inited")
selectedFeature.addCallbackAndRun(_ => { selectedFeature.addCallbackAndRun(_ => {
const title = new TitleElement(layoutToUse, selectedFeature, allElementsStorage) const title = new TitleElement(layoutToUse, selectedFeature, allElementsStorage)
const d = document.createElement('div'); const d = document.createElement('div');
const contents = title.InnerRender() d.innerHTML = title.InnerRender();
d.innerHTML = contents;
console.log("Setting title to ", d.innerText, contents)
// We pass everything into a div to strip out images etc... // We pass everything into a div to strip out images etc...
document.title = (d.textContent || d.innerText); document.title = (d.textContent || d.innerText);
}) })