Update simulator as per latest lego UI design for sensors. Fix full screen layout issues. (#554)

This commit is contained in:
Sam El-Husseini
2018-05-02 13:58:59 -07:00
committed by GitHub
parent 4825172423
commit 84990d66a9
14 changed files with 376 additions and 207 deletions

View File

@ -130,11 +130,19 @@ namespace pxsim.visuals {
return this.element;
}
public resize(width: number, height: number) {
public resize(width: number, height: number, strict?: boolean) {
this.width = width;
this.height = height;
}
public getActualHeight() {
return this.height;
}
public getActualWidth() {
return this.width;
}
private updateTransform() {
if (this.rendered) {
let left = this.left;
@ -212,10 +220,6 @@ namespace pxsim.visuals {
}
}
public hasClose() {
return true;
}
protected setChangedState() {
this.changed = true;
}
@ -225,6 +229,10 @@ namespace pxsim.visuals {
this.changed = false;
return res;
}
public hasBackground() {
return false;
}
}
export abstract class SimView<T extends BaseNode> extends View implements LayoutElement {
@ -272,9 +280,13 @@ namespace pxsim.visuals {
}
public clear() {
const markForRemoval: Element[] = [];
forEachElement(this.element.childNodes, e => {
this.element.removeChild(e);
markForRemoval.push(e);
});
markForRemoval.forEach(e => {
this.element.removeChild(e);
})
}
public onComponentInjected() {