Fix pose_keypoint preview widget management

- Preserve pretty_format widget when updating display
- Prevent duplicate JSON display widgets on multiple runs
- Keep only first widget (pretty_format) and replace display content

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
gear_machine
2025-08-16 18:24:26 +09:00
co-authored by Claude
parent 8cb0eab0d4
commit f8a8634676
+3 -2
View File
@@ -7,10 +7,11 @@ app.registerExtension({
if (nodeData.name === "PoseKeypointPreview") {
function populate(text) {
if (this.widgets) {
for (let i = 0; i < this.widgets.length; i++) {
// Remove all display widgets (keep only the first widget which is pretty_format)
for (let i = this.widgets.length - 1; i >= 1; i--) {
this.widgets[i].onRemove?.();
}
this.widgets.length = 0;
this.widgets.length = 1;
}
if (text && text.length > 0) {