1.1.22 • Published 1 year ago

@teachingtextbooks/mathgriddisplay v1.1.22

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year 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

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago