Comfy-Org / litegraph.js

A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side using Node. It allows to export graphs as JSONs to be included in applications independently.
MIT License
52 stars 12 forks source link

[feature request] Use input type "number" on numbers #81

Open christian-byrne opened 2 months ago

christian-byrne commented 2 months ago

Originally from comfyanonymous/ComfyUI#1612:

Whenever you double click a numeric value to show the popup dialog to manually set it, the input type is text, which means you don't get the native up/down arrows and scroll wheel does nothing.

Switching those inputs to type="number" and adding step="0.05" would show the arrows, and allow keyboard up/down arrows > and mouse wheel to change the value in 0.05 increments/decrements. Also, min and max attributes can limit the values > whenever needed. Having to manually type values while you could use the mouse wheel to change them is rather cumbersome.

Input type number on MDN