1.2.3 • Published 5 months ago

inequality v1.2.3

Weekly downloads
8
License
Apache-2.0
Repository
github
Last release
5 months ago

Inequality

Multi-modal equation entry on the web.

Inequality is the drag-and-drop, symbolic entry system developed for Isaac Physics for users to enter symbolic maths (and chemistry, and boolean logic) in a way familiar to a high school student who does not know any other specialist syntax.

A demo is available -- and yes, we are aware of the naming irony here, that's what happens when you rewrite a legacy project.

For information on how to integrate Inequality into your project, please see https://github.com/isaacphysics/isaac-react-app/blob/master/src/app/components/pages/Equality.tsx

Documentation

Please see DOCS.md and inline code comments.

Usage

npm i --save inequality

or

yarn add inequality

import { makeInequality } from 'inequality';

let eqnEditorElement = document.querySelector('.equation-editor')[0];

let { sketch, p } = makeInequality(
    eqnEditorElement,
    eqnEditorElement.width(),
    eqnEditorElement.height(),
    [], // place your initial symbols here
    {
        fontItalicPath: 'assets/STIXGeneral-Italic.ttf', // Yes, this is a little awkward but p5 wants to load fonts from paths...
        fontRegularPath: 'assets/STIXGeneral-Regular.ttf',
    }
);
sketch.log = { initialState: [], actions: [] };
sketch.onNewEditorState = (s) => { /* Do something with the new state */ };
sketch.onCloseMenus = () => { /* You can use this to close menus if you have hiding menus */ };
sketch.isUserPrivileged = () => { /* Just return true here :) */ };
sketch.onNotifySymbolDrag = (x, y) => { /* This is useful with external menus */ };
sketch.isTrashActive = () => { /* This is useful when some menu elements or buttons are DOM elements */ };
1.2.0

6 months ago

1.2.3

5 months ago

1.2.2

5 months ago

1.2.1

6 months ago

1.1.5

7 months ago

1.1.4

8 months ago

1.1.1

10 months ago

1.1.3

9 months ago

1.1.2

10 months ago

1.1.0

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.9.34

3 years ago

0.9.35

3 years ago

0.9.36

3 years ago

0.9.37

3 years ago

0.9.32

4 years ago

0.9.33

4 years ago

0.9.31

4 years ago

0.9.30

4 years ago

0.9.29

5 years ago

0.9.27

5 years ago

0.9.28

5 years ago

0.9.26

5 years ago

0.9.25

5 years ago

0.9.24

5 years ago

0.9.23

5 years ago

0.9.22

5 years ago

0.9.21

5 years ago

0.9.20

5 years ago

0.9.19

5 years ago

0.9.18

5 years ago

0.9.17

5 years ago

0.9.16

6 years ago

0.9.15

6 years ago

0.9.14

6 years ago

0.9.13

6 years ago

0.9.12

6 years ago

0.9.11

6 years ago

0.9.10

6 years ago

0.9.9

6 years ago

0.9.8

6 years ago

0.9.7

6 years ago

0.9.6

6 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago