@gemx-dev/clarity-visualize 0.8.54 → 0.8.56
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.
|
@@ -417,8 +417,8 @@ function createParentWindowCanvas(iframeDoc) {
|
|
|
417
417
|
canvas_1.id = "clarity-heatmap-canvas" /* Constant.HeatmapCanvas */;
|
|
418
418
|
canvas_1.width = 0;
|
|
419
419
|
canvas_1.height = 0;
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
canvas_1.style.position = "absolute" /* Constant.Absolute */;
|
|
421
|
+
// canvas.style.zIndex = `${Setting.ZIndex}`;
|
|
422
422
|
canvas_1.style.pointerEvents = 'none'; // Allow clicks to pass through
|
|
423
423
|
iframeParent.appendChild(canvas_1);
|
|
424
424
|
}
|
|
@@ -977,51 +977,6 @@ var HeatmapHelper = /** @class */ (function () {
|
|
|
977
977
|
}
|
|
978
978
|
return null;
|
|
979
979
|
};
|
|
980
|
-
this.visibleV2 = function (el, r, height) {
|
|
981
|
-
var doc = _this.state.window.document;
|
|
982
|
-
var visibility = r.height > height ? true : false;
|
|
983
|
-
if (visibility === false && r.width > 0 && r.height > 0) {
|
|
984
|
-
while (!visibility && doc) {
|
|
985
|
-
var shadowElement = null;
|
|
986
|
-
var elements = doc.elementsFromPoint(r.left + (r.width / 2), r.top + (r.height / 2));
|
|
987
|
-
// Check if only dialog and HTML are returned (element is behind dialog)
|
|
988
|
-
var hasOnlyDialogAndHtml = elements.length === 2 &&
|
|
989
|
-
elements[0].tagName === 'DIALOG' &&
|
|
990
|
-
elements[1].tagName === 'HTML';
|
|
991
|
-
// If element is behind a dialog, assume it's visible
|
|
992
|
-
// (we can't check through top-layer, so trust the element exists)
|
|
993
|
-
if (hasOnlyDialogAndHtml) {
|
|
994
|
-
visibility = true;
|
|
995
|
-
break;
|
|
996
|
-
}
|
|
997
|
-
for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
|
|
998
|
-
var e = elements_2[_i];
|
|
999
|
-
// Check if this is the target element BEFORE skipping dialogs
|
|
1000
|
-
// This handles case where target element IS a dialog
|
|
1001
|
-
if (e === el) {
|
|
1002
|
-
visibility = true;
|
|
1003
|
-
shadowElement = e.shadowRoot && e.shadowRoot != doc ? e.shadowRoot : null;
|
|
1004
|
-
break;
|
|
1005
|
-
}
|
|
1006
|
-
// Skip dialog elements - treat as transparent for checking elements behind
|
|
1007
|
-
if (e.tagName === 'DIALOG') {
|
|
1008
|
-
continue;
|
|
1009
|
-
}
|
|
1010
|
-
// Skip canvas and clarity elements
|
|
1011
|
-
if (e.tagName === "CANVAS" /* Constant.Canvas */ ||
|
|
1012
|
-
(e.id && e.id.indexOf("clarity-" /* Constant.ClarityPrefix */) === 0)) {
|
|
1013
|
-
continue;
|
|
1014
|
-
}
|
|
1015
|
-
// This is the first non-ignored element
|
|
1016
|
-
visibility = e === el;
|
|
1017
|
-
shadowElement = e.shadowRoot && e.shadowRoot != doc ? e.shadowRoot : null;
|
|
1018
|
-
break;
|
|
1019
|
-
}
|
|
1020
|
-
doc = shadowElement;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
return visibility && r.bottom >= 0 && r.top <= height;
|
|
1024
|
-
};
|
|
1025
980
|
this.state = state;
|
|
1026
981
|
this.layout = layout;
|
|
1027
982
|
}
|