@empiricalrun/test-gen 0.38.8 → 0.38.9
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/CHANGELOG.md
CHANGED
|
@@ -313,20 +313,18 @@ function annotateClickableElements(options = {}) {
|
|
|
313
313
|
var parentElements = [];
|
|
314
314
|
|
|
315
315
|
// Create a hint marker
|
|
316
|
-
function createHintMarker(el, hint, parentElement) {
|
|
316
|
+
function createHintMarker(el, hint, parentElement, windowToAnnotate) {
|
|
317
317
|
const rect = el.getBoundingClientRect();
|
|
318
|
-
const parentRect = parentElement.getBoundingClientRect();
|
|
319
318
|
|
|
320
319
|
// Create the marker element
|
|
321
320
|
const marker = document.createElement("div");
|
|
322
321
|
marker.textContent = hint;
|
|
323
322
|
marker.className = markerClass;
|
|
324
|
-
|
|
325
323
|
// Style the marker
|
|
326
324
|
Object.assign(marker.style, {
|
|
327
325
|
position: "absolute",
|
|
328
|
-
top: `${rect.top +
|
|
329
|
-
left: `${rect.left +
|
|
326
|
+
top: `${rect.top + windowToAnnotate.scrollY}px`,
|
|
327
|
+
left: `${rect.left + windowToAnnotate.scrollX}px`,
|
|
330
328
|
background:
|
|
331
329
|
"-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(255, 247, 133)), to(rgb(255, 197, 66)))",
|
|
332
330
|
padding: "1px 3px 0px",
|
|
@@ -389,7 +387,7 @@ function annotateClickableElements(options = {}) {
|
|
|
389
387
|
const rect = el.getBoundingClientRect();
|
|
390
388
|
|
|
391
389
|
// Use createHintMarker with the specified container
|
|
392
|
-
createHintMarker(el, hint, container);
|
|
390
|
+
createHintMarker(el, hint, container, windowToAnnotate);
|
|
393
391
|
el.style.boxShadow = `inset 0 0 0px 2px red`;
|
|
394
392
|
|
|
395
393
|
// Add element details to the annotations map
|
|
@@ -313,20 +313,18 @@ function annotateClickableElements(options = {}) {
|
|
|
313
313
|
var parentElements = [];
|
|
314
314
|
|
|
315
315
|
// Create a hint marker
|
|
316
|
-
function createHintMarker(el, hint, parentElement) {
|
|
316
|
+
function createHintMarker(el, hint, parentElement, windowToAnnotate) {
|
|
317
317
|
const rect = el.getBoundingClientRect();
|
|
318
|
-
const parentRect = parentElement.getBoundingClientRect();
|
|
319
318
|
|
|
320
319
|
// Create the marker element
|
|
321
320
|
const marker = document.createElement("div");
|
|
322
321
|
marker.textContent = hint;
|
|
323
322
|
marker.className = markerClass;
|
|
324
|
-
|
|
325
323
|
// Style the marker
|
|
326
324
|
Object.assign(marker.style, {
|
|
327
325
|
position: "absolute",
|
|
328
|
-
top: `${rect.top +
|
|
329
|
-
left: `${rect.left +
|
|
326
|
+
top: `${rect.top + windowToAnnotate.scrollY}px`,
|
|
327
|
+
left: `${rect.left + windowToAnnotate.scrollX}px`,
|
|
330
328
|
background:
|
|
331
329
|
"-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(255, 247, 133)), to(rgb(255, 197, 66)))",
|
|
332
330
|
padding: "1px 3px 0px",
|
|
@@ -389,7 +387,7 @@ function annotateClickableElements(options = {}) {
|
|
|
389
387
|
const rect = el.getBoundingClientRect();
|
|
390
388
|
|
|
391
389
|
// Use createHintMarker with the specified container
|
|
392
|
-
createHintMarker(el, hint, container);
|
|
390
|
+
createHintMarker(el, hint, container, windowToAnnotate);
|
|
393
391
|
el.style.boxShadow = `inset 0 0 0px 2px red`;
|
|
394
392
|
|
|
395
393
|
// Add element details to the annotations map
|