Equation container options
A container is useful to fix spacing around content as it changes between equation forms.
Options can be an object, or an array in the property order below
To test examples, append them to the boilerplate
// Example showing the difference between with and without containerfigure.add({ name: 'eqn', make: 'equation', forms: { // Container object definition 1: [ 'length', { container: { content: 'width', width: 0.5, }, }, 'height', ], // Container array definition 2: ['length', { container: ['w', 0.5] }, 'height'], // No container 3: ['length', ' ', 'w', ' ', 'height'] }, formSeries: ['1', '2', '3'],});const eqn = figure.elements._eqn;eqn.onClick = () => eqn.nextForm();eqn.setTouchable();eqn.showForm('1'); Copy
// Example showing the difference between with and without containerfigure.add({ name: 'eqn', make: 'equation', forms: { // Container object definition 1: [ 'length', { container: { content: 'width', width: 0.5, }, }, 'height', ], // Container array definition 2: ['length', { container: ['w', 0.5] }, 'height'], // No container 3: ['length', ' ', 'w', ' ', 'height'] }, formSeries: ['1', '2', '3'],});const eqn = figure.elements._eqn;eqn.onClick = () => eqn.nextForm();eqn.setTouchable();eqn.showForm('1');
// Create equation object then add to figureconst eqn = figure.collections.equation({ forms: { 1: [ 'length', { container: { content: 'width', width: 0.5 } }, 'height', ], 2: ['length', { container: ['w', 0.5] }, 'height'], 3: ['length', ' ', 'w', ' ', 'height'] }, formSeries: ['1', '2', '3'],});figure.add('eqn', eqn);eqn.onClick = () => eqn.nextForm();eqn.setTouchable();eqn.showForm('1');@interface Copy
// Create equation object then add to figureconst eqn = figure.collections.equation({ forms: { 1: [ 'length', { container: { content: 'width', width: 0.5 } }, 'height', ], 2: ['length', { container: ['w', 0.5] }, 'height'], 3: ['length', ' ', 'w', ' ', 'height'] }, formSeries: ['1', '2', '3'],});figure.add('eqn', eqn);eqn.onClick = () => eqn.nextForm();eqn.setTouchable();eqn.showForm('1');@interface
Equation container options
A container is useful to fix spacing around content as it changes between equation forms.
Options can be an object, or an array in the property order below
See
To test examples, append them to the boilerplate
Example
Example