show bitmatrix editor in modal when more than 1 frame

This commit is contained in:
Peli de Halleux 2015-05-05 21:57:50 -07:00
Родитель 0330ce3221
Коммит 6690dcf950
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -50,6 +50,7 @@ module TDev
private rows: number;
private frames: number;
private bitCells: HTMLElement[];
private dialog: ModalDialog;
constructor(public calculator: Calculator, public literal: AST.Literal) {
super(calculator, literal);
@ -121,10 +122,20 @@ module TDev
cell.appendChild(div(''));
});
});
if (!this.dialog && this.frames > 1) {
this.dialog = new ModalDialog();
this.dialog.add(this.root);
this.dialog.fullWhite();
this.dialog.stretchWide();
this.dialog.setScroll();
this.dialog.onDismiss = () => this.calculator.checkNextDisplay();
this.dialog.show();
}
}
public editor(): HTMLElement {
return this.root;
return this.dialog ? div('') : this.root;
}
private serialize(f: number): string {