@eaprelsky/nocturna-wheel 3.0.3 → 3.1.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/dist/assets/css/nocturna-wheel.css +16 -1
- package/dist/nocturna-wheel.bundle.js +21 -15
- package/dist/nocturna-wheel.bundle.js.map +1 -1
- package/dist/nocturna-wheel.es.js +21 -15
- 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 +21 -15
- 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-21T17:08:55.797Z
|
|
297
297
|
*
|
|
298
298
|
* This file is automatically generated by the build process.
|
|
299
299
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -2840,7 +2840,8 @@
|
|
|
2840
2840
|
const adjustedPositions = [...positions];
|
|
2841
2841
|
|
|
2842
2842
|
// The minimum angular distance needed to prevent overlap at base radius
|
|
2843
|
-
|
|
2843
|
+
// Add safety factor to ensure visual separation
|
|
2844
|
+
const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI) * 1.3; // 30% extra spacing
|
|
2844
2845
|
console.log(`PlanetPositionCalculator: Minimum angular distance: ${minAngularDistance.toFixed(2)}°`);
|
|
2845
2846
|
|
|
2846
2847
|
// Sort positions by longitude for overlap detection
|
|
@@ -2990,10 +2991,16 @@
|
|
|
2990
2991
|
static _distributeClusterByAngle(positions, radius, minAngularDistance, centerX, centerY, iconSize) {
|
|
2991
2992
|
const n = positions.length;
|
|
2992
2993
|
|
|
2994
|
+
// If only one planet, keep its original position
|
|
2995
|
+
if (n === 1) {
|
|
2996
|
+
this._setExactPosition(positions[0], positions[0].longitude, radius, centerX, centerY, iconSize);
|
|
2997
|
+
return;
|
|
2998
|
+
}
|
|
2999
|
+
|
|
2993
3000
|
// Sort positions by their original longitude to maintain order
|
|
2994
3001
|
positions.sort((a, b) => a.longitude - b.longitude);
|
|
2995
3002
|
|
|
2996
|
-
// Calculate central angle and total span
|
|
3003
|
+
// Calculate central angle and total span
|
|
2997
3004
|
const firstPos = positions[0].longitude;
|
|
2998
3005
|
const lastPos = positions[n-1].longitude;
|
|
2999
3006
|
let totalArc = lastPos - firstPos;
|
|
@@ -3003,26 +3010,25 @@
|
|
|
3003
3010
|
totalArc = (360 + lastPos - firstPos) % 360;
|
|
3004
3011
|
}
|
|
3005
3012
|
|
|
3006
|
-
// Calculate the center of the cluster
|
|
3007
|
-
let
|
|
3013
|
+
// Calculate the center of the cluster (weighted average of all positions)
|
|
3014
|
+
let sumAngles = 0;
|
|
3015
|
+
for (let i = 0; i < n; i++) {
|
|
3016
|
+
sumAngles += positions[i].longitude;
|
|
3017
|
+
}
|
|
3018
|
+
let centerAngle = (sumAngles / n) % 360;
|
|
3008
3019
|
|
|
3009
3020
|
// Determine minimum arc needed for n planets with minimum spacing
|
|
3010
|
-
|
|
3021
|
+
// Add extra spacing factor to ensure planets don't overlap
|
|
3022
|
+
const minRequiredArc = (n - 1) * minAngularDistance * 1.2; // 20% extra spacing
|
|
3011
3023
|
|
|
3012
|
-
//
|
|
3013
|
-
const spanToUse = Math.max(
|
|
3024
|
+
// Always use at least the minimum required arc
|
|
3025
|
+
const spanToUse = Math.max(minRequiredArc, totalArc);
|
|
3014
3026
|
|
|
3015
3027
|
// Calculate start angle (center - half of span)
|
|
3016
3028
|
const startAngle = (centerAngle - spanToUse/2 + 360) % 360;
|
|
3017
3029
|
|
|
3018
3030
|
// Distribute planets evenly from the start angle
|
|
3019
3031
|
for (let i = 0; i < n; i++) {
|
|
3020
|
-
// If only one planet, keep its original position
|
|
3021
|
-
if (n === 1) {
|
|
3022
|
-
this._setExactPosition(positions[i], positions[i].longitude, radius, centerX, centerY, iconSize);
|
|
3023
|
-
continue;
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
3032
|
const angle = (startAngle + i * (spanToUse / (n-1))) % 360;
|
|
3027
3033
|
this._setExactPosition(positions[i], angle, radius, centerX, centerY, iconSize);
|
|
3028
3034
|
}
|
|
@@ -3994,7 +4000,7 @@
|
|
|
3994
4000
|
class: `projection-dot projection-${planet.name}`,
|
|
3995
4001
|
fill: 'none',
|
|
3996
4002
|
stroke: planet.color || '#666666',
|
|
3997
|
-
'stroke-width': '1
|
|
4003
|
+
'stroke-width': '1'
|
|
3998
4004
|
});
|
|
3999
4005
|
|
|
4000
4006
|
// Add tooltip
|