fix(crosshairs): reset angle, position, and slabthickness for crosshairs when reset viewport tool is used (#4113)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
IbrahimandAlireza authored and GitHub committed 2024-05-23 16:18:44 -04:00
1 parent 1124c409e9
commit 73d9e99d5d
17 files changed
+200 -49

No files matched your search

+1 -1
View File
@@ -63,7 +63,7 @@ function modeFactory({ modeConfiguration }) {
const { toolNames, Enums } = utilityModule.exports;
// Init Default and SR ToolGroups
initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
initToolGroups(toolNames, Enums, toolGroupService, commandsManager, null, servicesManager);
const { unsubscribe } = toolGroupService.subscribe(
toolGroupService.EVENTS.VIEWPORT_ADDED,
+30 -4
View File
@@ -6,7 +6,14 @@ export const toolGroupIds = {
default: 'default',
};
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
function _initToolGroups(
toolNames,
Enums,
toolGroupService,
commandsManager,
modeLabelConfig,
servicesManager
) {
const tools = {
active: [
{
@@ -125,7 +132,12 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
{
toolName: toolNames.Crosshairs,
configuration: {
viewportIndicators: false,
viewportIndicators: true,
viewportIndicatorsConfig: {
circleRadius: 5,
xOffset: 0.95,
yOffset: 0.05,
},
disableOnPassive: true,
autoPan: {
enabled: false,
@@ -178,8 +190,22 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
}
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig);
function initToolGroups(
toolNames,
Enums,
toolGroupService,
commandsManager,
modeLabelConfig,
servicesManager
) {
_initToolGroups(
toolNames,
Enums,
toolGroupService,
commandsManager,
modeLabelConfig,
servicesManager
);
}
export default initToolGroups;