mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 02:49:40 +02:00
code refactor
This commit is contained in:
@@ -814,17 +814,17 @@ export const lex = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getTypeFromVertex = (vertex: FlowVertex) => {
|
const getTypeFromVertex = (vertex: FlowVertex) => {
|
||||||
if (vertex?.img) {
|
if (vertex.img) {
|
||||||
return 'imageSquare';
|
return 'imageSquare';
|
||||||
}
|
}
|
||||||
if (vertex?.icon) {
|
if (vertex.icon) {
|
||||||
if (vertex?.form === 'circle') {
|
if (vertex.form === 'circle') {
|
||||||
return 'iconCircle';
|
return 'iconCircle';
|
||||||
}
|
}
|
||||||
if (vertex?.form === 'square') {
|
if (vertex.form === 'square') {
|
||||||
return 'iconSquare';
|
return 'iconSquare';
|
||||||
}
|
}
|
||||||
if (vertex?.form === 'rounded') {
|
if (vertex.form === 'rounded') {
|
||||||
return 'iconRounded';
|
return 'iconRounded';
|
||||||
}
|
}
|
||||||
return 'icon';
|
return 'icon';
|
||||||
|
Reference in New Issue
Block a user