Implement symbols - Add, Remove, Select Container - Form - Link with container - Symbol behavior application to container (move to x with xpositionreference) Important changes - Remove SelectedContainer from HistoryState, meaning that it will be slower for each load but will be faster for each operations* (SetHistory, SelectContainer, DeleteContainer, SymbolOperations) - ElementsSidebar now opens with isSidebarOpen meaning that both sidebar will open on toggle - Moved camelize, transformX, restoreX to different modules (stringtools.ts, svg.ts)
23 lines
506 B
TypeScript
23 lines
506 B
TypeScript
import * as React from 'react';
|
|
import { ISymbolModel } from '../../../Interfaces/ISymbolModel';
|
|
import { Symbol } from './Symbol';
|
|
|
|
interface ISymbolLayerProps {
|
|
symbols: Map<string, ISymbolModel>
|
|
}
|
|
|
|
export const SymbolLayer: React.FC<ISymbolLayerProps> = (props) => {
|
|
const symbols: JSX.Element[] = [];
|
|
props.symbols.forEach((symbol) => {
|
|
symbols.push(
|
|
<Symbol key={`symbol-${symbol.id}`} model={symbol} />
|
|
);
|
|
});
|
|
return (
|
|
<g>
|
|
{
|
|
symbols
|
|
}
|
|
</g>
|
|
);
|
|
};
|