export {onMousedOver, onMousedLeave}

let preview_element = $("#acid-index-preview");

function onMousedOver(protein, acid) {
    let x = d3.event.pageX;
    let y = d3.event.pageY; 
    let color =  d3.hsl(colorMolecule[protein]).brighter(0.5);
    preview_element.css("top", 12 + y  + "px")
                .css("left", x + "px")
                .css("color", color)
                .text(acid)
                .show(100);
}

function onMousedLeave(protein, acid) {
    preview_element.hide();
}