w-flow-vue 1.0.0 → 1.0.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.md +26 -2
- package/dist/w-flow-vue.umd.js +3 -3
- package/dist/w-flow-vue.umd.js.map +1 -1
- package/docs/components_WFlowVue.vue.html +1249 -1143
- package/docs/examples/app.html +1 -1
- package/docs/examples/app.umd.js +4 -4
- package/docs/examples/app.umd.js.map +1 -1
- package/docs/examples/ex-AppBasic.html +1 -1
- package/docs/examples/ex-AppConnectivity.html +1 -1
- package/docs/global.html +1 -1
- package/docs/index.html +1 -1
- package/docs/js_defaults.mjs.html +1 -1
- package/docs/js_edge-path.mjs.html +1 -1
- package/docs/js_geometry.mjs.html +1 -1
- package/docs/js_graph.mjs.html +1 -1
- package/docs/js_step-routing.mjs.html +1 -1
- package/docs/module-WFlowVue.html +193 -3
- package/package.json +81 -80
- package/public/index.html +0 -4
- package/src/components/WFlowVue.vue +1248 -1142
- package/src/components/edges/EdgeMarkerDefs.vue +79 -76
- package/src/components/edges/EdgeRenderer.vue +132 -120
- package/src/components/edges/EdgeWrapper.vue +393 -379
- package/src/components/nodes/NodeRenderer.vue +107 -95
- package/src/components/nodes/NodeWrapper.vue +485 -475
- package/src/components/ui/ConnSettingsForm.vue +166 -158
- package/src/components/ui/NodeSettingsForm.vue +193 -185
- package/test/WFlowVue-features.test.mjs +906 -759
- package/test/pics/vb-edge-hovered.png +0 -0
- package/test/pics/vb-edges-normal.png +0 -0
- package/test/pics/vb-locked-edge-hovered.png +0 -0
- package/test/pics/vb-locked-node-hovered.png +0 -0
- package/test/pics/vb-locked-node-selected.png +0 -0
- package/test/pics/vb-locked-overview.png +0 -0
- package/test/pics/vb-node-1.png +0 -0
- package/test/pics/vb-node-2.png +0 -0
- package/test/pics/vb-node-7.png +0 -0
- package/test/pics/vb-node-hovered.png +0 -0
- package/test/pics/vb-node-selected.png +0 -0
- package/test/pics/vb-overview.png +0 -0
- package/vue2/344/271/213foreignObject/345/205/247/346/270/262/346/237/223/345/225/217/351/241/214/350/210/207/344/277/256/346/255/243.md +0 -151
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# w-flow-vue
|
|
2
|
-
A vue component for
|
|
2
|
+
A vue component for flowchart and workflow diagram editing.
|
|
3
3
|
|
|
4
4
|

|
|
5
5
|
[](https://github.com/vuejs/vue)
|
|
@@ -33,5 +33,29 @@ Add script for vue.
|
|
|
33
33
|
|
|
34
34
|
Add script for w-flow-vue.
|
|
35
35
|
```alias
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/w-flow-vue@1.0.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/w-flow-vue@1.0.2/dist/w-flow-vue.umd.js"></script>
|
|
37
37
|
```
|
|
38
|
+
|
|
39
|
+
## Required setup for Vue 2 apps
|
|
40
|
+
|
|
41
|
+
Node and connection popups are rendered inside SVG `foreignObject`. Vue 2 has a known bug ([vuejs/vue#7330](https://github.com/vuejs/vue/issues/7330)) where components inside `foreignObject` inherit the SVG namespace, so their HTML content renders as `SVGElement` with zero size. Add this global mixin once in your app entry (e.g. `main.js`) before mounting:
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
import Vue from 'vue'
|
|
45
|
+
|
|
46
|
+
// Fix Vue 2 bug #7330: components inside SVG foreignObject inherit
|
|
47
|
+
// SVG namespace, causing HTML elements to render as SVGElement (0x0).
|
|
48
|
+
Vue.mixin({
|
|
49
|
+
beforeCreate() {
|
|
50
|
+
if (this.$vnode && this.$vnode.ns === 'svg') this.$vnode.ns = undefined
|
|
51
|
+
},
|
|
52
|
+
beforeMount() {
|
|
53
|
+
if (this.$vnode && this.$vnode.ns === 'svg') this.$vnode.ns = undefined
|
|
54
|
+
},
|
|
55
|
+
beforeUpdate() {
|
|
56
|
+
if (this.$vnode && this.$vnode.ns === 'svg') this.$vnode.ns = undefined
|
|
57
|
+
},
|
|
58
|
+
})
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The mixin only clears the inherited namespace on component boundaries; SVG tags still resolve to the SVG namespace via `getTagNamespace`, so normal SVG rendering is unaffected.
|