1.1.0 • Published 1 year ago

inequality v1.1.0

Weekly downloads
8
License
Apache-2.0
Repository
github
Last release
1 year 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.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.9.34

2 years ago

0.9.35

2 years ago

0.9.36

2 years ago

0.9.37

2 years ago

0.9.32

3 years ago

0.9.33

3 years ago

0.9.31

3 years ago

0.9.30

3 years ago

0.9.29

4 years ago

0.9.27

4 years ago

0.9.28

4 years ago

0.9.26

4 years ago

0.9.25

4 years ago

0.9.24

4 years ago

0.9.23

4 years ago

0.9.22

4 years ago

0.9.21

4 years ago

0.9.20

4 years ago

0.9.19

4 years ago

0.9.18

4 years ago

0.9.17

4 years ago

0.9.16

5 years ago

0.9.15

5 years ago

0.9.14

5 years ago

0.9.13

5 years ago

0.9.12

5 years ago

0.9.11

5 years ago

0.9.10

5 years ago

0.9.9

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.6

5 years ago

0.9.5

5 years ago

0.9.4

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago