VintaSoft Imaging .NET SDK 15.0: Documentation for Web developer
In This Topic
    Change "standard" UI-element in web control
    In This Topic
    If you need to change the working logic of standard UI-element in web document viewer, you will have to implement a JavaScript code, which should override the standard UI-element in the factory of UI-elements.

    Here is JavaScript code that shows how to create UI-button, which enables "Annotation+Pan" tool, and registers new button instead of standard UI-button, which enables only Pan tool:
    /**
     Creates UI button for activating the visual tool, which allows to annotate and pan images in image viewer.
    */
    function __createAnnotationAndPanToolButton() {
        return new Vintasoft.Imaging.DocumentViewer.UIElements.WebUiVisualToolButtonJS({
            cssClass: "vsdv-tools-panButton",
            title: "Annotation, Pan",
            localizationId: "panToolButton"
        }, "AnnotationVisualTool,PanTool");
    }
    
    /**
     Registers new UI button, which enables Annotation+Pan tool, instead of standard UI button, which enables only Pan tool.
    */
    function __registerNewPanButton() {
        // register the "Pan" button in web UI elements factory
        Vintasoft.Imaging.UI.UIElements.WebUiElementsFactoryJS.registerElement("panToolButton", __createAnnotationAndPanToolButton);
    }