modal develop in mimiceditor

Forum Home Forums Development and Integration modal develop in mimiceditor

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17234
    Zeus
    Participant

    Hi
    I am developing plugin in mimic.
    Is there any way to add new modal without editing code in propGridDialogs?
    I want to add modal in plugin used by itself.
    // Calls property editors implemented as modal dialogs.
    class PropGridDialogs {
    static colorModal = null;
    static fontModal = null;
    static imageModal = null;
    static propertyModal = null;
    static textEditor = null;
    /**新增 */
    static svgExtTurbineModal = null;
    static fontAwesomeIconModal = null;
    static echartColorModal = null;
    static bgBorderModal = null;
    static bgDecorationModal = null;
    static tableDesignerModal = null;

    // Invokes the callback function.
    static _invokeCallback(modalContext, callback) {
    if (modalContext.result && callback instanceof Function) {
    callback(modalContext.newValue);
    }
    }

    // Checks whether an editor for the specified property is supported.
    static editorSupported(propertyDescriptor) {
    const PropertyEditor = rs.mimic.PropertyEditor;
    let editor = propertyDescriptor?.editor;
    return editor &&
    editor === PropertyEditor.COLOR_DIALOG && PropGridDialogs.colorModal ||
    editor === PropertyEditor.FONT_DIALOG && PropGridDialogs.fontModal ||
    editor === PropertyEditor.IMAGE_DIALOG && PropGridDialogs.imageModal ||
    editor === PropertyEditor.PROPERTY_DIALOG && PropGridDialogs.propertyModal ||
    editor === PropertyEditor.TEXT_EDITOR && PropGridDialogs.textEditor ||
    /**新增 */
    editor === PropertyEditor.SVGEXT_TURBINE_DIALOG && PropGridDialogs.svgExtTurbineModal ||
    editor === PropertyEditor.FONTAWESOME_ICON_DIALOG && PropGridDialogs.fontAwesomeIconModal ||
    editor === PropertyEditor.ECHART_COLOR_DIALOG && PropGridDialogs.echartColorModal ||
    editor === PropertyEditor.BG_BORDER_DIALOG && PropGridDialogs.bgBorderModal ||
    editor === PropertyEditor.BG_DECORATION_DIALOG && PropGridDialogs.bgDecorationModal ||
    editor === PropertyEditor.TABLE_DESIGNER_DIALOG && PropGridDialogs.tableDesignerModal;
    }

    #17236
    Mikhail
    Moderator

    Hi,
    It would be useful, but this is not possible for now. I saved the idea and will see what can be done. I plan to return to work on the new editor in January.

    #17237
    Zeus
    Participant

    Hi,
    OK I see. Thanks

    #17740
    Mikhail
    Moderator

    Hi,
    It should be possible in the next release. Source code

    #17858
    Zeus
    Participant

    Thanks

    #17859
    Zeus
    Participant

    Hello, I’ve encountered a new requirement. I’d like to implement dynamic language switching on SCADAweb, covering menus, the user interface, and the content within mimic pages. Do you have any suggestions? I’ve already tried analyzing it with Cursor and have a preliminary approach, but it involves extensive modifications, making it difficult to keep up with the main development branch going forward.

    #17862
    Mikhail
    Moderator

    Hello,
    I have some thoughts about that.
    Please create a new topic to discuss the new idea.

    • This reply was modified 1 month ago by Mikhail.
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘modal develop in mimiceditor’ is closed to new replies.