w-flow-vue 1.1.2 → 1.1.4
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 +13 -1
- 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 +55 -3
- package/docs/components_edges_EdgeMarkerDefs.vue.html +2 -2
- package/docs/components_mixins_pointerGesture.mjs.html +106 -0
- package/docs/components_mixins_settingsForm.mjs.html +2 -2
- package/docs/components_nodes_Handle.vue.html +34 -5
- package/docs/components_nodes_NodeBody.vue.html +33 -6
- package/docs/components_nodes_NodePorts.vue.html +2 -2
- package/docs/components_ui_Controls.vue.html +2 -2
- package/docs/components_ui_NodeSettingsForm.vue.html +2 -2
- package/docs/components_ui_SettingsGroup.vue.html +2 -2
- package/docs/components_ui_SettingsSelect.vue.html +2 -2
- package/docs/components_ui_SettingsText.vue.html +2 -2
- 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 +510 -15
- package/docs/index.html +2 -2
- package/docs/js_anchorPolicy.mjs.html +2 -2
- package/docs/js_connectPolicy.mjs.html +2 -2
- package/docs/js_defaults.mjs.html +2 -2
- package/docs/js_domGesture.mjs.html +106 -7
- package/docs/js_edgeMarker.mjs.html +2 -2
- package/docs/js_edgePath.mjs.html +2 -2
- package/docs/js_edgeStyle.mjs.html +2 -2
- package/docs/js_fixSvgNs.mjs.html +2 -2
- package/docs/js_geometry.mjs.html +2 -2
- package/docs/js_graph.mjs.html +2 -2
- package/docs/js_graphMutation.mjs.html +2 -2
- package/docs/js_handleDom.mjs.html +2 -2
- package/docs/js_hitTest.mjs.html +2 -2
- package/docs/js_icons.mjs.html +2 -2
- package/docs/js_nodeStyle.mjs.html +2 -2
- package/docs/js_popupPolicy.mjs.html +2 -2
- package/docs/js_resolveOpt.mjs.html +4 -2
- package/docs/js_settingsGroups.mjs.html +2 -2
- package/docs/js_shapeAnchor.mjs.html +2 -2
- package/docs/js_stepRouting.mjs.html +2 -2
- package/docs/js_viewport.mjs.html +2 -2
- package/docs/module-EdgeMarkerDefs.html +2 -2
- package/docs/module-Handle.html +3 -3
- package/docs/module-NodeBody.html +3 -3
- package/docs/module-NodePorts.html +2 -2
- package/docs/module-NodeSettingsForm.html +2 -2
- package/docs/module-SettingsGroup.html +2 -2
- package/docs/module-SettingsSelect.html +2 -2
- package/docs/module-SettingsText.html +2 -2
- package/package.json +5 -5
- package/spec//346/265/201/347/250/213_/344/272/222/345/213/225/345/245/221/347/264/204.md +18 -4
- package/spec//346/265/201/347/250/213_/345/234/226/345/217/260/344/272/222/345/213/225.md +22 -1
- package/src/components/WFlowVue.vue +53 -1
- package/src/components/canvas/FlowCanvas.vue +71 -1
- package/src/components/edges/EdgeWrapper.vue +51 -7
- package/src/components/mixins/pointerGesture.mjs +34 -0
- package/src/components/nodes/Handle.vue +32 -3
- package/src/components/nodes/NodeBody.vue +31 -4
- package/src/components/nodes/NodeWrapper.vue +20 -6
- package/src/js/domGesture.mjs +104 -5
- package/src/js/resolveOpt.mjs +2 -0
- package/test/e2e-flow.test.mjs +260 -2
- package/test/pics/flow-E2E-044-touch-panned.png +0 -0
- package/test/pics/flow-E2E-045-touch-node-dragged.png +0 -0
- package/test/pics/flow-E2E-046-touch-node-resized.png +0 -0
- package/test/pics/flow-E2E-047-touch-conn-created.png +0 -0
- package/test/pics/flow-E2E-048-touch-waypoint-dragged.png +0 -0
- package/test/pics/flow-E2E-049-touch-pinch-zoom.png +0 -0
- package/test/pics/flow-E2E-050-touch-tap-no-gesture.png +0 -0
- package/test/unit-pointer-gesture.test.mjs +311 -0
- package//345/273/272/350/255/260w-flow-vue/346/223/264/345/205/205.md +0 -63
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ 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.1.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/w-flow-vue@1.1.4/dist/w-flow-vue.umd.js"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Settings form components (for advanced use)
|
|
@@ -53,6 +53,18 @@ import { NODE_SETTING_GROUPS, CONN_SETTING_GROUPS, visibleGroups } from 'w-flow-
|
|
|
53
53
|
|
|
54
54
|
These are `.vue` / `.mjs` sources, so your build must handle Vue 2 SFCs (the same way this package consumes `w-component-vue`). The prebuilt `dist/w-flow-vue.umd.js` bundle only exports the `WFlowVue` component itself.
|
|
55
55
|
|
|
56
|
+
## Touch support
|
|
57
|
+
|
|
58
|
+
Touch and pen input work out of the box — the flow listens on a pointer channel that runs alongside the existing mouse one, so nothing changes for mouse users:
|
|
59
|
+
|
|
60
|
+
- **Drag gestures**: pan the canvas, drag nodes, resize from the corners, drag waypoints, and draw a connection from a handle. A gesture starts once the finger has moved past the drag threshold, so tapping a handle or a corner never starts one by accident.
|
|
61
|
+
- **Tap**: select, open info / settings popups and use the toolbar, exactly as a click does.
|
|
62
|
+
- **Pinch**: two fingers zoom around their midpoint. Disable with `opt.zoomOnPinch: false` (`opt.zoomOnScroll` covers the wheel separately).
|
|
63
|
+
- `.vue-flow` declares `touch-action: none`, so a touch that starts inside the flow drives the flow instead of scrolling the page — the same deal the wheel already had (`@wheel.prevent` means scrolling over the flow zooms it and never scrolls the page). Move off the flow and the page scrolls normally. Nothing calls `preventDefault()` on pointer/touch down, which keeps the browser's compatibility mouse events for taps intact — popups and click handlers depend on them.
|
|
64
|
+
- On coarse pointers, handles, resize corners and waypoints get a larger invisible hit area (extended away from the node, so the node body stays fully draggable). Their drawn size is unchanged.
|
|
65
|
+
|
|
66
|
+
**By design**: multi-select and box-select stay keyboard-driven (`opt.multiSelectionKeyCode` / `opt.boxSelectionKeyCode`, both `Shift`), so they are unavailable on touch-only devices — selection there is always single-select. No touch-reachable mode switch is planned.
|
|
67
|
+
|
|
56
68
|
## Required setup for Vue 2 apps
|
|
57
69
|
|
|
58
70
|
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:
|