VintaSoft Imaging .NET SDK 15.1: Документация для Веб разработчика
В этом разделе
Как создавать аннотации непрерывно?
В этом разделе
Если вы хотите выбрать тип аннотации на панели инструментов аннотаций и создавать несколько аннотаций непрерывно (не переходя на панель инструментов аннотаций для каждой новой аннотации) в веб просмотрщике аннотаций, вам необходимо выполнить следующие действия:

Вот код на JavaScript, который показывает, как подписаться на событие "annotationBuildingFinished" визуального инструмента аннотаций и непрерывно создавать несколько аннотаций в веб просмотрщике аннотаций:
// get the annotation visual tool of annotation viewer
var annotationVisualTool = annotationViewer.get_AnnotationVisualTool();
// subscribe to the "annotationBuildingFinished" event of the annotation visual tool
Vintasoft.Shared.subscribeToEvent(annotationVisualTool, "annotationBuildingFinished", function (event, annotation) {
    // remove focus from created annotation
    annotationVisualTool.set_FocusedAnnotationView(null);

    // new annotation
    var newAnnotation = null;
    // get the type of created annotation
    var annotationType = annotation.get_Type();
    // if created annotation is ellipse annotation
    if (annotationType == "EllipseAnnotation") {
        // create new ellipse annotation
        newAnnotation = new Vintasoft.Imaging.Annotation.UI.WebEllipseAnnotationViewJS();
    }
    // if new annotation exists
    if (newAnnotation != null) {
        // add new annotation to an image and build new annotation
        annotationVisualTool.addAndBuildAnnotation(newAnnotation);
    }
});