Update simulator as per latest lego UI design for sensors. Fix full screen layout issues. (#554)
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user