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

temp

parent 25bad310
No related branches found
No related tags found
1 merge request!168Fix rerender notes
......@@ -25,14 +25,27 @@ export default ({ area }) => {
let annotationTop = 0;
let boxHeight = 0;
let top = 0;
let WaxSurface = {};
const allCommentsTop = [];
let panelWrapper = {};
let panelWrapperHeight = {};
let activeComment = null;
if (main) {
WaxSurface = main.dom.getBoundingClientRect();
if (area === 'main') {
} else {
panelWrapper = document.getElementsByClassName('panelWrapper');
panelWrapperHeight = panelWrapper[0].getBoundingClientRect().height;
}
}
each(marksNodes[area], (markNode, pos) => {
const WaxSurface = main.dom.getBoundingClientRect();
const id =
markNode instanceof Mark ? markNode.attrs.id : markNode.node.attrs.id;
const activeComment = commentPlugin.getState(activeView.state).comment;
if (activeView)
activeComment = commentPlugin.getState(activeView.state).comment;
let isActive = false;
if (activeComment && id === activeComment.attrs.id) isActive = true;
......@@ -44,9 +57,6 @@ export default ({ area }) => {
annotationTop =
markNodeEl.getBoundingClientRect().top - WaxSurface.top;
} else {
const panelWrapper = document.getElementsByClassName('panelWrapper');
const panelWrapperHeight = panelWrapper[0].getBoundingClientRect()
.height;
markNodeEl = document
.querySelector('#notes-container')
.querySelector(`[data-id="${id}"]`);
......
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