fix(contextMenu): fixes for context menu icon (#3275)

This commit is contained in:
Bill Wallace authored and GitHub committed 2023-03-22 18:04:44 -04:00
1 parent bc642fd2b6
commit dd22e37e4c
15 files changed
+44 -28

No files matched your search

@@ -113,11 +113,14 @@ export default function getCustomizationModule() {
{
id: 'ohif.contextMenu',
/** Applies the customizationType to all the menu items */
/** Applies the customizationType to all the menu items.
* This function clones the object and child objects to prevent
* changes to the original customization object.
*/
transform: function (customizationService: CustomizationService) {
// Don't modify the children, as those are copied by reference
const clonedObject = { ...this };
clonedObject.menus = this.menus.map(it => ({ ...it }));
clonedObject.menus = this.menus.map(menu => ({ ...menu }));
for (const menu of clonedObject.menus) {
const { items: originalItems } = menu;