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.
Files changed (41) hide show
  1. package/README.md +26 -2
  2. package/dist/w-flow-vue.umd.js +3 -3
  3. package/dist/w-flow-vue.umd.js.map +1 -1
  4. package/docs/components_WFlowVue.vue.html +1249 -1143
  5. package/docs/examples/app.html +1 -1
  6. package/docs/examples/app.umd.js +4 -4
  7. package/docs/examples/app.umd.js.map +1 -1
  8. package/docs/examples/ex-AppBasic.html +1 -1
  9. package/docs/examples/ex-AppConnectivity.html +1 -1
  10. package/docs/global.html +1 -1
  11. package/docs/index.html +1 -1
  12. package/docs/js_defaults.mjs.html +1 -1
  13. package/docs/js_edge-path.mjs.html +1 -1
  14. package/docs/js_geometry.mjs.html +1 -1
  15. package/docs/js_graph.mjs.html +1 -1
  16. package/docs/js_step-routing.mjs.html +1 -1
  17. package/docs/module-WFlowVue.html +193 -3
  18. package/package.json +81 -80
  19. package/public/index.html +0 -4
  20. package/src/components/WFlowVue.vue +1248 -1142
  21. package/src/components/edges/EdgeMarkerDefs.vue +79 -76
  22. package/src/components/edges/EdgeRenderer.vue +132 -120
  23. package/src/components/edges/EdgeWrapper.vue +393 -379
  24. package/src/components/nodes/NodeRenderer.vue +107 -95
  25. package/src/components/nodes/NodeWrapper.vue +485 -475
  26. package/src/components/ui/ConnSettingsForm.vue +166 -158
  27. package/src/components/ui/NodeSettingsForm.vue +193 -185
  28. package/test/WFlowVue-features.test.mjs +906 -759
  29. package/test/pics/vb-edge-hovered.png +0 -0
  30. package/test/pics/vb-edges-normal.png +0 -0
  31. package/test/pics/vb-locked-edge-hovered.png +0 -0
  32. package/test/pics/vb-locked-node-hovered.png +0 -0
  33. package/test/pics/vb-locked-node-selected.png +0 -0
  34. package/test/pics/vb-locked-overview.png +0 -0
  35. package/test/pics/vb-node-1.png +0 -0
  36. package/test/pics/vb-node-2.png +0 -0
  37. package/test/pics/vb-node-7.png +0 -0
  38. package/test/pics/vb-node-hovered.png +0 -0
  39. package/test/pics/vb-node-selected.png +0 -0
  40. package/test/pics/vb-overview.png +0 -0
  41. 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 three.js.
2
+ A vue component for flowchart and workflow diagram editing.
3
3
 
4
4
  ![language](https://img.shields.io/badge/language-JavaScript-orange.svg)
5
5
  [![language](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](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.0/dist/w-flow-vue.umd.js"></script>
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.