@eaprelsky/nocturna-wheel 3.1.1 → 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.
- package/README.md +41 -1
- package/dist/nocturna-wheel.bundle.js +46 -12
- package/dist/nocturna-wheel.bundle.js.map +1 -1
- package/dist/nocturna-wheel.es.js +46 -12
- package/dist/nocturna-wheel.es.js.map +1 -1
- package/dist/nocturna-wheel.min.js +1 -1
- package/dist/nocturna-wheel.min.js.map +1 -1
- package/dist/nocturna-wheel.umd.js +46 -12
- package/dist/nocturna-wheel.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
296
|
+
* Generated at: 2025-11-27T18:13:39.048Z
|
|
297
297
|
*
|
|
298
298
|
* This file is automatically generated by the build process.
|
|
299
299
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -1131,6 +1131,13 @@
|
|
|
1131
1131
|
mc: this.astronomicalData.mc
|
|
1132
1132
|
}
|
|
1133
1133
|
);
|
|
1134
|
+
|
|
1135
|
+
// Auto-rotate the wheel to position the Ascendant at 9 o'clock
|
|
1136
|
+
// Only set if not already explicitly configured
|
|
1137
|
+
if (this.houseCusps.length > 0 && this.houseSettings.rotationAngle === 0) {
|
|
1138
|
+
console.log(`ChartConfig: Auto-rotating wheel to Ascendant at ${this.astronomicalData.ascendant}°`);
|
|
1139
|
+
this.houseSettings.rotationAngle = this.astronomicalData.ascendant;
|
|
1140
|
+
}
|
|
1134
1141
|
} catch (error) {
|
|
1135
1142
|
console.error("Failed to calculate house cusps:", error?.message || error);
|
|
1136
1143
|
// Set empty cusps array if calculation fails
|
|
@@ -2331,17 +2338,37 @@
|
|
|
2331
2338
|
ascendantAlignmentOffset = (360 - ascendantLon) % 360;
|
|
2332
2339
|
}
|
|
2333
2340
|
|
|
2334
|
-
//
|
|
2341
|
+
// Create array of houses with their rotated angles and original indices
|
|
2342
|
+
const housesWithAngles = [];
|
|
2335
2343
|
for (let i = 0; i < 12; i++) {
|
|
2336
|
-
|
|
2337
|
-
let baseHouseAngle;
|
|
2344
|
+
let baseAngle;
|
|
2338
2345
|
if (this.houseData && this.houseData.length >= 12) {
|
|
2339
|
-
|
|
2346
|
+
baseAngle = this.getHouseLongitude(this.houseData[i]);
|
|
2340
2347
|
} else {
|
|
2341
|
-
|
|
2348
|
+
baseAngle = i * 30; // Default if no data
|
|
2342
2349
|
}
|
|
2343
|
-
|
|
2344
|
-
|
|
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;
|
|
2345
2372
|
|
|
2346
2373
|
// Offset text from house line clockwise
|
|
2347
2374
|
const angle = (houseAngle + 15) % 360; // Place in middle of house segment, apply modulo
|
|
@@ -2377,15 +2404,15 @@
|
|
|
2377
2404
|
text.setAttribute("dominant-baseline", "middle");
|
|
2378
2405
|
}
|
|
2379
2406
|
|
|
2380
|
-
// Set house number as text (Roman numeral)
|
|
2381
|
-
text.textContent = AstrologyUtils.houseToRoman(
|
|
2407
|
+
// Set house number as text (Roman numeral) - now based on visual position
|
|
2408
|
+
text.textContent = AstrologyUtils.houseToRoman(houseNumber);
|
|
2382
2409
|
|
|
2383
2410
|
// Add tooltip with house information
|
|
2384
|
-
this.svgUtils.addTooltip(text, `House ${
|
|
2411
|
+
this.svgUtils.addTooltip(text, `House ${houseNumber}`);
|
|
2385
2412
|
|
|
2386
2413
|
parentGroup.appendChild(text);
|
|
2387
2414
|
elements.push(text);
|
|
2388
|
-
}
|
|
2415
|
+
});
|
|
2389
2416
|
|
|
2390
2417
|
return elements;
|
|
2391
2418
|
}
|
|
@@ -4916,6 +4943,13 @@
|
|
|
4916
4943
|
|
|
4917
4944
|
this.houses = options.houses || [];
|
|
4918
4945
|
|
|
4946
|
+
// Auto-rotate the wheel if houses are provided
|
|
4947
|
+
// This ensures the Ascendant (1st house cusp) is positioned at 9 o'clock
|
|
4948
|
+
if (this.houses.length > 0 && this.houses[0] && typeof this.houses[0].lon === 'number') {
|
|
4949
|
+
console.log(`NocturnaWheel: Auto-rotating wheel to Ascendant at ${this.houses[0].lon}°`);
|
|
4950
|
+
this.config.houseSettings.rotationAngle = this.houses[0].lon;
|
|
4951
|
+
}
|
|
4952
|
+
|
|
4919
4953
|
// Override aspect settings if provided (legacy support)
|
|
4920
4954
|
if (options.aspectSettings) {
|
|
4921
4955
|
this.config.updateAspectSettings(options.aspectSettings);
|