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 Nov 29, 2023
1 parent f116211 commit a24267c
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 @@ -173,18 +173,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 a24267c

Please sign in to comment.