feat: Add White Labelling, Hanging Protocols, and tons of Extensions / Mode fixes
* modified * new files in existing extensions/libraries/modes * fixed bugs and tests * Clean up * fix: viewport display fixed * Fixed configs for deployment * Removed unnecessary files and functions * Fixed default HP module * Added white labelling * Fixed hash routing * Removed unnecessary routers Co-authored-by: Alireza Sedghi <ar.sedghi@gmail.com>
This commit is contained in:
1 parent
0db81b30f3
commit
99b8dc4759
93 files changed
+3825
-1293
No files matched your search
@@ -13,6 +13,7 @@ export default class ToolBarService {
|
||||
this.EVENTS = EVENTS;
|
||||
this.listeners = {};
|
||||
this.buttons = {};
|
||||
this.unsubscriptions = []; // if tools need to unsubscribe from events
|
||||
this.buttonSections = {
|
||||
/**
|
||||
* primary: ['Zoom', 'Wwwc'],
|
||||
@@ -39,6 +40,16 @@ export default class ToolBarService {
|
||||
this.extensionManager = extensionManager;
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.unsubscriptions.forEach(unsub => unsub());
|
||||
this.state = {
|
||||
primaryToolId: 'Wwwc',
|
||||
toggles: {},
|
||||
groups: {},
|
||||
};
|
||||
this.unsubscriptions = [];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} interaction
|
||||
@@ -63,6 +74,7 @@ export default class ToolBarService {
|
||||
this.state.toggles[itemId] === undefined
|
||||
? true
|
||||
: !this.state.toggles[itemId];
|
||||
interaction.commandOptions.toggledState = this.state.toggles[itemId];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -73,13 +85,21 @@ export default class ToolBarService {
|
||||
//
|
||||
// NOTE: Should probably just do this for tools as well?
|
||||
// But would be nice if we could enforce at least the command name?
|
||||
let unsubscribe;
|
||||
if (interaction.commandName) {
|
||||
commandsManager.runCommand(
|
||||
unsubscribe = commandsManager.runCommand(
|
||||
interaction.commandName,
|
||||
interaction.commandOptions
|
||||
);
|
||||
}
|
||||
|
||||
// Storing the unsubscribe for later reseting
|
||||
if (unsubscribe && typeof unsubscribe === 'function') {
|
||||
if (this.unsubscriptions.indexOf(unsubscribe) === -1) {
|
||||
this.unsubscriptions.push(unsubscribe);
|
||||
}
|
||||
}
|
||||
|
||||
// Track last touched id for each group
|
||||
if (groupId) {
|
||||
this.state.groups[groupId] = itemId;
|
||||
|
||||
Reference in new issue
Block a user