@knotx/plugins-connection-line 0.3.2 → 0.3.3

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/dist/index.cjs CHANGED
@@ -191,6 +191,10 @@ class ConnectionLine extends (_a = core.BasePlugin, _getNode_dec = [decorators.i
191
191
  path.setAttribute("stroke", "currentColor");
192
192
  path.setAttribute("stroke-width", `${2 / this.startScale}`);
193
193
  path.setAttribute("stroke-dasharray", "5,5");
194
+ const configAttributes = this.config.connectionLineSVGAttributes || {};
195
+ for (const key in configAttributes) {
196
+ path.setAttribute(key, configAttributes[key]);
197
+ }
194
198
  svg.appendChild(path);
195
199
  const container = this.getContainerElement();
196
200
  if (container)
package/dist/index.d.cts CHANGED
@@ -15,6 +15,10 @@ interface ConnectionLineConfig {
15
15
  * 临时连接线的类名
16
16
  */
17
17
  connectionLineClassName?: string;
18
+ /**
19
+ * 临时连接线的SVG属性
20
+ */
21
+ connectionLineSVGAttributes?: Record<string, string>;
18
22
  /**
19
23
  * 是否支持从多个选中节点同时拖拽连接线
20
24
  * @default true
package/dist/index.d.mts CHANGED
@@ -15,6 +15,10 @@ interface ConnectionLineConfig {
15
15
  * 临时连接线的类名
16
16
  */
17
17
  connectionLineClassName?: string;
18
+ /**
19
+ * 临时连接线的SVG属性
20
+ */
21
+ connectionLineSVGAttributes?: Record<string, string>;
18
22
  /**
19
23
  * 是否支持从多个选中节点同时拖拽连接线
20
24
  * @default true
package/dist/index.d.ts CHANGED
@@ -15,6 +15,10 @@ interface ConnectionLineConfig {
15
15
  * 临时连接线的类名
16
16
  */
17
17
  connectionLineClassName?: string;
18
+ /**
19
+ * 临时连接线的SVG属性
20
+ */
21
+ connectionLineSVGAttributes?: Record<string, string>;
18
22
  /**
19
23
  * 是否支持从多个选中节点同时拖拽连接线
20
24
  * @default true
package/dist/index.js CHANGED
@@ -185,6 +185,10 @@ class ConnectionLine extends (_a = BasePlugin, _getNode_dec = [inject.getNode()]
185
185
  path.setAttribute("stroke", "currentColor");
186
186
  path.setAttribute("stroke-width", `${2 / this.startScale}`);
187
187
  path.setAttribute("stroke-dasharray", "5,5");
188
+ const configAttributes = this.config.connectionLineSVGAttributes || {};
189
+ for (const key in configAttributes) {
190
+ path.setAttribute(key, configAttributes[key]);
191
+ }
188
192
  svg.appendChild(path);
189
193
  const container = this.getContainerElement();
190
194
  if (container)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knotx/plugins-connection-line",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Connectionline Plugin for Knotx",
5
5
  "author": "boenfu",
6
6
  "license": "MIT",
@@ -33,14 +33,14 @@
33
33
  "@interactjs/modifiers": "^1.10.27",
34
34
  "@interactjs/types": "^1.10.27",
35
35
  "interactjs": "^1.10.27",
36
- "@knotx/jsx": "0.3.2",
37
- "@knotx/plugins-selection": "0.3.2"
36
+ "@knotx/jsx": "0.3.3",
37
+ "@knotx/plugins-selection": "0.3.3"
38
38
  },
39
39
  "dependencies": {
40
40
  "lodash-es": "^4.17.21",
41
41
  "rxjs": "^7.8.1",
42
- "@knotx/core": "0.3.2",
43
- "@knotx/decorators": "0.3.2"
42
+ "@knotx/core": "0.3.3",
43
+ "@knotx/decorators": "0.3.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@interactjs/actions": "^1.10.27",
@@ -49,11 +49,11 @@
49
49
  "@interactjs/types": "^1.10.27",
50
50
  "@types/lodash-es": "^4.17.12",
51
51
  "interactjs": "^1.10.27",
52
- "@knotx/build-config": "0.3.2",
53
- "@knotx/eslint-config": "0.3.2",
54
- "@knotx/jsx": "0.3.2",
55
- "@knotx/plugins-selection": "0.3.2",
56
- "@knotx/typescript-config": "0.3.2"
52
+ "@knotx/build-config": "0.3.3",
53
+ "@knotx/eslint-config": "0.3.3",
54
+ "@knotx/jsx": "0.3.3",
55
+ "@knotx/plugins-selection": "0.3.3",
56
+ "@knotx/typescript-config": "0.3.3"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "unbuild",