forked from MapComplete/MapComplete
Way to much fixes and improvements
This commit is contained in:
parent
e68d9d99a5
commit
5ed0bb431c
41 changed files with 1244 additions and 402 deletions
20
UI/Base/PageSplit.ts
Normal file
20
UI/Base/PageSplit.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import {UIElement} from "../UIElement";
|
||||
|
||||
export default class PageSplit extends UIElement{
|
||||
private _left: UIElement;
|
||||
private _right: UIElement;
|
||||
private _leftPercentage: number;
|
||||
|
||||
constructor(left: UIElement, right:UIElement,
|
||||
leftPercentage: number = 50) {
|
||||
super();
|
||||
this._left = left;
|
||||
this._right = right;
|
||||
this._leftPercentage = leftPercentage;
|
||||
}
|
||||
|
||||
InnerRender(): string {
|
||||
return `<span class="page-split" style="height: min-content"><span style="width:${this._leftPercentage}%">${this._left.Render()}</span><span style="width:${100-this._leftPercentage}">${this._right.Render()}</span></span>`;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue