Remove debug output statements and sort layouts alphabetically (by prettyName).
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Manuel Friedli 2019-05-05 11:06:37 +02:00
parent 708645f968
commit f344cdb3f8
2 changed files with 1 additions and 6 deletions

View file

@ -58,17 +58,14 @@ export class Globals {
`Error: Language code '${layout.code}' cannot be registered for layout '${layout.prettyName}' `Error: Language code '${layout.code}' cannot be registered for layout '${layout.prettyName}'
because it is already registered for layout '${element.prettyName}'!` because it is already registered for layout '${element.prettyName}'!`
); );
console.log("globals.ts", "REJECTING LAYOUT", layout.code, Globals.layouts);
return true; return true;
} }
return false; return false;
} }
); );
if (available) { if (available) {
console.log("globals.ts", "registering layout", layout.code, layout);
Globals.layouts.push(layout); Globals.layouts.push(layout);
} else { Globals.layouts.sort((a, b) => a.prettyName.localeCompare(b.prettyName));
console.log("globals.ts", "NOT registering layout", layout.code, layout);
} }
} }

View file

@ -244,7 +244,6 @@ class UhrRendererV2Delegate {
} }
this.parseTimeDefinition(letters, 'minute', this.layout.minutes); this.parseTimeDefinition(letters, 'minute', this.layout.minutes);
this.parseTimeDefinition(letters, 'hour', this.layout.hours); this.parseTimeDefinition(letters, 'hour', this.layout.hours);
console.log("renderer.ts", "parsed layout", this.layout.code, this.layout, letters);
return letters; return letters;
}; };
@ -295,7 +294,6 @@ export class UhrRenderer {
if (this.layout.version === 2) { if (this.layout.version === 2) {
const delegate: UhrRendererV2Delegate = new UhrRendererV2Delegate(this.layout); const delegate: UhrRendererV2Delegate = new UhrRendererV2Delegate(this.layout);
const parsedLayout: Letter[][] = delegate.parse(); const parsedLayout: Letter[][] = delegate.parse();
console.log("renderer.ts", "got parsed layout", parsedLayout);
Object.defineProperty(this.layout, "parsed", { Object.defineProperty(this.layout, "parsed", {
"value": parsedLayout, "value": parsedLayout,
"writable": false, "writable": false,