mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
UI for adding rows and columns.
This commit is contained in:
28
tilorswift/js/dialog/DialogAddColumns.js
Normal file
28
tilorswift/js/dialog/DialogAddColumns.js
Normal file
@@ -0,0 +1,28 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user