parent
e55eb48f45
commit
1ae2964d58
5 changed files with 41 additions and 63 deletions
|
|
@ -219,7 +219,6 @@ async function addComment(newComment) {
|
|||
/projects\/.*?(?=\/[^/]+\/[^/]+$)/
|
||||
);
|
||||
newComment.fileParentUri = matchFileParentUri ? matchFileParentUri[0] : null;
|
||||
console.log(newComment);
|
||||
const newFile = await api.addComment(newComment);
|
||||
resetDraftComment();
|
||||
isAddOpen.value = false;
|
||||
|
|
@ -272,7 +271,10 @@ function prepareDraftCommentInPdf(event) {
|
|||
const pageContainer = event.target.closest(".page-inner-container");
|
||||
if (!pageContainer || !viewContainer) return;
|
||||
|
||||
const pageIndex = parseInt(pageContainer.dataset.pageIndex) + 1;
|
||||
const pageLabel = pageContainer
|
||||
.closest(".vpv-page-inner-container")
|
||||
.getAttribute("aria-label");
|
||||
const pageIndex = pageLabel.charAt(pageLabel.length - 1);
|
||||
|
||||
const viewRect = viewContainer.getBoundingClientRect();
|
||||
const pageRect = pageContainer.getBoundingClientRect();
|
||||
|
|
@ -285,6 +287,8 @@ function prepareDraftCommentInPdf(event) {
|
|||
const relativeX = (x / pageRect.width) * 100;
|
||||
const relativeY = (y / pageRect.height) * 100;
|
||||
|
||||
console.log(pageIndex);
|
||||
|
||||
draftComment.value.position = {
|
||||
x: relativeX,
|
||||
y: relativeY,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue