1.1.22 • Published 2 years ago
@teachingtextbooks/mathgriddisplay v1.1.22
@teachingtextbooks/mathgriddisplay
This is a library for displaying math grids that are created by the MathGrid App. It is used to display the grids in various other Teaching Textbooks applications and lessons.
Installation
npm i @teachingtextbooks/mathgriddisplay
styling
The code has default styling that can be used. If you want to use your own styling, have a look at the mathgrid.css file in the dist folder to see what classes are used.
Usage - Typescript
window.onload = function () {
//teachtextbooks mathgrid
//inject the standard mathgrid css into the page
//only use this if you are not providing your own mathgrid css
MathGrid.injectCSS();
//get the element that will contain the mathgrid
//it can be any element that you can get a reference to
let el: HTMLElement = document.getElementsByClassName("mathGrid")[0] as HTMLElement;
if (el) {
const lti: string = "TT.RD.SIMPLE";
//OTHER LTI OPTIONS FOR TESTING
//const lti:string = "TT.RD.SAMPLES";
//pass in the lti, the element, and a callback function, trim is optional
//trim will remove the extra space around the mathgrid
const useTrim:boolean = true;
const md: MathGrid = new MathGrid(lti, el, () => {
//this callback is called when the mathgrid is ready to be used
//you can use this to show a specific step
// md.showStep(0);
},useTrim);
}
};1.1.22
2 years ago
1.1.21
2 years ago
1.1.20
2 years ago
1.1.19
3 years ago
1.1.18
3 years ago
1.1.17
3 years ago
1.1.16
3 years ago
1.1.15
3 years ago
1.1.14
3 years ago
1.1.13
3 years ago
1.1.12
3 years ago
1.1.11
3 years ago
1.1.10
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago

