Files
EnragedAntelope-ComfyUI_Eas…/js
Claude da9c2eba5a CRITICAL FIX: Region selector to array index mapping
Bug: When user selected "Region 1" and edited box position, it was actually
moving Region 2's box instead.

Root Cause: transformFunc was using region selector value directly as array
index without converting from 1-based UI to 0-based array indexing.

- Region selector displays: "Region 1", "Region 2", etc. (1-based for users)
- Behind the scenes: array[0], array[1], etc. (0-based for storage)

Fix: In transformFunc, subtract 1 from region selector value before using as
array index:
  regionSelectorValue = 1 → arrayIndex = 0 → updates array[0] (Region 1)
  regionSelectorValue = 2 → arrayIndex = 1 → updates array[1] (Region 2)

Now editing "Region 1" box correctly updates the first region in the array.
2025-11-22 16:54:00 +00:00
..