Add custom comment cursor #4

This commit is contained in:
Timothée Goguely 2024-11-19 16:31:38 +01:00
parent fa0801668c
commit 78c09254fa
4 changed files with 18 additions and 18 deletions

View file

@ -126,7 +126,7 @@ function setCommentBubbles() {
comments.value.forEach((comment) => {
const bubble = document.createElement("a");
bubble.classList.add("comment-bubble");
bubble.classList.add("comment-marker");
bubble.style.left = comment.position.x + "%";
bubble.style.top = comment.position.y + "%";
bubble.href = "#comment-" + comment.id;
@ -154,22 +154,13 @@ function unhighlight(comment) {
}
function removeCommentBubbles() {
document.querySelectorAll(".comment-bubble").forEach((bubble) => {
document.querySelectorAll(".comment-marker").forEach((bubble) => {
bubble.parentNode.removeChild(bubble);
});
}
</script>
<style>
.comment-bubble {
position: absolute;
display: block;
width: 1.2rem;
height: 1.2rem;
background: url("/assets/svg/comment-bubble.svg") no-repeat !important;
cursor: pointer !important;
z-index: 999;
}
#vpv-container {
width: var(--dialog-max-w);
height: calc(var(--dialog-max-h) - var(--dialog-header-h));