mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
Adjusted min values
This commit is contained in:
@@ -14,13 +14,13 @@ export const drawRect = async (parent: SVGAElement, node: Node, options: RectOpt
|
||||
// if so set it to min value
|
||||
if (node.width || node.height) {
|
||||
node.width = (node?.width ?? 0) - options.labelPaddingX * 2;
|
||||
if (node.width < 50) {
|
||||
node.width = 50;
|
||||
if (node.width < 20) {
|
||||
node.width = 20;
|
||||
}
|
||||
|
||||
node.height = (node?.height ?? 0) - options.labelPaddingY * 2;
|
||||
if (node.height < 50) {
|
||||
node.height = 50;
|
||||
if (node.height < 10) {
|
||||
node.height = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,13 +22,13 @@ export const question = async (parent: SVGAElement, node: Node): Promise<SVGAEle
|
||||
const padding = node.padding ?? 0;
|
||||
if (node.width || node.height) {
|
||||
node.width = (node?.width ?? 0) - padding * 8;
|
||||
if (node.width < 50) {
|
||||
node.width = 50;
|
||||
if (node.width < 20) {
|
||||
node.width = 20;
|
||||
}
|
||||
|
||||
node.height = (node?.height ?? 0) - padding * 8;
|
||||
if (node.height < 50) {
|
||||
node.height = 50;
|
||||
if (node.height < 10) {
|
||||
node.height = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -62,13 +62,13 @@ export const stadium = async (parent: SVGAElement, node: Node) => {
|
||||
// if so set it to min value
|
||||
if (node.width || node.height) {
|
||||
node.width = (node?.width ?? 0) - labelPaddingX * 2;
|
||||
if (node.width < 50) {
|
||||
node.width = 50;
|
||||
if (node.width < 20) {
|
||||
node.width = 20;
|
||||
}
|
||||
|
||||
node.height = (node?.height ?? 0) - labelPaddingY * 2;
|
||||
if (node.height < 50) {
|
||||
node.height = 50;
|
||||
if (node.height < 10) {
|
||||
node.height = 10;
|
||||
}
|
||||
}
|
||||
const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));
|
||||
|
Reference in New Issue
Block a user