Skip to content

Commit

Permalink
Update TopPanel.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhenon committed Dec 9, 2023
1 parent e38c0af commit e6e1a37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/editor/panels/TopPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ class TopPanel {
y = convertUnit(y)
}
/**
* Updates the value of an input field if needed
* Updates the value of an input field if needed
* @param {string} id - The ID of the input element to be updated.
* @param {number} newValue - The new numeric value to set in the input field.
*/
const updateValue = (id, newValue) => {
const currentValue = $id(id).value // Get current value from the field
// do nothing if nothing changed...
if (parseFloat(currentValue) == newValue) {
// do nothing if nothing changed...
if (parseFloat(currentValue) === newValue) {
return
}
$id(id).value = newValue
Expand Down

0 comments on commit e6e1a37

Please sign in to comment.