git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
409a0a2
Branches
Tags
develop-client_server
master
typescript
fs-words.git
client
source
widgets
correlation
logic.ts
[mod] client
Christian Fraß
commited
409a0a2
at 2021-03-12 22:01:10
logic.ts
Blame
History
Raw
namespace folksprak.words.widgets { /** */ export class class_widget_correlation extends class_widget { /** */ private classes : Array<string>; /** */ private language_from : string; /** */ private expression_from : string; /** */ private language_to : string; /** */ private expression_to : string; /** */ public constructor ( language_from : string, expression_from : string, language_to : string, expression_to : string, classes : Array<string> = [] ) { super(); this.language_from = language_from; this.expression_from = expression_from; this.language_to = language_to; this.expression_to = expression_to; this.classes = classes; } /** */ public render() : HTMLElement { const dom_span : HTMLSpanElement = <HTMLSpanElement>(document.createElement('span')); dom_span.setAttribute ( 'class', ['widget', 'widget-correlation'].concat(this.classes).join(' ') ); dom_span.textContent = lib_string.coin ( '[{{language_from}}] {{expression_from}} ~ [{{language_to}}] {{expression_to}}', { 'language_from': this.language_from, 'expression_from': this.expression_from, 'language_to': this.language_to, 'expression_to': this.expression_to, } ); return dom_span; } } }