Skip to content
Snippets Groups Projects
Commit 8274145d authored by chris's avatar chris
Browse files

fix

parent bc6020e5
No related branches found
No related tags found
1 merge request!161Connect ui
......@@ -58,7 +58,6 @@ export default ({ area }) => {
// get height of this markNode box
const boxEl = document.querySelector(`div[data-box="${id}"]`);
if (boxEl) boxHeight = parseInt(boxEl.offsetHeight, 10);
console.log(boxHeight);
// where the box should move to
top = annotationTop;
......@@ -72,13 +71,13 @@ export default ({ area }) => {
}
}
// store where the box ends to be aware of overlaps in the next box
markNode.endHeight = top + boxHeight + 2;
markNode.endHeight = top + boxHeight + 4;
result[pos] = top;
allCommentsTop.push({ [id]: result[pos] });
// if active, move as many boxes above as needed to bring it to the annotation's height
if (isActive) {
markNode.endHeight = annotationTop + boxHeight + 2;
markNode.endHeight = annotationTop + boxHeight + 3;
result[pos] = annotationTop;
allCommentsTop[pos][id] = result[pos];
let b = true;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment