Add custom comment cursor #4
This commit is contained in:
parent
fa0801668c
commit
78c09254fa
4 changed files with 18 additions and 18 deletions
|
|
@ -355,6 +355,17 @@ function openComment(comment) {
|
|||
.vpv-pages-inner-container.waiting-comment .page-inner-container,
|
||||
.vpv-pages-inner-container.waiting-comment .vpv-text-layer-text,
|
||||
.vpv-pages-inner-container.waiting-comment .vpv-text-layer-wrapper {
|
||||
cursor: cell !important;
|
||||
cursor: var(--icon-comment-cursor) -2 28, cell !important;
|
||||
}
|
||||
|
||||
.comment-marker {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
background: var(--icon-comment-default) no-repeat center / contain;
|
||||
cursor: pointer !important;
|
||||
z-index: 999;
|
||||
overflow: visible;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue