feat(dev): move to rsbuild for dev - faster (#4674)
This commit is contained in:
1 parent
847f1da8e0
commit
d4a4267429
33 files changed
+13177
-5660
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import toolbarButtons from './toolbarButtons.js';
|
||||
import toolbarButtons from './toolbarButtons';
|
||||
import { hotkeys } from '@ohif/core';
|
||||
import { id } from './id';
|
||||
import i18n from 'i18next';
|
||||
|
||||
+94
-97
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
WindowLevelMenuItem,
|
||||
} from '@ohif/ui';
|
||||
import { WindowLevelMenuItem } from '@ohif/ui';
|
||||
import { defaults, ToolbarService } from '@ohif/core';
|
||||
import type { Button } from '@ohif/core/types';
|
||||
|
||||
@@ -23,7 +21,7 @@ function _createWwwcPreset(preset, title, subtitle) {
|
||||
};
|
||||
}
|
||||
|
||||
function _createSetToolActiveCommands(toolName, toolGroupIds = ['default', 'mpr', ]) {
|
||||
function _createSetToolActiveCommands(toolName, toolGroupIds = ['default', 'mpr']) {
|
||||
return toolGroupIds.map(toolGroupId => ({
|
||||
commandName: 'setToolActive',
|
||||
commandOptions: {
|
||||
@@ -149,7 +147,7 @@ const toolbarButtons: Button[] = [
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
id: 'Layout',
|
||||
uiType: 'ohif.layoutSelector',
|
||||
props: {
|
||||
@@ -164,101 +162,100 @@ const toolbarButtons: Button[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'MoreTools',
|
||||
uiType: 'ohif.splitButton',
|
||||
props: {
|
||||
groupId: 'MoreTools',
|
||||
evaluate: 'evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList',
|
||||
primary: ToolbarService.createButton({
|
||||
id: 'Reset',
|
||||
icon: 'tool-reset',
|
||||
label: 'Reset View',
|
||||
tooltip: 'Reset View',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'resetViewport',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
id: 'MoreTools',
|
||||
uiType: 'ohif.splitButton',
|
||||
props: {
|
||||
groupId: 'MoreTools',
|
||||
evaluate: 'evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList',
|
||||
primary: ToolbarService.createButton({
|
||||
id: 'Reset',
|
||||
icon: 'tool-reset',
|
||||
label: 'Reset View',
|
||||
tooltip: 'Reset View',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'resetViewport',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
secondary: {
|
||||
icon: 'chevron-down',
|
||||
tooltip: 'More Tools',
|
||||
},
|
||||
items: [
|
||||
ToolbarService.createButton({
|
||||
id: 'Reset',
|
||||
icon: 'tool-reset',
|
||||
label: 'Reset View',
|
||||
tooltip: 'Reset View',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'resetViewport',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'RotateRight',
|
||||
icon: 'tool-rotate-right',
|
||||
label: 'Rotate Right',
|
||||
tooltip: 'Rotate Right +90',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'rotateViewportCW',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'FlipHorizontal',
|
||||
icon: 'tool-flip-horizontal',
|
||||
label: 'Flip Horizontally',
|
||||
tooltip: 'Flip Horizontally',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'flipViewportHorizontal',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'StackScroll',
|
||||
icon: 'tool-stack-scroll',
|
||||
label: 'Stack Scroll',
|
||||
tooltip: 'Stack Scroll',
|
||||
commands: _createSetToolActiveCommands('StackScroll'),
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'Invert',
|
||||
icon: 'tool-invert',
|
||||
label: 'Invert Colors',
|
||||
tooltip: 'Invert Colors',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'invertViewport',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'CalibrationLine',
|
||||
icon: 'tool-calibration',
|
||||
label: 'Calibration Line',
|
||||
tooltip: 'Calibration Line',
|
||||
commands: _createSetToolActiveCommands('CalibrationLine'),
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
}),
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
secondary: {
|
||||
icon: 'chevron-down',
|
||||
tooltip: 'More Tools',
|
||||
},
|
||||
items: [
|
||||
ToolbarService.createButton({
|
||||
id: 'Reset',
|
||||
icon: 'tool-reset',
|
||||
label: 'Reset View',
|
||||
tooltip: 'Reset View',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'resetViewport',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'RotateRight',
|
||||
icon: 'tool-rotate-right',
|
||||
label: 'Rotate Right',
|
||||
tooltip: 'Rotate Right +90',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'rotateViewportCW',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'FlipHorizontal',
|
||||
icon: 'tool-flip-horizontal',
|
||||
label: 'Flip Horizontally',
|
||||
tooltip: 'Flip Horizontally',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'flipViewportHorizontal',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'StackScroll',
|
||||
icon: 'tool-stack-scroll',
|
||||
label: 'Stack Scroll',
|
||||
tooltip: 'Stack Scroll',
|
||||
commands: _createSetToolActiveCommands('StackScroll'),
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'Invert',
|
||||
icon: 'tool-invert',
|
||||
label: 'Invert Colors',
|
||||
tooltip: 'Invert Colors',
|
||||
commands: [
|
||||
{
|
||||
commandName: 'invertViewport',
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
evaluate: 'evaluate.action',
|
||||
}),
|
||||
ToolbarService.createButton({
|
||||
id: 'CalibrationLine',
|
||||
icon: 'tool-calibration',
|
||||
label: 'Calibration Line',
|
||||
tooltip: 'Calibration Line',
|
||||
commands: _createSetToolActiveCommands('CalibrationLine'),
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
}),
|
||||
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default toolbarButtons;
|
||||
Reference in new issue
Block a user