Hi,
i am working on some document annotations project using syncfusion pdf viewer.
After saving annotations, i can't make the comments pop up when i hover over the annoted texts unless i click on the text twice before the comment panel will open for me to see the comments made.
is the a way?
I meant to view the comment been made not the comment panel itself.
you see when I hover over North America..... i want The comments and replies to pop up.
That's what I want to know if Syncfusion has that Feature.
Thank You.
Hi Shamini,
Sorry to bother you but can you show me a sample?
I'm using mvc asp.netcore
Regards
Emmanuel
Hi Shamini,
I'm using Asp.net core.
Regards.
Emmanuel.
|
<div style="width:100%;height:1200px">
<ejs-tooltip id="Tooltip" content="guest" opensOn="Custom">
<e-content-template>
<div id="target" style="margin: 50px;">
</div>
<ejs-pdfviewer id="pdfviewer" serviceUrl="/api/PdfViewer" documentPath="PDF_Succinctly.pdf" annotationMouseLeave="annotationMouseLeave" annotationMouseover="annotationMouseover" rectangleSettings="@(new Syncfusion.EJ2.PdfViewer.PdfViewerRectangleSettings {Author="User 2"})"></ejs-pdfviewer>
</e-content-template>
</ejs-tooltip>
</div>
<script>
function annotationMouseover(args) {
var viewer = document.getElementById('pdfviewer').ej2_instances[0];
var tooltip = document.getElementById('Tooltip').ej2_instances[0];
tooltip.opensOn = "Hover";
tooltip.mouseTrail = true;
var annotationCollection = args.annotationBounds.controlParent.annotationCollection;
var comment = "";
var replies = 0;
for (var i = 0; i < annotationCollection.length; i++) {
if (args.annotationId == annotationCollection[i].annotationId) {
comment = annotationCollection[i].note;
replies = annotationCollection[i].comments.length;
}
}
tooltip.content = args.annotation.author + " (" + replies + " replies)" + "<br/>" + comment;
}
function annotationMouseLeave(args) {
var tooltip = document.getElementById('Tooltip').ej2_instances[0];
tooltip.close();
}
</script>
<style>
#tooltip {
height: 40px;
left: 45%;
position: absolute;
top: 45%;
width: auto;
}
</style> |