mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
Implement vue math (#7759)
Adds support for entering math inside number widgets in vue mode  Migrates components to simple html elements (div and button) by borrowing styling from the (reverted) reka-ui migration in #6985. The existing (evil) litegraph eval code is extracted as a utility function and reused. This PR means we're entirely writing our own NumberField. Also adds support for scrubbing widgets like in litegraph  ### Known Issue - Scrubbing causes text to be highlighted, ~~starting a scrub from highlighted text will instead drag the text~~. - It seems this can only be prevented with `pointerdown.prevent`, but this requires a manual `input.focus()` which does not place the cursor at location of mouse click. (Obligatory: _It won't do you a bit of good to review math_) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7759-Implement-vue-math-2d46d73d365081b9acd4d6422669016e) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: DrJKL <DrJKL0424@gmail.com>
This commit is contained in:
@@ -159,8 +159,8 @@ export class VueNodeHelpers {
|
||||
getInputNumberControls(widget: Locator) {
|
||||
return {
|
||||
input: widget.locator('input'),
|
||||
incrementButton: widget.locator('button').first(),
|
||||
decrementButton: widget.locator('button').nth(1)
|
||||
decrementButton: widget.getByTestId('decrement'),
|
||||
incrementButton: widget.getByTestId('increment')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user