bugfixing
This commit is contained in:
parent
f26cdc128b
commit
ccc39cac9a
4
main.js
4
main.js
@ -37,8 +37,8 @@ clear.addHandler(canvas.clear.bind(canvas));
|
||||
window.addEventListener("resize", onWindowResize, false);
|
||||
|
||||
let form = new Form(panelWidth, panelHeight - panelPaddingTop);
|
||||
let randomBox = new SwitchBox(random, 50, 30);
|
||||
let amountBox = new NumericBox(50, 100);
|
||||
let randomBox = new SwitchBox(random, 60, 30);
|
||||
let amountBox = new NumericBox(100, 30);
|
||||
amountBox.setValue(amountOfShapes);
|
||||
|
||||
form.addLine("random", "Random amount of shapes",randomBox);
|
||||
|
@ -92,6 +92,8 @@ button:hover {
|
||||
}
|
||||
|
||||
.form > div {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
-webkit-transition: height 0.2s ease-in-out;
|
||||
-moz-transition: height 0.2s ease-in-out;
|
||||
-ms-transition: height 0.2s ease-in-out;
|
||||
@ -100,6 +102,8 @@ button:hover {
|
||||
}
|
||||
|
||||
.form > div > div {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ class NumericBox extends UI {
|
||||
this._input.addEventListener("input", this._boundInput);
|
||||
}
|
||||
_createInput() {
|
||||
this._input = document.createElement("div");
|
||||
this._input = document.createElement("input");
|
||||
this._input.classList.add("numericBox");
|
||||
|
||||
this.element.appendChild(this._input);
|
||||
|
@ -60,13 +60,13 @@ class SwitchBox extends UI {
|
||||
this.setValue(!this._value);
|
||||
}
|
||||
_setSize() {
|
||||
let dh = this._width / 2.5;
|
||||
let dh = this._width / 2;
|
||||
dh = Math.min(dh, this._height);
|
||||
let dw = dh * 2.5;
|
||||
let dw = dh * 2;
|
||||
|
||||
this._iWidth = dw;
|
||||
this._iHeight = dh;
|
||||
let circleDiameter = Math.round(dh * 0.80);
|
||||
let circleDiameter = Math.round(dh * 0.75);
|
||||
|
||||
this._input.style.width = dw + "px";
|
||||
this._input.style.height = dh + "px";
|
||||
|
Loading…
Reference in New Issue
Block a user