zoukankan      html  css  js  c++  java
  • [OHIF-Viewers]医疗数字阅片-医学影像-Module: Panel-自定义面板-上

    [OHIF-Viewers]医疗数字阅片-医学影像-Module: Panel-自定义面板-上

    https://docs.ohif.org/extensions/modules/panel.html

    Module: Panel

    An extension can register a Panel Module by defining a getPanelModule method. The panel module provides the ability to define menuOptions and components that can be used by the consuming application. components are React Components that can be displayed in the consuming application's "Panel" Component.

    Panel Extension

    A panel extension example

    The menuOptions's target key points to a registered components's id. A defaultContext is applied to all menuOptions; however, each menuOption can optional provide it's own context value.

    The getPanelModule receives an object containing the ExtensionManager's associated ServicesManager and CommandsManager.

    import MyComponent from './MyComponent.js';
    
    export default {
      id: 'example-panel-module',
    
      /**
       * @param {object} params
       * @param {ServicesManager} params.servicesManager
       * @param {CommandsManager} params.commandsManager
       */
      getPanelModule({ servicesManager, commandsManager }) {
        return {
          menuOptions: [
            {
              // A suggested icon
              // Available icons determined by consuming app
              icon: 'list',
              // A suggested label
              label: 'Magic',
              // 'right' or 'left'
              from: 'right',
              // The target component to toggle open/close
              target: 'target-component-id',
              // UI Hint; If the target panel is in a "disabled" state
              isDisabled: studies => {
                return false;
              },
              // Overrides `defaultContext`, if specified
              context: ['ACTIVE_VIEWPORT:MAGIC'],
            },
          ],
          components: [
            {
              id: 'target-component-id',
              component: MyComponent,
            },
          ],
          defaultContext: ['ROUTE:VIEWER'],
        };
      },
    };
  • 相关阅读:
    手动实现 SpringMVC
    2014年9月9日 高级命令command的使用(上)
    2014年8月29日 透视图补充及视图开头
    2014年8月24日 菜单 工具条 右键菜单(上下文菜单)
    2014年8月14日 透视图
    2014年8月8日
    2014年8月1日
    关于EMF中从schema到ecore转变中的默认处理问题
    JAVA一些常用的时间操作
    echarts基本使用
  • 原文地址:https://www.cnblogs.com/landv/p/13304709.html
Copyright © 2011-2022 走看看