Created
June 8, 2021 10:03
-
-
Save bjoerntx/a90fecbe284c11074b36431ee655dd02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("documentViewerLoaded", function () { | |
TXDocumentViewer.addEventListener("annotationsChanged", updateAnnotations); | |
}); | |
function updateAnnotations() { | |
if (_updating === true) | |
return; | |
var jsonAnnotations = TXDocumentViewer.annotations.export(); | |
// create sync object | |
var collaborationSyncObject = { | |
User: "Test", | |
AnnotationJson: jsonAnnotations | |
}; | |
// call signalr hub with sync object | |
_connection.invoke("SetAnnotationSync", | |
collaborationSyncObject).catch(function (err) { | |
return console.error(err.toString()); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment