完善端口标号与MECMAS21动态图标
This commit is contained in:
1 parent
df1d676131
commit
09778972a6
7 files changed
+780
-60
No files matched your search
@@ -26,6 +26,7 @@ import { SymbolSvg } from "./componentSymbols/primitives";
|
||||
import { AmesimStep0Symbol, AmesimUd00Symbol } from "./componentSymbols/signals";
|
||||
import { AmesimPnch012Symbol, AmesimPnch023Symbol } from "./componentSymbols/storage";
|
||||
import type {
|
||||
ComponentSymbolParameters,
|
||||
ComponentSymbolPortAnchors,
|
||||
ComponentSymbolPresentation,
|
||||
SymbolDefinition,
|
||||
@@ -38,6 +39,7 @@ type ComponentSymbolProps = {
|
||||
symbol: string;
|
||||
surface: ComponentSymbolSurface;
|
||||
className?: string;
|
||||
parameters?: ComponentSymbolParameters;
|
||||
};
|
||||
|
||||
function CylinderSymbol() {
|
||||
@@ -361,11 +363,13 @@ export function ComponentSymbol({
|
||||
symbol,
|
||||
surface,
|
||||
className,
|
||||
parameters,
|
||||
}: ComponentSymbolProps) {
|
||||
const resolvedSymbol: RegisteredComponentSymbol = isRegisteredComponentSymbol(symbol)
|
||||
? symbol
|
||||
: "generic";
|
||||
const definition = symbolRegistry[resolvedSymbol];
|
||||
const SymbolRenderer = definition.render;
|
||||
const rootClassName = [
|
||||
"component-symbol",
|
||||
`component-symbol-${surface}`,
|
||||
@@ -382,7 +386,7 @@ export function ComponentSymbol({
|
||||
data-component-symbol={resolvedSymbol}
|
||||
data-symbol-presentation={definition.presentation}
|
||||
>
|
||||
{definition.render()}
|
||||
<SymbolRenderer parameters={parameters} />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user