Remove usage of ContainerModel rather than IContainerModel
This commit is contained in:
parent
1116185b9f
commit
a8723ffd27
6 changed files with 23 additions and 25 deletions
|
@ -5,7 +5,7 @@
|
|||
import { AddMethod } from '../../../Enums/AddMethod';
|
||||
import { IAvailableContainer } from '../../../Interfaces/IAvailableContainer';
|
||||
import { IConfiguration } from '../../../Interfaces/IConfiguration';
|
||||
import { IContainerModel, ContainerModel } from '../../../Interfaces/IContainerModel';
|
||||
import { IContainerModel } from '../../../Interfaces/IContainerModel';
|
||||
import { IHistoryState } from '../../../Interfaces/IHistoryState';
|
||||
import { IPattern, GetPattern, ContainerOrPattern } from '../../../Interfaces/IPattern';
|
||||
import { ISymbolModel } from '../../../Interfaces/ISymbolModel';
|
||||
|
@ -125,7 +125,7 @@ function AddNewContainerToParent(
|
|||
newCounters: Record<string, number>,
|
||||
symbols: Map<string, ISymbolModel>,
|
||||
initChilds: boolean = true
|
||||
): ContainerModel {
|
||||
): IContainerModel {
|
||||
const type = availableContainer.Type;
|
||||
|
||||
const defaultConfig = configuration.AvailableContainers
|
||||
|
@ -170,13 +170,11 @@ function AddNewContainerToParent(
|
|||
);
|
||||
|
||||
// Create the container
|
||||
const newContainer = new ContainerModel(
|
||||
defaultProperties,
|
||||
[],
|
||||
{
|
||||
type
|
||||
}
|
||||
);
|
||||
const newContainer: IContainerModel = {
|
||||
properties: defaultProperties,
|
||||
children: [],
|
||||
userData: {}
|
||||
};
|
||||
|
||||
// Register the container in the hashmap
|
||||
containers.set(newContainer.properties.id, newContainer);
|
||||
|
@ -266,7 +264,7 @@ export function AddContainer(
|
|||
* @returns
|
||||
*/
|
||||
function InitializeDefaultChild(
|
||||
newContainer: ContainerModel,
|
||||
newContainer: IContainerModel,
|
||||
configuration: IConfiguration,
|
||||
containerConfig: IAvailableContainer,
|
||||
containers: Map<string, IContainerModel>,
|
||||
|
@ -297,7 +295,7 @@ function InitializeDefaultChild(
|
|||
}
|
||||
|
||||
function InitializeChildrenWithPattern(
|
||||
newContainer: ContainerModel,
|
||||
newContainer: IContainerModel,
|
||||
configuration: IConfiguration,
|
||||
containers: Map<string, IContainerModel>,
|
||||
containerConfig: IAvailableContainer,
|
||||
|
@ -338,7 +336,7 @@ function InitializeChildrenWithPattern(
|
|||
*/
|
||||
function BuildPatterns(
|
||||
rootPattern: ContainerOrPattern,
|
||||
newContainer: ContainerModel,
|
||||
newContainer: IContainerModel,
|
||||
configuration: IConfiguration,
|
||||
containers: Map<string, IContainerModel>,
|
||||
newCounters: Record<string, number>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue