bytedance/flowgram.ai

[Feature] I want to provide a configuration item that controls the thickness of the line

Open

#632 aperta il 4 ago 2025

Vedi su GitHub
 (1 commento) (0 reazioni) (1 assegnatario)TypeScript (730 fork)github user discovery
help wanted

Metriche repository

Star
 (8111 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

现在已经有控制线条颜色的配置项了,希望再提供下能控制粗细的。

目前暂时可以通过 CSS 来控制:

.flow-lines-container {
  stroke-width: 2px;
}

也许可以在初始化时提供一个新的常量值?

editorProps = {
  ...other,
  constants: {
    [ConstantKeys.BASE_COLOR]: "red",
    [ConstantKeys.BASE_ACTIVATED_COLOR]: "blue",
    [ConstantKeys.LINE_WIDTH]: "2px" // <-- here
  }
}

This text is auto-translated: Now there are configuration items to control the color of the line, and I hope to provide ones that can control the thickness.

Currently, it can be controlled through CSS:

.flow-lines-container {
  stroke-width: 2px;
}

Maybe it is possible to provide a new constant value at initialization?

editorProps = {
  ...other,
  constants: {
    [ConstantKeys.BASE_COLOR]: "red",
    [ConstantKeys.BASE_ACTIVATED_COLOR]: "blue",
    [ConstantKeys.LINE_WIDTH]: "2px" // <-- here
  }
}

Guida contributor