@eric-emg/symphiq-components 1.2.63 → 1.2.65
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.
|
@@ -11127,11 +11127,19 @@ class TooltipContainerComponent {
|
|
|
11127
11127
|
const tooltipWidth = 384;
|
|
11128
11128
|
const padding = 10;
|
|
11129
11129
|
const bounds = this.viewportBounds();
|
|
11130
|
-
// Calculate effective viewport width
|
|
11131
|
-
const effectiveLeft =
|
|
11130
|
+
// Calculate effective viewport width - use actual window edges
|
|
11131
|
+
const effectiveLeft = 0;
|
|
11132
11132
|
const effectiveRight = bounds?.right ?? window.innerWidth;
|
|
11133
|
+
console.log('🎯 [shouldCenter calculation]', {
|
|
11134
|
+
position,
|
|
11135
|
+
effectiveLeft,
|
|
11136
|
+
effectiveRight,
|
|
11137
|
+
'rect.left': rect.left,
|
|
11138
|
+
'rect.width': rect.width
|
|
11139
|
+
});
|
|
11133
11140
|
// For 'auto' positioning, always center horizontally
|
|
11134
11141
|
if (position === 'auto') {
|
|
11142
|
+
console.log('✅ [shouldCenter] auto = true');
|
|
11135
11143
|
return true;
|
|
11136
11144
|
}
|
|
11137
11145
|
if (position === 'top' || position === 'bottom') {
|
|
@@ -11139,8 +11147,17 @@ class TooltipContainerComponent {
|
|
|
11139
11147
|
const halfWidth = tooltipWidth / 2;
|
|
11140
11148
|
const wouldGoOffLeft = centerPosition - halfWidth < effectiveLeft + padding;
|
|
11141
11149
|
const wouldGoOffRight = centerPosition + halfWidth > effectiveRight - padding;
|
|
11142
|
-
|
|
11150
|
+
const result = !wouldGoOffLeft && !wouldGoOffRight;
|
|
11151
|
+
console.log('🎯 [shouldCenter] top/bottom', {
|
|
11152
|
+
centerPosition,
|
|
11153
|
+
halfWidth,
|
|
11154
|
+
wouldGoOffLeft,
|
|
11155
|
+
wouldGoOffRight,
|
|
11156
|
+
result
|
|
11157
|
+
});
|
|
11158
|
+
return result;
|
|
11143
11159
|
}
|
|
11160
|
+
console.log('❌ [shouldCenter] other position = false');
|
|
11144
11161
|
return false;
|
|
11145
11162
|
}, ...(ngDevMode ? [{ debugName: "shouldCenter" }] : []));
|
|
11146
11163
|
this.containerClass = computed(() => {
|
|
@@ -11196,6 +11213,17 @@ class TooltipContainerComponent {
|
|
|
11196
11213
|
// Don't let container bounds force tooltips away from edges
|
|
11197
11214
|
const effectiveLeft = 0;
|
|
11198
11215
|
const effectiveRight = bounds?.right ?? window.innerWidth;
|
|
11216
|
+
console.log('🔍 [Tooltip calculateLeft]', {
|
|
11217
|
+
position,
|
|
11218
|
+
'rect.left': rect.left,
|
|
11219
|
+
'rect.right': rect.right,
|
|
11220
|
+
'rect.width': rect.width,
|
|
11221
|
+
tooltipWidth,
|
|
11222
|
+
bounds,
|
|
11223
|
+
effectiveLeft,
|
|
11224
|
+
effectiveRight,
|
|
11225
|
+
'window.innerWidth': window.innerWidth
|
|
11226
|
+
});
|
|
11199
11227
|
// Handle 'auto' positioning with mouse coordinates
|
|
11200
11228
|
if (position === 'auto' && mousePos) {
|
|
11201
11229
|
const halfWidth = tooltipWidth / 2;
|
|
@@ -11217,16 +11245,31 @@ class TooltipContainerComponent {
|
|
|
11217
11245
|
// Check if centered tooltip would go off bounds
|
|
11218
11246
|
const wouldGoOffLeft = centerPosition - halfWidth < effectiveLeft + padding;
|
|
11219
11247
|
const wouldGoOffRight = centerPosition + halfWidth > effectiveRight - padding;
|
|
11248
|
+
console.log('📍 [Tooltip top/bottom calculation]', {
|
|
11249
|
+
centerPosition,
|
|
11250
|
+
halfWidth,
|
|
11251
|
+
'centerPosition - halfWidth': centerPosition - halfWidth,
|
|
11252
|
+
'centerPosition + halfWidth': centerPosition + halfWidth,
|
|
11253
|
+
wouldGoOffLeft,
|
|
11254
|
+
wouldGoOffRight,
|
|
11255
|
+
'effectiveLeft + padding': effectiveLeft + padding,
|
|
11256
|
+
'effectiveRight - padding': effectiveRight - padding
|
|
11257
|
+
});
|
|
11220
11258
|
if (wouldGoOffLeft) {
|
|
11221
11259
|
// Align to left edge with padding
|
|
11222
|
-
|
|
11260
|
+
const result = effectiveLeft + padding + halfWidth;
|
|
11261
|
+
console.log('⬅️ [Tooltip adjusting LEFT]', { result });
|
|
11262
|
+
return result;
|
|
11223
11263
|
}
|
|
11224
11264
|
else if (wouldGoOffRight) {
|
|
11225
11265
|
// Align to right edge with padding
|
|
11226
|
-
|
|
11266
|
+
const result = effectiveRight - padding - halfWidth;
|
|
11267
|
+
console.log('➡️ [Tooltip adjusting RIGHT]', { result });
|
|
11268
|
+
return result;
|
|
11227
11269
|
}
|
|
11228
11270
|
else {
|
|
11229
11271
|
// Center normally (transform will be applied)
|
|
11272
|
+
console.log('🎯 [Tooltip centered]', { centerPosition });
|
|
11230
11273
|
return centerPosition;
|
|
11231
11274
|
}
|
|
11232
11275
|
}
|
|
@@ -11234,20 +11277,28 @@ class TooltipContainerComponent {
|
|
|
11234
11277
|
const leftPosition = rect.left - tooltipWidth - 8;
|
|
11235
11278
|
// If tooltip would go off left edge, position it to the right instead
|
|
11236
11279
|
if (leftPosition < effectiveLeft + padding) {
|
|
11237
|
-
|
|
11280
|
+
const result = rect.right + 8;
|
|
11281
|
+
console.log('⬅️➡️ [Tooltip LEFT flipped to RIGHT]', { leftPosition, result });
|
|
11282
|
+
return result;
|
|
11238
11283
|
}
|
|
11284
|
+
console.log('⬅️ [Tooltip LEFT]', { leftPosition });
|
|
11239
11285
|
return leftPosition;
|
|
11240
11286
|
}
|
|
11241
11287
|
case 'right': {
|
|
11242
11288
|
const rightPosition = rect.right + 8;
|
|
11243
11289
|
// If tooltip would go off right edge, position it to the left instead
|
|
11244
11290
|
if (rightPosition + tooltipWidth > effectiveRight - padding) {
|
|
11245
|
-
|
|
11291
|
+
const result = rect.left - tooltipWidth - 8;
|
|
11292
|
+
console.log('➡️⬅️ [Tooltip RIGHT flipped to LEFT]', { rightPosition, result });
|
|
11293
|
+
return result;
|
|
11246
11294
|
}
|
|
11295
|
+
console.log('➡️ [Tooltip RIGHT]', { rightPosition });
|
|
11247
11296
|
return rightPosition;
|
|
11248
11297
|
}
|
|
11249
11298
|
default:
|
|
11250
|
-
|
|
11299
|
+
const defaultResult = rect.left + rect.width / 2;
|
|
11300
|
+
console.log('🔄 [Tooltip DEFAULT]', { defaultResult });
|
|
11301
|
+
return defaultResult;
|
|
11251
11302
|
}
|
|
11252
11303
|
}
|
|
11253
11304
|
calculateTop() {
|