1.1.22 • Published 3 months ago

@teachingtextbooks/mathgriddisplay v1.1.22

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

@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.

https://www.npmjs.com/package/@teachingtextbooks/mathgriddisplay?activeTab=code

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

3 months ago

1.1.21

3 months ago

1.1.20

3 months ago

1.1.19

7 months ago

1.1.18

9 months ago

1.1.17

9 months ago

1.1.16

9 months ago

1.1.15

9 months ago

1.1.14

9 months ago

1.1.13

9 months ago

1.1.12

9 months ago

1.1.11

9 months ago

1.1.10

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago