1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > [OHIF-Viewers]医疗数字阅片-医学影像-Module: Panel-自定义面板-上

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

时间:2021-11-14 13:39:14

相关推荐

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

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

/extensions/modules/panel.html

Module: Panel

An extension can register a Panel Module by defining agetPanelModulemethod. The panel module provides the ability to definemenuOptionsandcomponentsthat can be used by the consuming application.componentsare React Components that can be displayed in the consuming application's "Panel" Component.

A panel extension example

ThemenuOptions'stargetkey points to a registeredcomponents'sid. AdefaultContextis applied to allmenuOptions; however, eachmenuOptioncan optional provide it's owncontextvalue.

ThegetPanelModulereceives an object containing theExtensionManager's associatedServicesManagerandCommandsManager.

import MyComponent from './MyComponent.js';export default {id: 'example-panel-module',/*** @param {object} params* @param {ServicesManager} params.servicesManager* @param {CommandsManager} mandsManager*/getPanelModule({ servicesManager, commandsManager }) {return {menuOptions: [{// A suggested icon// Available icons determined by consuming appicon: 'list',// A suggested labellabel: 'Magic',// 'right' or 'left'from: 'right',// The target component to toggle open/closetarget: 'target-component-id',// UI Hint; If the target panel is in a "disabled" stateisDisabled: studies => {return false;},// Overrides `defaultContext`, if specifiedcontext: ['ACTIVE_VIEWPORT:MAGIC'],},],components: [{id: 'target-component-id',component: MyComponent,},],defaultContext: ['ROUTE:VIEWER'],};},};

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。