Add border around longer radiobutton answers

This commit is contained in:
Pieter Vander Vennet 2020-10-01 01:23:45 +02:00
parent 9b2530197a
commit 929d07202f
4 changed files with 132 additions and 111 deletions

View file

@ -185,14 +185,21 @@ export abstract class UIElement extends UIEventSource<string> {
public SetClass(clss: string): UIElement {
this.dumbMode = false;
if (clss === "" && this.clss.length > 0) {
this.clss = [];
this.Update();
throw "Use RemoveClass instead";
} else if (this.clss.indexOf(clss) < 0) {
this.clss.push(clss);
this.Update();
}
return this;
}
public RemoveClass(clss: string): UIElement {
const i = this.clss.indexOf(clss);
if (i >= 0) {
this.clss.splice(i, 1);
this.Update();
}
return this;
}
public SetStyle(style: string): UIElement {