mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
committed by
GitHub
parent
7626d08c98
commit
c73915e31e
@@ -21,7 +21,6 @@ app.registerExtension({
|
||||
const floatWeight = parseFloat(weight)
|
||||
if (isNaN(floatWeight)) return weight
|
||||
const newWeight = floatWeight + delta
|
||||
if (newWeight < 0) return '0'
|
||||
return String(Number(newWeight.toFixed(10)))
|
||||
}
|
||||
|
||||
@@ -143,7 +142,7 @@ app.registerExtension({
|
||||
// Increment the weight
|
||||
const weightDelta = event.key === 'ArrowUp' ? delta : -delta
|
||||
const updatedText = selectedText.replace(
|
||||
/\((.*):(\d+(?:\.\d+)?)\)/,
|
||||
/\((.*):([+-]?\d+(?:\.\d+)?)\)/,
|
||||
(match, text, weight) => {
|
||||
weight = incrementWeight(weight, weightDelta)
|
||||
if (weight == 1) {
|
||||
|
||||
Reference in New Issue
Block a user