* vector fields can now be reset by clicking on the header of the field
This commit is contained in:
@@ -111,6 +111,9 @@ You can colorize nodes via their `title background`, `node body` or `title text`
|
||||
<img src="https://github.com/user-attachments/assets/4459855c-c4e6-4739-811e-a6c90aa5a90c" alt="TICK Node Batch Support Output" width="384"/>
|
||||
</div>
|
||||
|
||||
**2024/02/23** @1.7.26:
|
||||
* vector fields can now be reset by clicking on the header of the field
|
||||
|
||||
**2024/02/22** @1.7.25:
|
||||
* cleanup api names
|
||||
* cleaned up typehints
|
||||
|
||||
+2
-2
@@ -75,8 +75,8 @@ JOV_CONFIG_FILE = JOV_WEB / 'config.json'
|
||||
# nodes to skip on import; for online systems; skip Export, Streamreader, etc...
|
||||
JOV_IGNORE_NODE = ROOT / 'ignore.txt'
|
||||
|
||||
JOV_LOG_LEVEL = os.getenv("JOV_LOG_LEVEL", "INFO")
|
||||
logger.configure(handlers=[{"sink": sys.stdout, "level": JOV_LOG_LEVEL}])
|
||||
logger.add(sys.stdout, level=os.getenv("JOV_LOG_LEVEL", "INFO"),
|
||||
filter=lambda record: "jovi" in record["extra"])
|
||||
|
||||
JOV_INTERNAL = os.getenv("JOV_INTERNAL", 'false').strip().lower() in ('true', '1', 't')
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "jovimetrix"
|
||||
description = "Integrates Webcam, MIDI, Spout and GLSL shader support. Animation via tick. Parameter manipulation with wave generator. Math operations with Unary and Binary support. Value conversion for all major types (int, string, list, dict, Image, Mask). Shape mask generation, image stacking and channel ops, batch splitting, merging and randomizing, load images and video from anywhere, dynamic bus routing with a single node, export support for GIPHY, save output anywhere! flatten, crop, transform; check colorblindness, make stereogram or stereoscopic images, or liner interpolate values and more."
|
||||
version = "1.7.25"
|
||||
version = "1.7.26"
|
||||
license = { file = "LICENSE" }
|
||||
readme = "README.md"
|
||||
authors = [{ name = "Alexander G. Morano", email = "amorano@gmail.com" }]
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/**
|
||||
* File: widget_vector.js
|
||||
* Project: Jovimetrix
|
||||
*/
|
||||
|
||||
|
||||
import { app } from "../../../scripts/app.js"
|
||||
import { widgetToInput, widgetToWidget } from '../util/util_widget.js'
|
||||
import { domInnerValueChange } from '../util/util.js'
|
||||
import { $el } from "../../../scripts/ui.js"
|
||||
import { widgetToInput, widgetToWidget, domInnerValueChange } from './util_jov.js'
|
||||
/** @import { IWidget, LGraphCanvas } from '../../types/litegraph/litegraph.d.ts' */
|
||||
|
||||
function isVersionLess(v1, v2) {
|
||||
@@ -164,7 +163,11 @@ const VectorWidget = (app, inputName, options, initial, desc='') => {
|
||||
const index = Math.floor(x / element_width);
|
||||
|
||||
pointer.onClick = (eUp) => {
|
||||
if (index >= 0 && index < size) {
|
||||
/* if click on header, reset to defaults */
|
||||
if (index == -1) {
|
||||
widget.value = Object.assign({}, widget.options.default);
|
||||
}
|
||||
else if (index >= 0 && index < size) {
|
||||
const pos = [eUp.canvasX - node.pos[0], eUp.canvasY - node.pos[1]]
|
||||
const old_value = { ...this.value };
|
||||
const label = this.options?.label ? this.name + '➖' + this.options.label?.[index] : this.name;
|
||||
|
||||
Reference in New Issue
Block a user