Skip to content
Snippets Groups Projects
Commit e1bd45cf authored by Liliana Sanfilippo's avatar Liliana Sanfilippo
Browse files

highlight

parent 8bff6435
No related branches found
No related tags found
No related merge requests found
Pipeline #413278 failed
......@@ -33,15 +33,9 @@ export function NewHighlight({el}: {el: HTMLElement | null}, {subtitle}:{subtitl
export function Highlight({el}: {el: HTMLElement | null}, {subtitle}:{subtitle: HTMLElement | null}){
let TopDistance = 150;
/* console.log("Starting highlight check...")
console.log("here come el...")
console.log(el)
console.log("here comes subtitle...")
console.log(subtitle) */
if (el != null && subtitle != null){
/* console.log("here comes el...")
console.log(el)
console.log(el.getBoundingClientRect()) */
if (el.getBoundingClientRect().top < TopDistance + 1 && el.getBoundingClientRect().bottom > TopDistance){
if(subtitle.childNodes[0] != undefined){
......
......@@ -46,7 +46,7 @@ export function SafetySidebar(){
<br/>
<div className="sticky-top">
<nav className="sidebar">
<div>
{/* <div>
<a onClick={openAndCloseAndScroll({ it: "tab-Role", scrollTarget: "Role", close: ["Bioethics", "Biosafety", "Biosecurity"]})}>
<div id="subtitle0" className="detail-sideitem">
<div id="parent-Role" className="sideitem">
......@@ -54,7 +54,8 @@ export function SafetySidebar(){
</div>
</div>
</a>
</div>
</div> */}
<div>
<a onClick={openAndCloseAndScroll({ it: "tab-Checks", scrollTarget: "Checks", close: ["Bioethics", "Biosafety", "Biosecurity"] })}>
<div id="subtitle1" className="detail-sideitem">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment