Hauptsatz der Differential- und Integralrechnung: Unterschied zwischen den Versionen
Markierung: Zurückgesetzt |
Markierung: Zurückgesetzt |
||
| Zeile 124: | Zeile 124: | ||
}); | }); | ||
// Event-Handler für die Aktualisierung des Labels | // Event-Handler für die Aktualisierung des Labels | ||
i1.baseLeft.on('drag', function() { | |||
i1.label.setText(() => { | |||
const a = i1.baseLeft.X().toFixed(2); | |||
const b = i1.baseRight.X().toFixed(2); | |||
const value = i1.Value().toFixed(4); | |||
return `\\[\\int_{${a}}^{${b}} f(x) \\, dx = ${value}\\]`; | |||
}); | |||
MathJax.typeset(); | |||
}); | |||
i1.baseRight.on('drag', function() { | |||
i1.label.setText(() => { | |||
const a = i1.baseLeft.X().toFixed(2); | |||
const b = i1.baseRight.X().toFixed(2); | |||
const value = i1.Value().toFixed(4); | |||
return `\\[\\int_{${a}}^{${b}} f(x) \\, dx = ${value}\\]`; | |||
}); | |||
MathJax.typeset(); | |||
}); | |||
// Beschriftung der Funktion mit f | // Beschriftung der Funktion mit f | ||
board.create('text', [3.5, 3, 'f'], { | board.create('text', [3.5, 3, 'f'], { | ||