@eaprelsky/nocturna-wheel 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -293,7 +293,7 @@
293
293
  /**
294
294
  * IconData.js
295
295
  * Auto-generated module containing inline SVG icons as data URLs
296
- * Generated at: 2025-11-23T10:05:26.626Z
296
+ * Generated at: 2025-11-27T18:13:39.810Z
297
297
  *
298
298
  * This file is automatically generated by the build process.
299
299
  * Do not edit manually - changes will be overwritten.
@@ -2338,17 +2338,37 @@
2338
2338
  ascendantAlignmentOffset = (360 - ascendantLon) % 360;
2339
2339
  }
2340
2340
 
2341
- // Add Roman numerals for house numbers
2341
+ // Create array of houses with their rotated angles and original indices
2342
+ const housesWithAngles = [];
2342
2343
  for (let i = 0; i < 12; i++) {
2343
- // Get house angle with rotation
2344
- let baseHouseAngle;
2344
+ let baseAngle;
2345
2345
  if (this.houseData && this.houseData.length >= 12) {
2346
- baseHouseAngle = this.getHouseLongitude(this.houseData[i]);
2346
+ baseAngle = this.getHouseLongitude(this.houseData[i]);
2347
2347
  } else {
2348
- baseHouseAngle = i * 30; // Default if no data
2348
+ baseAngle = i * 30; // Default if no data
2349
2349
  }
2350
- // Apply alignment offset and user rotation
2351
- const houseAngle = (baseHouseAngle + ascendantAlignmentOffset + rotationAngle) % 360;
2350
+ const rotatedAngle = (baseAngle + ascendantAlignmentOffset + rotationAngle) % 360;
2351
+
2352
+ housesWithAngles.push({
2353
+ originalIndex: i,
2354
+ baseAngle: baseAngle,
2355
+ rotatedAngle: rotatedAngle
2356
+ });
2357
+ }
2358
+
2359
+ // Sort by rotated angle to determine visual order
2360
+ housesWithAngles.sort((a, b) => a.rotatedAngle - b.rotatedAngle);
2361
+
2362
+ // Find which house is Ascendant (originally index 0) after rotation
2363
+ const ascendantVisualIndex = housesWithAngles.findIndex(h => h.originalIndex === 0);
2364
+
2365
+ // Render houses with correct numbering based on visual position
2366
+ housesWithAngles.forEach((house, visualIndex) => {
2367
+ const houseAngle = house.rotatedAngle;
2368
+
2369
+ // Calculate house number based on position relative to Ascendant
2370
+ // Counter-clockwise from Ascendant
2371
+ const houseNumber = ((visualIndex - ascendantVisualIndex + 12) % 12) + 1;
2352
2372
 
2353
2373
  // Offset text from house line clockwise
2354
2374
  const angle = (houseAngle + 15) % 360; // Place in middle of house segment, apply modulo
@@ -2384,15 +2404,15 @@
2384
2404
  text.setAttribute("dominant-baseline", "middle");
2385
2405
  }
2386
2406
 
2387
- // Set house number as text (Roman numeral)
2388
- text.textContent = AstrologyUtils.houseToRoman(i + 1);
2407
+ // Set house number as text (Roman numeral) - now based on visual position
2408
+ text.textContent = AstrologyUtils.houseToRoman(houseNumber);
2389
2409
 
2390
2410
  // Add tooltip with house information
2391
- this.svgUtils.addTooltip(text, `House ${i + 1}`);
2411
+ this.svgUtils.addTooltip(text, `House ${houseNumber}`);
2392
2412
 
2393
2413
  parentGroup.appendChild(text);
2394
2414
  elements.push(text);
2395
- }
2415
+ });
2396
2416
 
2397
2417
  return elements;
2398
2418
  }