mr-crocs-adventures/tilorswift/js/dialog/DialogAddColumns.js
2020-02-09 00:29:46 +01:00

28 lines
773 B
JavaScript

import Dialog from "./Dialog.js";
import TilorswiftAddColumnsEvent from "../events/TilorswiftAddColumnsEvent.js";
export default class DialogAddColumns extends Dialog
{
constructor() {
super();
this.inputPosition = this.createInputNumber('Einfügen vor Spalte');
this.inputColumns = this.createInputNumber('Anzahl Spalten');
this.buttonOk = this.createButton('OK');
this.buttonOk.addEventListener(
'click',
() => {
window.dispatchEvent(new TilorswiftAddColumnsEvent(this.getPosition(), this.getColumnCount()));
}
)
}
getPosition()
{
return this.inputPosition.value;
}
getColumnCount()
{
return this.inputColumns.value;
}
}