Skip to content

Commit

Permalink
feat: add initial state STARTED in jdn-status attr for all locators
Browse files Browse the repository at this point in the history
  • Loading branch information
Iogsotot committed Aug 8, 2023
1 parent 7712027 commit 59930ab
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/pageServices/contentScripts/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ export const highlightOnPage = () => {

return elementRect
? {
left: `${left + window.pageXOffset + document.body.scrollLeft}px`,
top: `${top + window.pageYOffset + document.body.scrollTop}px`,
height: `${height}px`,
width: `${width}px`,
}
left: `${left + window.pageXOffset + document.body.scrollLeft}px`,
top: `${top + window.pageYOffset + document.body.scrollTop}px`,
height: `${height}px`,
width: `${width}px`,
}
: {};
};
const addTooltip = () => {
Expand Down Expand Up @@ -234,7 +234,7 @@ export const highlightOnPage = () => {
div.id = jdnHash;
div.className = getClassName(predictedElement);
div.setAttribute("jdn-highlight", true);
div.setAttribute("jdn-status", predictedElement.locator.taskStatus);
div.setAttribute("jdn-status", predictedElement.locator.taskStatus || LocatorTaskStatus.STARTED);
div.addEventListener("mouseover", () => {
tooltipTimer = setTimeout(() => {
showTooltip(coordinates);
Expand Down Expand Up @@ -436,6 +436,7 @@ export const highlightOnPage = () => {
toggleElement(param);
break;
case ScriptMsg.ToggleDeleted:
console.log("messageHandler");
toggleDeletedElement(param);
break;
case ScriptMsg.AddElement:
Expand Down

0 comments on commit 59930ab

Please sign in to comment.