mr-crocs-adventures/tilorswift/js/dialog/DialogAddRows.js

28 lines
749 B
JavaScript
Raw Normal View History

2020-02-09 00:29:46 +01:00
import Dialog from "./Dialog.js";
import TilorswiftAddRowsEvent from "../events/TilorswiftAddRowsEvent.js";
export default class DialogAddRows extends Dialog
{
constructor() {
super();
this.inputPosition = this.createInputNumber('Einfügen vor Zeile');
this.inputRows = this.createInputNumber('Anzahl Zeilen');
this.buttonOk = this.createButton('OK');
this.buttonOk.addEventListener(
'click',
() => {
window.dispatchEvent(new TilorswiftAddRowsEvent(this.getPosition(), this.getRowsCount()));
}
)
}
getPosition()
{
return this.inputPosition.value;
}
getRowsCount()
{
return this.inputRows.value;
}
}