Equation matrix
Options can be an object, or an array in the property order below
To test examples, append them to the boilerplate
// Simplefigure.add({ name: 'eqn', make: 'equation', elements: { lb: { symbol: 'squareBracket', side: 'left' }, rb: { symbol: 'squareBracket', side: 'right' }, }, forms: { 1: { matrix: [[2, 2], 'lb', ['a', 'b', 'c', 'd'], 'rb'] }, },});figure.elements._eqn.showForm('1'); Copy
// Simplefigure.add({ name: 'eqn', make: 'equation', elements: { lb: { symbol: 'squareBracket', side: 'left' }, rb: { symbol: 'squareBracket', side: 'right' }, }, forms: { 1: { matrix: [[2, 2], 'lb', ['a', 'b', 'c', 'd'], 'rb'] }, },});figure.elements._eqn.showForm('1');
// Some different equation examplesfigure.add({ name: 'eqn', make: 'equation', elements: { lb: { symbol: 'squareBracket', side: 'left' }, rb: { symbol: 'squareBracket', side: 'right' }, v: { symbol: 'vinculum' }, }, phrases: { f: { frac: ['a', 'v', 'b'] }, }, forms: { // Array equation 2x2 matrix 1: { matrix: [[2, 2], 'lb', ['a', 'b', 'c', 'd'], 'rb'] }, // Object definition vector 2: { matrix: { content: ['a', 'b', 'c', 'd'], left: 'lb', right: 'rb', order: [1, 4], }, }, // Additional options for layout 3: { matrix: { content: ['f', 'wxyz', 'c', 'd'], symbol: 'bSqr', left: 'lb', right: 'rb', order: [2, 2], }, }, // Fixed size matrix cells 4: { matrix: { content: ['f', 'wxyz', 'c', 'd'], symbol: 'bSqr', left: 'lb', right: 'rb', order: [2, 2], fit: [0.2, 0.2], yAlign: 'middle', }, }, }, formSeries: ['1', '2', '3', '4']});const eqn = figure.elements._eqn;eqn.onClick = () => eqn.nextForm();eqn.setTouchable();eqn.showForm('1');@interface Copy
// Some different equation examplesfigure.add({ name: 'eqn', make: 'equation', elements: { lb: { symbol: 'squareBracket', side: 'left' }, rb: { symbol: 'squareBracket', side: 'right' }, v: { symbol: 'vinculum' }, }, phrases: { f: { frac: ['a', 'v', 'b'] }, }, forms: { // Array equation 2x2 matrix 1: { matrix: [[2, 2], 'lb', ['a', 'b', 'c', 'd'], 'rb'] }, // Object definition vector 2: { matrix: { content: ['a', 'b', 'c', 'd'], left: 'lb', right: 'rb', order: [1, 4], }, }, // Additional options for layout 3: { matrix: { content: ['f', 'wxyz', 'c', 'd'], symbol: 'bSqr', left: 'lb', right: 'rb', order: [2, 2], }, }, // Fixed size matrix cells 4: { matrix: { content: ['f', 'wxyz', 'c', 'd'], symbol: 'bSqr', left: 'lb', right: 'rb', order: [2, 2], fit: [0.2, 0.2], yAlign: 'middle', }, }, }, formSeries: ['1', '2', '3', '4']});const eqn = figure.elements._eqn;eqn.onClick = () => eqn.nextForm();eqn.setTouchable();eqn.showForm('1');@interface
Equation matrix
Options can be an object, or an array in the property order below
See
To test examples, append them to the boilerplate
Example
Example