fix(grid):Grid service wasn't being reset (#3068)

* fix(grid):Grid service wasn't being reset

* fix(service):Fix the initial service state

Services with mode specific state differed in internal state between
initial and subsequent load.  This fix address that structurally by
allows the mode to store/manage service state, but makes the
responsibility of service state central to the service.
This commit is contained in:
Bill Wallace authored and GitHub committed 2022-12-09 10:58:01 -05:00
1 parent 42dca11ae3
commit beb4517450
17 files changed
+120 -28

No files matched your search

@@ -104,7 +104,6 @@ export default class CustomizationService extends PubSubService {
commands.forEach(({ commandName, commandOptions, context }) => {
if (commandName) {
console.log('Running command', commandName);
commandsManager.runCommand(
commandName,
{
@@ -128,7 +127,6 @@ export default class CustomizationService extends PubSubService {
customizationId: string,
customization: Customization
): void {
console.log('** Set mode customization', customizationId, customization);
this.modeCustomizations[customizationId] = merge(
this.modeCustomizations[customizationId] || {},
customization
@@ -194,7 +192,6 @@ export default class CustomizationService extends PubSubService {
}
setGlobalCustomization(id: string, value: Customization): void {
console.log('*** Set global', id, value);
this.globalCustomizations[id] = value;
this._broadcastGlobalCustomizationModified();
}
@@ -234,7 +231,6 @@ export default class CustomizationService extends PubSubService {
if (!value) return;
if (typeof value === 'string') {
const extensionValue = this.findExtensionValue(value);
console.log('Adding extension values', value, extensionValue);
this.addReferences(extensionValue);
} else if (Array.isArray(value)) {
this.addReferences(value, isGlobal);