This commit is contained in:
Carl Fuchs 2023-01-25 14:42:05 +01:00
parent 2c6b511a2f
commit 7c83116df1
8 changed files with 32 additions and 9 deletions

View file

@ -227,6 +227,8 @@ export const DEFAULT_MAINCONTAINER_PROPS: IContainerProperties = {
* @param parent Parent of the container
* @param x horizontal offset
* @param y vertical offset
* @param width
* @param height
* @param containerConfig default config of the container sent by the API
* @returns {IContainerProperties} Default properties of a newly created container
*/
@ -276,8 +278,10 @@ export function GetDefaultSymbolModel(name: string,
newCounters: Record<string, number>,
type: string,
symbolConfig: IAvailableSymbol): ISymbolModel {
const id = `${name}-${newCounters[type]}`;
return {
id: `${name}-${newCounters[type]}`,
id,
displayedText: symbolConfig.DisplayedText ?? id,
type: name,
config: structuredClone(symbolConfig),
x: 0,