bytedance/flowgram.ai

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

Open

#632 opened on Aug 4, 2025

View on GitHub
 (1 comment) (0 reactions) (1 assignee)TypeScript (730 forks)github user discovery
help wanted

Repository metrics

Stars
 (8,111 stars)
PR merge metrics
 (PR metrics pending)

Description

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

目前暂时可以通过 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
  }
}

Contributor guide