Skip to content

Commit

Permalink
Use html.input
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih-erikli committed Dec 22, 2023
1 parent 128004b commit 6df4913
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/fontra/client/web-components/ui-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,17 @@ export class Form extends SimpleElement {
}

_addEditAngle(valueElement, fieldItem) {
const inputElement = document.createElement("input");
inputElement.type = "number";
inputElement.value = fieldItem.value;

inputElement.step = "any";

inputElement.disabled = fieldItem.disabled;
inputElement.onchange = (event) => {
let value = parseFloat(inputElement.value);
this._fieldChanging(fieldItem.key, value);
rotaryControl.value = value;
};
const inputElement = html.input({
type: "number",
value: fieldItem.value,
step: "any",
disabled: fieldItem.disabled,
onchange: () => {
let value = parseFloat(inputElement.value);
this._fieldChanging(fieldItem.key, value);
rotaryControl.value = value;
},
});
let valueStream;
const rotaryControl = html.createDomElement("rotary-control", {
value: fieldItem.value,
Expand Down

0 comments on commit 6df4913

Please sign in to comment.