@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.
@@ -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-16T11:33:48.632Z
290
+ * Generated at: 2025-11-21T17:08:55.797Z
291
291
  *
292
292
  * This file is automatically generated by the build process.
293
293
  * Do not edit manually - changes will be overwritten.
@@ -2834,7 +2834,8 @@ class PlanetPositionCalculator {
2834
2834
  const adjustedPositions = [...positions];
2835
2835
 
2836
2836
  // The minimum angular distance needed to prevent overlap at base radius
2837
- const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI);
2837
+ // Add safety factor to ensure visual separation
2838
+ const minAngularDistance = (minDistance / baseRadius) * (180 / Math.PI) * 1.3; // 30% extra spacing
2838
2839
  console.log(`PlanetPositionCalculator: Minimum angular distance: ${minAngularDistance.toFixed(2)}°`);
2839
2840
 
2840
2841
  // Sort positions by longitude for overlap detection
@@ -2984,10 +2985,16 @@ class PlanetPositionCalculator {
2984
2985
  static _distributeClusterByAngle(positions, radius, minAngularDistance, centerX, centerY, iconSize) {
2985
2986
  const n = positions.length;
2986
2987
 
2988
+ // If only one planet, keep its original position
2989
+ if (n === 1) {
2990
+ this._setExactPosition(positions[0], positions[0].longitude, radius, centerX, centerY, iconSize);
2991
+ return;
2992
+ }
2993
+
2987
2994
  // Sort positions by their original longitude to maintain order
2988
2995
  positions.sort((a, b) => a.longitude - b.longitude);
2989
2996
 
2990
- // Calculate central angle and total span needed
2997
+ // Calculate central angle and total span
2991
2998
  const firstPos = positions[0].longitude;
2992
2999
  const lastPos = positions[n-1].longitude;
2993
3000
  let totalArc = lastPos - firstPos;
@@ -2997,26 +3004,25 @@ class PlanetPositionCalculator {
2997
3004
  totalArc = (360 + lastPos - firstPos) % 360;
2998
3005
  }
2999
3006
 
3000
- // Calculate the center of the cluster
3001
- let centerAngle = (firstPos + totalArc/2) % 360;
3007
+ // Calculate the center of the cluster (weighted average of all positions)
3008
+ let sumAngles = 0;
3009
+ for (let i = 0; i < n; i++) {
3010
+ sumAngles += positions[i].longitude;
3011
+ }
3012
+ let centerAngle = (sumAngles / n) % 360;
3002
3013
 
3003
3014
  // Determine minimum arc needed for n planets with minimum spacing
3004
- const minRequiredArc = (n - 1) * minAngularDistance;
3015
+ // Add extra spacing factor to ensure planets don't overlap
3016
+ const minRequiredArc = (n - 1) * minAngularDistance * 1.2; // 20% extra spacing
3005
3017
 
3006
- // Calculate total span to use (either natural spacing or minimum required)
3007
- const spanToUse = Math.max(totalArc, minRequiredArc);
3018
+ // Always use at least the minimum required arc
3019
+ const spanToUse = Math.max(minRequiredArc, totalArc);
3008
3020
 
3009
3021
  // Calculate start angle (center - half of span)
3010
3022
  const startAngle = (centerAngle - spanToUse/2 + 360) % 360;
3011
3023
 
3012
3024
  // Distribute planets evenly from the start angle
3013
3025
  for (let i = 0; i < n; i++) {
3014
- // If only one planet, keep its original position
3015
- if (n === 1) {
3016
- this._setExactPosition(positions[i], positions[i].longitude, radius, centerX, centerY, iconSize);
3017
- continue;
3018
- }
3019
-
3020
3026
  const angle = (startAngle + i * (spanToUse / (n-1))) % 360;
3021
3027
  this._setExactPosition(positions[i], angle, radius, centerX, centerY, iconSize);
3022
3028
  }
@@ -3988,7 +3994,7 @@ class ClientSideAspectRenderer extends BaseRenderer { // No longer extends IAspe
3988
3994
  class: `projection-dot projection-${planet.name}`,
3989
3995
  fill: 'none',
3990
3996
  stroke: planet.color || '#666666',
3991
- 'stroke-width': '1.5'
3997
+ 'stroke-width': '1'
3992
3998
  });
3993
3999
 
3994
4000
  // Add tooltip