File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/geoParallelogramme1-PoENTPSe.js.map
{"version":3,"file":"geoParallelogramme1-PoENTPSe.js","sources":["../../src/exercices/geodyn/geoParallelogramme1.ts"],"sourcesContent":["import Exercice from '../ExerciceTs'\nimport Figure from 'apigeom'\nimport figureApigeom from '../../lib/figureApigeom'\n\nexport const titre = 'Tracer un parallélogramme'\nexport const dateDePublication = '9/11/2023'\nexport const interactifReady = true\nexport const interactifType = 'custom'\n\n/**\n * Tracer un rectangle\n * @author Rémi Angot\n * Références geoParallelogramme1\n */\n\nexport const ref = 'parallelogramme1'\nexport const uuid = '4d4a8'\n\nclass ConstructionParallelogramme extends Exercice {\n // On déclare des propriétés supplémentaires pour cet exercice afin de pouvoir les réutiliser dans la correction\n figure!: Figure\n idApigeom!: string\n constructor () {\n super()\n this.typeExercice = 'simple'\n this.nbQuestions = 1\n this.nbQuestionsModifiable = false\n this.reponse = ''\n this.formatChampTexte = 'none'\n this.exoCustomResultat = true\n }\n\n nouvelleVersion (): void {\n this.idApigeom = `apigeomEx${this.numeroExercice}F0`\n this.figure = new Figure({ xMin: 0, yMin: 0, width: 800, height: 500, border: true })\n this.figure.options.labelAutomaticBeginsWith = 'A'\n const A = this.figure.create('Point', { x: 8, y: 11, label: 'A' })\n const B = this.figure.create('Point', { x: 18, y: 12, label: 'B' })\n const C = this.figure.create('Point', { x: 20, y: 9, label: 'C' })\n this.figure.create('Segment', { point1: A, point2: B })\n this.figure.create('Segment', { point1: B, point2: C })\n\n const enonce = 'Placer le point $D$ tel que $ABCD$ soit un parallélogramme.'\n this.figure.setToolbar({ tools: ['POINT', 'POINT_ON', 'POINT_INTERSECTION', 'SEGMENT', 'LINE_PERPENDICULAR', 'LINE_PARALLEL', 'CIRCLE_CENTER_POINT', 'CIRCLE_RADIUS', 'NAME_POINT', 'DRAG', 'HIDE', 'REMOVE', 'UNDO', 'REDO', 'SHAKE'], position: 'top' })\n const emplacementPourFigure = figureApigeom({ exercice: this, idApigeom: this.idApigeom, figure: this.figure })\n const texteCorr = 'Un parallélogramme est un quadrilatère non croisé qui a ses côtés opposés parallèles deux à deux.'\n const figureCorrection = createAnimationConstructionRectangle()\n const emplacementPourFigureCorrection = figureApigeom({ animation: true, exercice: this, idApigeom: `apigeomEx${this.numeroExercice}Correction`, figure: figureCorrection })\n this.question = enonce + emplacementPourFigure\n this.correction = texteCorr + emplacementPourFigureCorrection\n }\n\n correctionInteractive = () => {\n this.answers = {}\n // Sauvegarde de la réponse pour Capytale\n this.answers[this.idApigeom] = this.figure.json\n const resultat = []\n let feedback = ''\n const divFeedback = document.querySelector(`#feedback${this.idApigeom}`) as HTMLDivElement\n const { isValid, message } = this.figure.checkParallel({ label1: 'AB', label2: 'CD' })\n resultat.push(isValid ? 'OK' : 'KO')\n if (message !== '') { feedback += message + '<br>' }\n const { isValid: isValid2, message: message2 } = this.figure.checkParallel({ label1: 'BC', label2: 'AD' })\n resultat.push(isValid2 ? 'OK' : 'KO')\n if (message2 !== '') { feedback += message2 + '<br>' }\n if (isValid && isValid2) {\n resultat.push('OK', 'OK', 'OK')\n feedback += 'Le quadrilatère $ABCD$ a ses côtés opposés parallèles deux à deux donc, s\\'il est non croisé, c\\'est bien un parallélogramme.'\n feedback += '<br>Bravo !'\n } else {\n resultat.push('KO', 'KO', 'KO')\n }\n divFeedback.innerHTML = feedback\n this.figure.isDynamic = false\n this.figure.divButtons.style.display = 'none'\n this.figure.divUserMessage.style.display = 'none'\n this.figure.buttons.get('SHAKE')?.click()\n return resultat\n }\n}\n\nexport default ConstructionParallelogramme\n\nfunction createAnimationConstructionRectangle () : Figure {\n const figure = new Figure({ xMin: 0, yMin: 0, width: 800, height: 500, border: true })\n figure.setToolbar({ position: 'top', tools: ['RESTART', 'PLAY_SKIP_BACK', 'PLAY', 'PLAY_SKIP_FORWARD', 'PAUSE'] })\n const description = figure.create('TextByPosition', { anchor: 'bottomLeft', backgroundColor: 'white', text: 'Si un quarilatère non croisé a ses côtés opoosés deux à deux de même longueur alors c\\'est un parallélogramme.', x: 10, y: 15 })\n const A = figure.create('Point', { x: 8, y: 11, label: 'A' })\n const B = figure.create('Point', { x: 18, y: 12, label: 'B' })\n const C = figure.create('Point', { x: 20, y: 9, label: 'C' })\n const sAB = figure.create('Segment', { point1: A, point2: B })\n const sBC = figure.create('Segment', { point1: B, point2: C })\n figure.saveState()\n description.text = 'On trace la droite parallèle à $(AB)$ passant par C.'\n const dCD = figure.create('LineParallel', { point: C, line: sAB })\n figure.saveState()\n description.text = 'On trace la droite parallèle à $(BC)$ passant par A.'\n const dAD = figure.create('LineParallel', { point: A, line: sBC })\n figure.saveState()\n description.text = 'On place le point $D$ à l\\'intersection des deux droites en utilisant bien le bouton « Point intersection » et pas le bouton « Point libre ».'\n const D = figure.create('PointIntersectionLL', { line1: dCD, line2: dAD, label: 'D' })\n figure.saveState()\n description.text = 'On peut cacher les droites et tracer le parallélogramme.'\n dCD.hide()\n dAD.hide()\n figure.create('Polygon', { points: [A, B, C, D] })\n figure.saveState()\n return figure\n}\n"],"names":["titre","dateDePublication","interactifReady","interactifType","ref","uuid","ConstructionParallelogramme","Exercice","__publicField","resultat","feedback","divFeedback","isValid","message","isValid2","message2","_a","Figure","A","B","C","enonce","emplacementPourFigure","figureApigeom","texteCorr","figureCorrection","createAnimationConstructionRectangle","emplacementPourFigureCorrection","figure","description","sAB","sBC","dCD","dAD","D"],"mappings":"wUAIO,MAAMA,EAAQ,4BACRC,EAAoB,YACpBC,EAAkB,GAClBC,EAAiB,SAQjBC,EAAM,mBACNC,EAAO,QAEpB,MAAMC,UAAoCC,CAAS,CAIjD,aAAe,CACP,QAHRC,EAAA,eACAA,EAAA,kBA+BAA,EAAA,6BAAwB,IAAM,OAC5B,KAAK,QAAU,GAEf,KAAK,QAAQ,KAAK,SAAS,EAAI,KAAK,OAAO,KAC3C,MAAMC,EAAW,CAAA,EACjB,IAAIC,EAAW,GACf,MAAMC,EAAc,SAAS,cAAc,YAAY,KAAK,SAAS,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