@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.
@@ -287,7 +287,7 @@ class IconProvider {
287
287
  /**
288
288
  * IconData.js
289
289
  * Auto-generated module containing inline SVG icons as data URLs
290
- * Generated at: 2025-11-23T10:05:25.858Z
290
+ * Generated at: 2025-11-27T18:13:39.048Z
291
291
  *
292
292
  * This file is automatically generated by the build process.
293
293
  * Do not edit manually - changes will be overwritten.
@@ -2332,17 +2332,37 @@ class HouseRenderer extends BaseRenderer {
2332
2332
  ascendantAlignmentOffset = (360 - ascendantLon) % 360;
2333
2333
  }
2334
2334
 
2335
- // Add Roman numerals for house numbers
2335
+ // Create array of houses with their rotated angles and original indices
2336
+ const housesWithAngles = [];
2336
2337
  for (let i = 0; i < 12; i++) {
2337
- // Get house angle with rotation
2338
- let baseHouseAngle;
2338
+ let baseAngle;
2339
2339
  if (this.houseData && this.houseData.length >= 12) {
2340
- baseHouseAngle = this.getHouseLongitude(this.houseData[i]);
2340
+ baseAngle = this.getHouseLongitude(this.houseData[i]);
2341
2341
  } else {
2342
- baseHouseAngle = i * 30; // Default if no data
2342
+ baseAngle = i * 30; // Default if no data
2343
2343
  }
2344
- // Apply alignment offset and user rotation
2345
- const houseAngle = (baseHouseAngle + ascendantAlignmentOffset + rotationAngle) % 360;
2344
+ const rotatedAngle = (baseAngle + ascendantAlignmentOffset + rotationAngle) % 360;
2345
+
2346
+ housesWithAngles.push({
2347
+ originalIndex: i,
2348
+ baseAngle: baseAngle,
2349
+ rotatedAngle: rotatedAngle
2350
+ });
2351
+ }
2352
+
2353
+ // Sort by rotated angle to determine visual order
2354
+ housesWithAngles.sort((a, b) => a.rotatedAngle - b.rotatedAngle);
2355
+
2356
+ // Find which house is Ascendant (originally index 0) after rotation
2357
+ const ascendantVisualIndex = housesWithAngles.findIndex(h => h.originalIndex === 0);
2358
+
2359
+ // Render houses with correct numbering based on visual position
2360
+ housesWithAngles.forEach((house, visualIndex) => {
2361
+ const houseAngle = house.rotatedAngle;
2362
+
2363
+ // Calculate house number based on position relative to Ascendant
2364
+ // Counter-clockwise from Ascendant
2365
+ const houseNumber = ((visualIndex - ascendantVisualIndex + 12) % 12) + 1;
2346
2366
 
2347
2367
  // Offset text from house line clockwise
2348
2368
  const angle = (houseAngle + 15) % 360; // Place in middle of house segment, apply modulo
@@ -2378,15 +2398,15 @@ class HouseRenderer extends BaseRenderer {
2378
2398
  text.setAttribute("dominant-baseline", "middle");
2379
2399
  }
2380
2400
 
2381
- // Set house number as text (Roman numeral)
2382
- text.textContent = AstrologyUtils.houseToRoman(i + 1);
2401
+ // Set house number as text (Roman numeral) - now based on visual position
2402
+ text.textContent = AstrologyUtils.houseToRoman(houseNumber);
2383
2403
 
2384
2404
  // Add tooltip with house information
2385
- this.svgUtils.addTooltip(text, `House ${i + 1}`);
2405
+ this.svgUtils.addTooltip(text, `House ${houseNumber}`);
2386
2406
 
2387
2407
  parentGroup.appendChild(text);
2388
2408
  elements.push(text);
2389
- }
2409
+ });
2390
2410
 
2391
2411
  return elements;
2392
2412
  }