vue3-network-graph 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -353,6 +353,7 @@ const handleMethods = () => {
353
353
  | `showCenterPoint` | `Boolean` | `false` | Canvas center cross marker |
354
354
  | `showEdgeTextBg` | `Boolean` | `false` | Connection text background |
355
355
  | `edgeTextBgColor` | `String` | `#0a0e1a` | Connection text background color |
356
+ | `edgeCenterTextFollowLine` | `Boolean` | `true` | Whether the center label rotates along the line: `true` follows the line tangent (current), `false` always stays horizontal |
356
357
  | `showNodeHandles` | `Boolean` | `false` | Node handles (four small circles appear at top/bottom/left/right of nodes, auto-connect when dragged to another node) |
357
358
  | `showStatusDot` | `Boolean` | `true` | Status dot at top-right corner of each node |
358
359
  | `labelGap` | `Number` | `18` | Fixed gap between node box edge and its label (px at 1x zoom) |
package/README.md CHANGED
@@ -353,6 +353,7 @@ const handleMethods = () => {
353
353
  | `showCenterPoint` | `Boolean` | `false` | 画布中心十字标记 |
354
354
  | `showEdgeTextBg` | `Boolean` | `false` | 连线文字底牌 |
355
355
  | `edgeTextBgColor` | `String` | `#0a0e1a` | 连线文字底牌颜色 |
356
+ | `edgeCenterTextFollowLine` | `Boolean` | `true` | 中心文字是否跟随线方向旋转:`true` 随线倾斜(现状),`false` 始终保持水平 |
356
357
  | `showNodeHandles` | `Boolean` | `false` | 节点手柄(开启后节点上下左右出现四个小圆圈,拖到另一节点松开自动连线) |
357
358
  | `showStatusDot` | `Boolean` | `true` | 节点右上角状态圆点开关 |
358
359
  | `labelGap` | `Number` | `18` | 节点标签与节点盒边缘的固定间距(1x 缩放下 px) |
package/dist/index.d.ts CHANGED
@@ -152,6 +152,15 @@ export interface TopologyConfig {
152
152
  edgeTextBgColor?: string;
153
153
  /** Edge label plate opacity 0-1 (default 0.92) */
154
154
  edgeTextBgOpacity?: number;
155
+ /**
156
+ * Whether the edge `centerText` label rotates along the line direction.
157
+ * - `true` (default): label follows the line tangent, like today.
158
+ * - `false`: label always stays horizontal on screen; only its anchor
159
+ * point still tracks the path midpoint. Affects `centerText` only —
160
+ * `fromText` / `toText` and the merged-bundle count badge still follow
161
+ * the line.
162
+ */
163
+ edgeCenterTextFollowLine?: boolean;
155
164
  /** Global default line color for edges (animation layers AND, when set, the static line). Per-edge `edge.color` wins. Legacy fallback edge.centerText.color still applies to animation layers when unset. */
156
165
  edgeColor?: string;
157
166
  /** Alias for `edgeColor` */