removing external boards
This commit is contained in:
@ -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%";
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user