removing feild editors moved to pxt

This commit is contained in:
Peli de Halleux
2019-03-04 21:02:29 -08:00
parent 2316009b64
commit e6cf490be2
6 changed files with 10 additions and 221 deletions

View File

@ -5,6 +5,7 @@
namespace pxsim {
export class EV3Board extends CoreBoard {
viewHost: visuals.BoardHost;
view: SVGSVGElement;
outputState: EV3OutputState;
@ -83,15 +84,16 @@ namespace pxsim {
highContrast: msg.highContrast,
light: msg.light
};
const viewHost = new visuals.BoardHost(pxsim.visuals.mkBoardView({
this.viewHost = new visuals.BoardHost(pxsim.visuals.mkBoardView(<pxsim.visuals.BoardViewOptions>{
visual: boardDef.visual,
boardDef,
highContrast: msg.highContrast,
light: msg.light
}), opts);
document.body.innerHTML = ""; // clear children
document.body.className = msg.light ? "light" : "";
document.body.appendChild(this.view = viewHost.getView() as SVGSVGElement);
document.body.appendChild(this.view = this.viewHost.getView() as SVGSVGElement);
this.inputNodes = [];
this.outputNodes = [];
@ -102,8 +104,8 @@ namespace pxsim {
return Promise.resolve();
}
screenshot(): string {
return svg.toDataUri(new XMLSerializer().serializeToString(this.view));
screenshotAsync(width?: number): Promise<ImageData> {
return this.viewHost.screenshotAsync(width);
}
getBrickNode() {