From 0e55893d0f7f2a0aa5098df73d0ece5a7f1a4ddf Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 15 Mar 2023 22:33:22 -0400 Subject: fixed up Clone() and export/import collection to work with links, presentations, and contexts better. --- tsconfig.json | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'tsconfig.json') diff --git a/tsconfig.json b/tsconfig.json index 993ab13b9..bff9255db 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,34 +2,22 @@ "compilerOptions": { "target": "es5", "downlevelIteration": true, - // "module": "system", "removeComments": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, + "moduleDetection": "auto", "strict": true, "jsx": "react", "allowJs": true, "sourceMap": true, "outDir": "dist", - "lib": [ - "dom", - "es2015" - ], - "typeRoots": [ - "node_modules/@types", - "./src/typings" - ], - "types": [ - "youtube", - "node" - ] + "lib": ["dom", "es2015"], + "typeRoots": ["node_modules/@types", "./src/typings"], + "types": ["youtube", "node"] }, // "exclude": [ // "node_modules", // "static" // ], - "typeRoots": [ - "./node_modules/@types", - "./src/typings" - ] -} \ No newline at end of file + "typeRoots": ["./node_modules/@types", "./src/typings"] +} -- cgit v1.2.3-70-g09d2 From 2e3df73d84228b04b8d1f284b5e18f7e48fad759 Mon Sep 17 00:00:00 2001 From: brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> Date: Wed, 3 May 2023 16:04:02 -0400 Subject: debugging json import --- .../nodes/PhysicsBox/PhysicsSimulationBox.tsx | 22 +++++++++++----------- .../nodes/PhysicsBox/PhysicsSimulationWeight.tsx | 10 +++------- tsconfig.json | 3 ++- 3 files changed, 16 insertions(+), 19 deletions(-) (limited to 'tsconfig.json') diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx index 315e64e79..056f79368 100644 --- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx @@ -33,8 +33,8 @@ import { import Typography from "@mui/material/Typography"; import "./PhysicsSimulationBox.scss"; import InputField from "./PhysicsSimulationInputField"; -import questions from "./PhysicsSimulationQuestions.json"; -import tutorials from "./PhysicsSimulationTutorial.json"; +import * as questions from "./PhysicsSimulationQuestions.json"; +import * as tutorials from "./PhysicsSimulationTutorial.json"; import Wall from "./PhysicsSimulationWall"; import Weight from "./PhysicsSimulationWeight"; @@ -108,9 +108,9 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent; + this.dataDoc.answerInputFields = this.dataDoc.answerInputFields ??
; // this.dataDoc.currentForceSketch = this.dataDoc.currentForceSketch ?? null; // this.dataDoc.deleteMode = this.dataDoc.deleteMode ?? false; // this.dataDoc.forceSketches = this.dataDoc.forceSketches ?? []; @@ -163,11 +163,11 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent { // // Make sure weight doesn't go above max height // if (prevState.updatedStartPosY != this.state.updatedStartPosY || prevProps.startVelY != this.props.startVelY) { - // console.log('max height check') // if (this.props.dataDoc['simulationType'] == "One Weight") { // let maxYPos = this.state.updatedStartPosY; // if (this.props.startVelY != 0) { @@ -258,9 +257,9 @@ export default class Weight extends React.Component { // } // Check for collisions and update + if (!this.props.paused) { if (prevState.timer != this.state.timer) { - console.log('update') - if (!this.props.paused && !this.props.noMovement) { + if (!this.props.noMovement) { let collisions = false; if ( this.props.dataDoc['simulationType'] == "One Weight" || @@ -281,16 +280,15 @@ export default class Weight extends React.Component { this.setDisplayValues(); } } + } // Reset everything on reset button click if (prevProps.reset != this.props.reset) { - console.log('reset') this.resetEverything(); } // Convert from static to kinetic friction if/when weight slips on inclined plane if (prevState.xVelocity != this.state.xVelocity) { - console.log('friction') if ( this.props.dataDoc['simulationType'] == "Inclined Plane" && Math.abs(this.state.xVelocity) > 0.1 && @@ -407,7 +405,6 @@ export default class Weight extends React.Component { // Add/remove walls when simulation type changes if (prevProps.simulationType != this.props.simulationType) { - console.log('walls') let w: IWallProps[] = []; if (this.props.dataDoc['simulationType'] == "One Weight" || this.props.dataDoc['simulationType'] == "Inclined Plane") { w = this.props.wallPositions @@ -440,7 +437,6 @@ export default class Weight extends React.Component { const coordinatePair2 = Math.round(left + this.props.wedgeWidth) + "," + this.props.yMax + " "; const coordinatePair3 = Math.round(left) + "," + (this.props.yMax - this.props.wedgeHeight); const coord = coordinatePair1 + coordinatePair2 + coordinatePair3; - console.log('coord ', coord) this.setState({coordinates: coord}) } diff --git a/tsconfig.json b/tsconfig.json index 993ab13b9..06901fe31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,8 @@ "types": [ "youtube", "node" - ] + ], + "resolveJsonModule": true }, // "exclude": [ // "node_modules", -- cgit v1.2.3-70-g09d2