removing external boards

This commit is contained in:
Peli de Halleux
2016-08-30 21:15:27 -07:00
parent 90da72a8de
commit 4c27d62796
8 changed files with 35 additions and 169 deletions

View File

@ -11,28 +11,27 @@ namespace pxsim.visuals {
private defs: SVGDefsElement;
private state: DalBoard;
constructor(state: DalBoard, boardDef: BoardDefinition, cmpsList: string[], cmpDefs: Map<ComponentDefinition>, fnArgs: any) {
constructor(state: DalBoard, boardDef: BoardDefinition, cmpsList: string[], cmpDefs: Map<PartDefinition>, fnArgs: any) {
this.state = state;
let onboardCmps = boardDef.onboardComponents || [];
let activeComponents = (cmpsList || []).filter(c => onboardCmps.indexOf(c) < 0);
activeComponents.sort();
// if (boardDef.visual === "microbit") {
this.boardView = new visuals.MicrobitBoardSvg({
runtime: runtime,
theme: visuals.randomTheme(),
disableTilt: false
});
// } else {
//TODO: port Arduino/generic board
// this.boardView = new visuals.GenericBoardSvg({
// boardDef: boardDef,
// activeComponents: activeComponents,
// componentDefinitions: cmpDefs,
// runtime: runtime,
// fnArgs: fnArgs
// })
// }
// boardDef.visual === "microbit"
this.boardView = new visuals.MicrobitBoardSvg({
runtime: runtime,
theme: visuals.randomTheme(),
disableTilt: false
});
//TODO: port Arduino/generic board
// this.boardView = new visuals.GenericBoardSvg({
// boardDef: boardDef,
// activeComponents: activeComponents,
// componentDefinitions: cmpDefs,
// runtime: runtime,
// fnArgs: fnArgs
// })
// }
const VIEW_WIDTH = "100%";
const VIEW_HEIGHT = "100%";

View File

@ -11,7 +11,7 @@ namespace pxsim.visuals {
disableTilt?: boolean;
activeComponents: string[];
fnArgs?: any;
componentDefinitions: Map<ComponentDefinition>;
componentDefinitions: Map<PartDefinition>;
}
export const VIEW_WIDTH = 498;
@ -192,7 +192,7 @@ namespace pxsim.visuals {
private underboard: SVGGElement;
public boardDef: BoardDefinition;
private boardDim: ComputedBoardDimensions;
public componentDefs: Map<ComponentDefinition>;
public componentDefs: Map<PartDefinition>;
private boardEdges: number[];
private id: number;
public bbX: number;