Add display toggle

This commit is contained in:
Sauli Anto
2019-09-17 15:47:58 +03:00
parent 13a10dcfdd
commit a89cadeac5
5 changed files with 50 additions and 9 deletions

View File

@@ -8,8 +8,9 @@ export default class MathView extends View {
this.engine = engine;
this.set( 'value', '' );
this.set( 'display', false);
this.on( 'change:value', () => {
this.on( 'change', () => {
this.updateMath();
} );
@@ -25,7 +26,7 @@ export default class MathView extends View {
}
updateMath() {
renderEquation( this.value, this.element, this.engine );
renderEquation( this.value, this.element, this.engine, this.display );
}
render() {