Compare commits

..
2 Commits
2 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "kikotools"
description = "Simple tools for ComfyUI"
version = "1.0.22"
version = "1.0.23"
license = {text = "MIT"}
dependencies = []
+10 -8
View File
@@ -159,15 +159,17 @@ app.registerExtension({
if (presetWidget.callback) {
presetWidget.callback(
swappedFormattedPreset,
app.canvas,
this,
presetWidget,
[0, 0],
null
);
}
if (widthWidget.callback) {
widthWidget.callback(h, this, widthWidget);
widthWidget.callback(widthWidget.value, app.canvas, this, [0, 0], null);
}
if (heightWidget.callback) {
heightWidget.callback(w, this, heightWidget);
heightWidget.callback(heightWidget.value, app.canvas, this, [0, 0], null);
}
} else {
// Swapped preset doesn't exist, switch to custom and swap manual values
@@ -176,13 +178,13 @@ app.registerExtension({
heightWidget.value = w;
if (presetWidget.callback) {
presetWidget.callback("custom", this, presetWidget);
presetWidget.callback("custom", app.canvas, this, [0, 0], null);
}
if (widthWidget.callback) {
widthWidget.callback(h, this, widthWidget);
widthWidget.callback(widthWidget.value, app.canvas, this, [0, 0], null);
}
if (heightWidget.callback) {
heightWidget.callback(w, this, heightWidget);
heightWidget.callback(heightWidget.value, app.canvas, this, [0, 0], null);
}
}
} else {
@@ -193,10 +195,10 @@ app.registerExtension({
// Trigger widget change events
if (widthWidget.callback) {
widthWidget.callback(widthWidget.value, this, widthWidget);
widthWidget.callback(widthWidget.value, app.canvas, this, [0, 0], null);
}
if (heightWidget.callback) {
heightWidget.callback(heightWidget.value, this, heightWidget);
heightWidget.callback(heightWidget.value, app.canvas, this, [0, 0], null);
}
}