How to get event handler when annotation function drag
-
- Posts: 10
- Joined: Tue Feb 07, 2023 6:19 am
How to get event handler when annotation function drag
Hi sir,
I need to get event handler when annotation function drag in Docuvieware (using web).
I need to get event handler when annotation function drag in Docuvieware (using web).
-
- Posts: 10
- Joined: Tue Feb 07, 2023 6:19 am
Re: How to get event handler when annotation function drag
senthil205 wrote: ↑Wed Feb 08, 2023 9:38 amHi sir,
I need to get event handler when annotation function drag in Docuvieware (using web).
i use like this
AddHandler DocuViewareEventsHandler.CustomAction, AddressOf handleCustomAction
but event not triger
-
- Posts: 10
- Joined: Tue Feb 07, 2023 6:19 am
Re: How to get event handler when annotation function drag
What is status?
Re: How to get event handler when annotation function drag
Hello Sir,
Sorry for my late reply.
You can simply use the javascript event RegisterOnAnnotationMoved -> https://www.docuvieware.com/guides/aspn ... Moved.html
And in there, you can use the PostCustomServerAction method to request server-side code or use any other javascript methods.
Best regards,
Fabio
Sorry for my late reply.
You can simply use the javascript event RegisterOnAnnotationMoved -> https://www.docuvieware.com/guides/aspn ... Moved.html
And in there, you can use the PostCustomServerAction method to request server-side code or use any other javascript methods.
Best regards,
Fabio
-
- Posts: 10
- Joined: Tue Feb 07, 2023 6:19 am
Re: How to get event handler when annotation function drag
Hi sir,
Thanks for reply, i need to get the properties of annotation to store in DB and take the value from DB and second time we show in viewer
for example server side code:
Dim annotstick As GdPicture14.Annotations.AnnotationStickyNote = annotMgr.AddStickyNoteAnnot(1, 1, 2, 2, "Sticky Note by GdPicture")
If (annotMgr.GetStat() = GdPictureStatus.OK) AndAlso (annotstick IsNot Nothing) Then
annotstick.Alignment = System.Drawing.StringAlignment.Center
annotstick.Author = "GdPicture"
annotstick.BorderWidth = 0.05F
annotstick.Fill = True
annotstick.FillColor = Color.LightBlue
annotstick.FontSize = 20
annotstick.Opacity = 0.7F
annotstick.StrokeColor = Color.DarkBlue
End If
for this i hardcode the value to create sticky note, now i want to get this properties value dynamically
using this below code:
document.addEventListener("DOMContentLoaded", function () {
RegisterOnAnnotationAddedOnDocuViewareAPIReady();
RegisterOnAnnotationDeletedOnDocuViewareAPIReady();
}, false);
//// event annot Added
function RegisterOnAnnotationAddedOnDocuViewareAPIReady() {
if (typeof DocuViewareAPI !== "undefined" && DocuViewareAPI.IsInitialized("DocuVieware1")) {
DocuViewareAPI.RegisterOnAnnotationAdded("DocuVieware1", function (annot) {
alert("Annotation added: " + annot.id);
alert("Annotation annotType: " + annot.timeStampAppearance);
});
}
else {
setTimeout(function () { RegisterOnAnnotationAddedOnDocuViewareAPIReady() }, 10);
}
}
i get the id, but how we get properties
Thanks for reply, i need to get the properties of annotation to store in DB and take the value from DB and second time we show in viewer
for example server side code:
Dim annotstick As GdPicture14.Annotations.AnnotationStickyNote = annotMgr.AddStickyNoteAnnot(1, 1, 2, 2, "Sticky Note by GdPicture")
If (annotMgr.GetStat() = GdPictureStatus.OK) AndAlso (annotstick IsNot Nothing) Then
annotstick.Alignment = System.Drawing.StringAlignment.Center
annotstick.Author = "GdPicture"
annotstick.BorderWidth = 0.05F
annotstick.Fill = True
annotstick.FillColor = Color.LightBlue
annotstick.FontSize = 20
annotstick.Opacity = 0.7F
annotstick.StrokeColor = Color.DarkBlue
End If
for this i hardcode the value to create sticky note, now i want to get this properties value dynamically
using this below code:
document.addEventListener("DOMContentLoaded", function () {
RegisterOnAnnotationAddedOnDocuViewareAPIReady();
RegisterOnAnnotationDeletedOnDocuViewareAPIReady();
}, false);
//// event annot Added
function RegisterOnAnnotationAddedOnDocuViewareAPIReady() {
if (typeof DocuViewareAPI !== "undefined" && DocuViewareAPI.IsInitialized("DocuVieware1")) {
DocuViewareAPI.RegisterOnAnnotationAdded("DocuVieware1", function (annot) {
alert("Annotation added: " + annot.id);
alert("Annotation annotType: " + annot.timeStampAppearance);
});
}
else {
setTimeout(function () { RegisterOnAnnotationAddedOnDocuViewareAPIReady() }, 10);
}
}
i get the id, but how we get properties
Who is online
Users browsing this forum: No registered users and 1 guest