Closed M-Wicenec closed 1 week ago
The PR modifies how fields are added to graph configurations and fixes graph configuration initialization. Instead of simply adding fields, the implementation now preserves the field's current value when adding it to the configuration. Additionally, the creation of new graph configurations has been modified to start fresh rather than cloning an existing configuration.
sequenceDiagram
participant User
participant ParameterTable
participant GraphConfig
User->>ParameterTable: Add field to graph configuration
ParameterTable->>GraphConfig: addValue(nodeId, fieldId, fieldValue)
GraphConfig-->>ParameterTable: Field added with value
ParameterTable-->>User: Field added to configuration
classDiagram
class ParameterTable {
+addValue(nodeId, fieldId, fieldValue)
}
class GraphConfig {
+addValue(nodeId, fieldId, fieldValue)
+removeField(field)
}
ParameterTable --> GraphConfig: uses
note for ParameterTable "Modified to use addValue instead of addField"
note for GraphConfig "addValue method added to preserve field value"
classDiagram
class Eagle {
+newConfig()
}
class GraphConfig {
+setId(id)
}
Eagle --> GraphConfig: creates
note for Eagle "newConfig modified to create a new GraphConfig instead of cloning"
Change | Details | Files |
---|---|---|
Modified field addition to graph configurations to include value preservation |
|
src/ParameterTable.ts |
Fixed new graph configuration creation |
|
src/Eagle.ts |
when adding a field to a graph configuration, the field's value from the graph will be set as the initial configured value in the graph configuration. aka when adding a field to the config, it takes its value with it. additionally i fixed an error when creating a new graph config when there is none added in the first place.
Summary by Sourcery
Enhance the graph configuration process by setting the field's current value as the initial value when adding a field. Fix an error in creating a new graph configuration when none exists by initializing a new GraphConfig.
Bug Fixes:
Enhancements: