@antv/g6 5.0.0-alpha.8 → 5.0.0-beta.0
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/g6.min.js +6 -19
- package/esm/api-doc/behaviors.d.ts +2 -0
- package/esm/api-doc/behaviors.js +2 -0
- package/esm/api-doc/behaviors.js.map +1 -0
- package/esm/api-doc/graph.d.ts +4 -0
- package/esm/api-doc/graph.js +4 -0
- package/esm/api-doc/graph.js.map +1 -0
- package/esm/api-doc/item.d.ts +9 -0
- package/esm/api-doc/item.js +3 -0
- package/esm/api-doc/item.js.map +1 -0
- package/esm/api-doc/layout.d.ts +1 -0
- package/esm/api-doc/layout.js +2 -0
- package/esm/api-doc/layout.js.map +1 -0
- package/esm/api-doc/plugins.d.ts +1 -0
- package/esm/api-doc/plugins.js +2 -0
- package/esm/api-doc/plugins.js.map +1 -0
- package/esm/api-doc/types.d.ts +0 -0
- package/esm/api-doc/types.js +3 -0
- package/esm/api-doc/types.js.map +1 -0
- package/esm/api-doc/util.d.ts +3 -0
- package/esm/api-doc/util.js +4 -0
- package/esm/api-doc/util.js.map +1 -0
- package/esm/constant/shape.d.ts +7 -14
- package/esm/constant/shape.js +1 -0
- package/esm/constant/shape.js.map +1 -1
- package/esm/index.d.ts +215 -95
- package/esm/index.js +11 -4
- package/esm/index.js.map +1 -1
- package/esm/item/combo.d.ts +79 -2
- package/esm/item/combo.js +186 -2
- package/esm/item/combo.js.map +1 -1
- package/esm/item/edge.d.ts +15 -12
- package/esm/item/edge.js +40 -14
- package/esm/item/edge.js.map +1 -1
- package/esm/item/item.d.ts +12 -10
- package/esm/item/item.js +155 -83
- package/esm/item/item.js.map +1 -1
- package/esm/item/node.d.ts +32 -23
- package/esm/item/node.js +70 -49
- package/esm/item/node.js.map +1 -1
- package/esm/runtime/controller/data.d.ts +28 -4
- package/esm/runtime/controller/data.js +562 -173
- package/esm/runtime/controller/data.js.map +1 -1
- package/esm/runtime/controller/interaction.d.ts +1 -0
- package/esm/runtime/controller/interaction.js +23 -8
- package/esm/runtime/controller/interaction.js.map +1 -1
- package/esm/runtime/controller/item.d.ts +47 -5
- package/esm/runtime/controller/item.js +712 -122
- package/esm/runtime/controller/item.js.map +1 -1
- package/esm/runtime/controller/layout.d.ts +4 -1
- package/esm/runtime/controller/layout.js +109 -13
- package/esm/runtime/controller/layout.js.map +1 -1
- package/esm/runtime/controller/plugin.d.ts +11 -0
- package/esm/runtime/controller/plugin.js +39 -6
- package/esm/runtime/controller/plugin.js.map +1 -1
- package/esm/runtime/controller/theme.js +8 -4
- package/esm/runtime/controller/theme.js.map +1 -1
- package/esm/runtime/graph.d.ts +226 -47
- package/esm/runtime/graph.js +710 -90
- package/esm/runtime/graph.js.map +1 -1
- package/esm/stdlib/behavior/activate-relations.d.ts +2 -3
- package/esm/stdlib/behavior/activate-relations.js +13 -9
- package/esm/stdlib/behavior/activate-relations.js.map +1 -1
- package/esm/stdlib/behavior/brush-select.d.ts +3 -4
- package/esm/stdlib/behavior/brush-select.js +2 -2
- package/esm/stdlib/behavior/brush-select.js.map +1 -1
- package/esm/stdlib/behavior/click-select.d.ts +5 -3
- package/esm/stdlib/behavior/click-select.js +21 -7
- package/esm/stdlib/behavior/click-select.js.map +1 -1
- package/esm/stdlib/behavior/collapse-expand-combo.d.ts +28 -0
- package/esm/stdlib/behavior/collapse-expand-combo.js +35 -0
- package/esm/stdlib/behavior/collapse-expand-combo.js.map +1 -0
- package/esm/stdlib/behavior/collapse-expand-tree.d.ts +44 -0
- package/esm/stdlib/behavior/collapse-expand-tree.js +69 -0
- package/esm/stdlib/behavior/collapse-expand-tree.js.map +1 -0
- package/esm/stdlib/behavior/drag-canvas.d.ts +1 -2
- package/esm/stdlib/behavior/drag-canvas.js +15 -11
- package/esm/stdlib/behavior/drag-canvas.js.map +1 -1
- package/esm/stdlib/behavior/drag-combo.d.ts +111 -0
- package/esm/stdlib/behavior/drag-combo.js +380 -0
- package/esm/stdlib/behavior/drag-combo.js.map +1 -0
- package/esm/stdlib/behavior/drag-node.d.ts +33 -13
- package/esm/stdlib/behavior/drag-node.js +252 -67
- package/esm/stdlib/behavior/drag-node.js.map +1 -1
- package/esm/stdlib/behavior/hover-activate.d.ts +2 -1
- package/esm/stdlib/behavior/hover-activate.js +2 -0
- package/esm/stdlib/behavior/hover-activate.js.map +1 -1
- package/esm/stdlib/behavior/index.d.ts +15 -0
- package/esm/stdlib/behavior/index.js +16 -0
- package/esm/stdlib/behavior/index.js.map +1 -0
- package/esm/stdlib/behavior/lasso-select.d.ts +7 -3
- package/esm/stdlib/behavior/lasso-select.js +2 -2
- package/esm/stdlib/behavior/lasso-select.js.map +1 -1
- package/esm/stdlib/behavior/orbit-canvas-3d.d.ts +2 -3
- package/esm/stdlib/behavior/orbit-canvas-3d.js +2 -2
- package/esm/stdlib/behavior/orbit-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/rotate-canvas-3d.d.ts +1 -2
- package/esm/stdlib/behavior/rotate-canvas-3d.js +1 -1
- package/esm/stdlib/behavior/rotate-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/track-canvas-3d.d.ts +2 -3
- package/esm/stdlib/behavior/track-canvas-3d.js +2 -2
- package/esm/stdlib/behavior/track-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/types.d.ts +13 -0
- package/esm/stdlib/behavior/types.js +2 -0
- package/esm/stdlib/behavior/types.js.map +1 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.d.ts +1 -2
- package/esm/stdlib/behavior/zoom-canvas-3d.js +7 -7
- package/esm/stdlib/behavior/zoom-canvas-3d.js.map +1 -1
- package/esm/stdlib/behavior/zoom-canvas.d.ts +1 -2
- package/esm/stdlib/behavior/zoom-canvas.js +20 -18
- package/esm/stdlib/behavior/zoom-canvas.js.map +1 -1
- package/esm/stdlib/data/index.d.ts +3 -0
- package/esm/stdlib/data/index.js +4 -0
- package/esm/stdlib/data/index.js.map +1 -0
- package/esm/stdlib/data/mapNodeSize.d.ts +12 -0
- package/esm/stdlib/data/mapNodeSize.js +43 -0
- package/esm/stdlib/data/mapNodeSize.js.map +1 -0
- package/esm/stdlib/data/transformV4Data.d.ts +9 -0
- package/esm/stdlib/data/transformV4Data.js +142 -0
- package/esm/stdlib/data/transformV4Data.js.map +1 -0
- package/esm/stdlib/data/validateData.d.ts +9 -0
- package/esm/stdlib/data/validateData.js +98 -0
- package/esm/stdlib/data/validateData.js.map +1 -0
- package/esm/stdlib/index.d.ts +115 -49
- package/esm/stdlib/index.js +156 -37
- package/esm/stdlib/index.js.map +1 -1
- package/esm/stdlib/item/combo/circle.d.ts +29 -0
- package/esm/stdlib/item/combo/circle.js +56 -0
- package/esm/stdlib/item/combo/circle.js.map +1 -0
- package/esm/stdlib/item/combo/index.d.ts +2 -0
- package/esm/stdlib/item/combo/index.js +3 -0
- package/esm/stdlib/item/combo/index.js.map +1 -0
- package/esm/stdlib/item/combo/rect.d.ts +31 -0
- package/esm/stdlib/item/combo/rect.js +65 -0
- package/esm/stdlib/item/combo/rect.js.map +1 -0
- package/esm/stdlib/item/edge/base.d.ts +12 -3
- package/esm/stdlib/item/edge/base.js +39 -5
- package/esm/stdlib/item/edge/base.js.map +1 -1
- package/esm/stdlib/item/edge/cubic-horizontal.d.ts +36 -0
- package/esm/stdlib/item/edge/cubic-horizontal.js +56 -0
- package/esm/stdlib/item/edge/cubic-horizontal.js.map +1 -0
- package/esm/stdlib/item/edge/cubic-vertical.d.ts +36 -0
- package/esm/stdlib/item/edge/cubic-vertical.js +56 -0
- package/esm/stdlib/item/edge/cubic-vertical.js.map +1 -0
- package/esm/stdlib/item/edge/cubic.d.ts +59 -0
- package/esm/stdlib/item/edge/cubic.js +116 -0
- package/esm/stdlib/item/edge/cubic.js.map +1 -0
- package/esm/stdlib/item/edge/index.d.ts +6 -0
- package/esm/stdlib/item/edge/index.js +6 -0
- package/esm/stdlib/item/edge/index.js.map +1 -1
- package/esm/stdlib/item/edge/line.d.ts +1 -1
- package/esm/stdlib/item/edge/line.js +16 -1
- package/esm/stdlib/item/edge/line.js.map +1 -1
- package/esm/stdlib/item/edge/loop.d.ts +32 -0
- package/esm/stdlib/item/edge/loop.js +115 -0
- package/esm/stdlib/item/edge/loop.js.map +1 -0
- package/esm/stdlib/item/edge/polyline.d.ts +44 -0
- package/esm/stdlib/item/edge/polyline.js +92 -0
- package/esm/stdlib/item/edge/polyline.js.map +1 -0
- package/esm/stdlib/item/edge/quadratic.d.ts +40 -0
- package/esm/stdlib/item/edge/quadratic.js +78 -0
- package/esm/stdlib/item/edge/quadratic.js.map +1 -0
- package/esm/stdlib/item/node/base.d.ts +83 -38
- package/esm/stdlib/item/node/base.js +100 -15
- package/esm/stdlib/item/node/base.js.map +1 -1
- package/esm/stdlib/item/node/base3d.js +1 -1
- package/esm/stdlib/item/node/base3d.js.map +1 -1
- package/esm/stdlib/item/node/circle.js +5 -5
- package/esm/stdlib/item/node/circle.js.map +1 -1
- package/esm/stdlib/item/node/diamond.d.ts +32 -0
- package/esm/stdlib/item/node/diamond.js +79 -0
- package/esm/stdlib/item/node/diamond.js.map +1 -0
- package/esm/stdlib/item/node/donut.d.ts +70 -0
- package/esm/stdlib/item/node/donut.js +207 -0
- package/esm/stdlib/item/node/donut.js.map +1 -0
- package/esm/stdlib/item/node/ellipse.d.ts +32 -0
- package/esm/stdlib/item/node/ellipse.js +71 -0
- package/esm/stdlib/item/node/ellipse.js.map +1 -0
- package/esm/stdlib/item/node/hexagon.d.ts +33 -0
- package/esm/stdlib/item/node/hexagon.js +102 -0
- package/esm/stdlib/item/node/hexagon.js.map +1 -0
- package/esm/stdlib/item/node/index.d.ts +8 -0
- package/esm/stdlib/item/node/index.js +8 -0
- package/esm/stdlib/item/node/index.js.map +1 -1
- package/esm/stdlib/item/node/modelRect.d.ts +61 -0
- package/esm/stdlib/item/node/modelRect.js +186 -0
- package/esm/stdlib/item/node/modelRect.js.map +1 -0
- package/esm/stdlib/item/node/rect.d.ts +32 -0
- package/esm/stdlib/item/node/rect.js +75 -0
- package/esm/stdlib/item/node/rect.js.map +1 -0
- package/esm/stdlib/item/node/star.d.ts +34 -0
- package/esm/stdlib/item/node/star.js +115 -0
- package/esm/stdlib/item/node/star.js.map +1 -0
- package/esm/stdlib/item/node/triangle.d.ts +44 -0
- package/esm/stdlib/item/node/triangle.js +177 -0
- package/esm/stdlib/item/node/triangle.js.map +1 -0
- package/esm/stdlib/plugin/fisheye/index.d.ts +130 -0
- package/esm/stdlib/plugin/fisheye/index.js +488 -0
- package/esm/stdlib/plugin/fisheye/index.js.map +1 -0
- package/esm/stdlib/plugin/grid/index.d.ts +36 -0
- package/esm/stdlib/plugin/grid/index.js +81 -0
- package/esm/stdlib/plugin/grid/index.js.map +1 -0
- package/esm/stdlib/plugin/history/combo-command.d.ts +9 -0
- package/esm/stdlib/plugin/history/combo-command.js +21 -0
- package/esm/stdlib/plugin/history/combo-command.js.map +1 -0
- package/esm/stdlib/plugin/history/command.d.ts +18 -0
- package/esm/stdlib/plugin/history/command.js +51 -0
- package/esm/stdlib/plugin/history/command.js.map +1 -0
- package/esm/stdlib/plugin/history/index.d.ts +112 -0
- package/esm/stdlib/plugin/history/index.js +275 -0
- package/esm/stdlib/plugin/history/index.js.map +1 -0
- package/esm/stdlib/plugin/history/item-data-command.d.ts +14 -0
- package/esm/stdlib/plugin/history/item-data-command.js +63 -0
- package/esm/stdlib/plugin/history/item-data-command.js.map +1 -0
- package/esm/stdlib/plugin/history/layer-updated-command.d.ts +9 -0
- package/esm/stdlib/plugin/history/layer-updated-command.js +21 -0
- package/esm/stdlib/plugin/history/layer-updated-command.js.map +1 -0
- package/esm/stdlib/plugin/history/state-updated-command.d.ts +9 -0
- package/esm/stdlib/plugin/history/state-updated-command.js +20 -0
- package/esm/stdlib/plugin/history/state-updated-command.js.map +1 -0
- package/esm/stdlib/plugin/history/visibility-updated-command.d.ts +10 -0
- package/esm/stdlib/plugin/history/visibility-updated-command.js +23 -0
- package/esm/stdlib/plugin/history/visibility-updated-command.js.map +1 -0
- package/esm/stdlib/plugin/hull/bubbleset.d.ts +9 -0
- package/esm/stdlib/plugin/hull/bubbleset.js +592 -0
- package/esm/stdlib/plugin/hull/bubbleset.js.map +1 -0
- package/esm/stdlib/plugin/hull/convexHull.d.ts +14 -0
- package/esm/stdlib/plugin/hull/convexHull.js +56 -0
- package/esm/stdlib/plugin/hull/convexHull.js.map +1 -0
- package/esm/stdlib/plugin/hull/hullComponent.d.ts +87 -0
- package/esm/stdlib/plugin/hull/hullComponent.js +382 -0
- package/esm/stdlib/plugin/hull/hullComponent.js.map +1 -0
- package/esm/stdlib/plugin/hull/index.d.ts +59 -0
- package/esm/stdlib/plugin/hull/index.js +161 -0
- package/esm/stdlib/plugin/hull/index.js.map +1 -0
- package/esm/stdlib/plugin/hull/types.d.ts +15 -0
- package/esm/stdlib/plugin/hull/types.js +2 -0
- package/esm/stdlib/plugin/hull/types.js.map +1 -0
- package/esm/stdlib/plugin/hull/util.d.ts +77 -0
- package/esm/stdlib/plugin/hull/util.js +401 -0
- package/esm/stdlib/plugin/hull/util.js.map +1 -0
- package/esm/stdlib/plugin/index.d.ts +8 -0
- package/esm/stdlib/plugin/index.js +9 -0
- package/esm/stdlib/plugin/index.js.map +1 -0
- package/esm/stdlib/plugin/legend/index.d.ts +45 -3
- package/esm/stdlib/plugin/legend/index.js +47 -42
- package/esm/stdlib/plugin/legend/index.js.map +1 -1
- package/esm/stdlib/plugin/menu/index.d.ts +55 -0
- package/esm/stdlib/plugin/menu/index.js +237 -0
- package/esm/stdlib/plugin/menu/index.js.map +1 -0
- package/esm/stdlib/plugin/minimap/index.d.ts +11 -3
- package/esm/stdlib/plugin/minimap/index.js +19 -21
- package/esm/stdlib/plugin/minimap/index.js.map +1 -1
- package/esm/stdlib/plugin/toolbar/index.d.ts +59 -0
- package/esm/stdlib/plugin/toolbar/index.js +215 -0
- package/esm/stdlib/plugin/toolbar/index.js.map +1 -0
- package/esm/stdlib/plugin/tooltip/index.d.ts +96 -0
- package/esm/stdlib/plugin/tooltip/index.js +378 -0
- package/esm/stdlib/plugin/tooltip/index.js.map +1 -0
- package/esm/stdlib/plugin/types.d.ts +8 -0
- package/esm/stdlib/plugin/types.js +2 -0
- package/esm/stdlib/plugin/types.js.map +1 -0
- package/esm/stdlib/theme/dark.d.ts +1 -2
- package/esm/stdlib/theme/dark.js +13 -1
- package/esm/stdlib/theme/dark.js.map +1 -1
- package/esm/stdlib/theme/index.d.ts +2 -0
- package/esm/stdlib/theme/index.js +3 -0
- package/esm/stdlib/theme/index.js.map +1 -0
- package/esm/stdlib/theme/light.d.ts +1 -2
- package/esm/stdlib/theme/light.js +65 -10
- package/esm/stdlib/theme/light.js.map +1 -1
- package/esm/stdlib/themeSolver/base.d.ts +1 -1
- package/esm/stdlib/themeSolver/base.js +1 -1
- package/esm/stdlib/themeSolver/base.js.map +1 -1
- package/esm/stdlib/themeSolver/index.d.ts +3 -0
- package/esm/stdlib/themeSolver/index.js +4 -0
- package/esm/stdlib/themeSolver/index.js.map +1 -0
- package/esm/stdlib/themeSolver/spec.d.ts +2 -4
- package/esm/stdlib/themeSolver/spec.js +2 -2
- package/esm/stdlib/themeSolver/spec.js.map +1 -1
- package/esm/stdlib/themeSolver/subject.d.ts +2 -4
- package/esm/stdlib/themeSolver/subject.js +2 -2
- package/esm/stdlib/themeSolver/subject.js.map +1 -1
- package/esm/types/behavior.js.map +1 -1
- package/esm/types/combo.d.ts +51 -3
- package/esm/types/common.d.ts +10 -0
- package/esm/types/data.d.ts +13 -7
- package/esm/types/edge.d.ts +19 -5
- package/esm/types/event.d.ts +9 -1
- package/esm/types/event.js +8 -8
- package/esm/types/event.js.map +1 -1
- package/esm/types/graph.d.ts +169 -20
- package/esm/types/history.d.ts +28 -0
- package/esm/types/history.js +6 -0
- package/esm/types/history.js.map +1 -0
- package/esm/types/hook.d.ts +33 -6
- package/esm/types/index.d.ts +11 -5
- package/esm/types/index.js.map +1 -1
- package/esm/types/item.d.ts +14 -8
- package/esm/types/item.js.map +1 -1
- package/esm/types/layout.d.ts +4 -1
- package/esm/types/loop.d.ts +21 -0
- package/esm/types/loop.js +12 -0
- package/esm/types/loop.js.map +1 -0
- package/esm/types/node.d.ts +90 -10
- package/esm/types/plugin.d.ts +4 -0
- package/esm/types/plugin.js +1 -1
- package/esm/types/plugin.js.map +1 -1
- package/esm/types/spec.d.ts +26 -9
- package/esm/types/theme.d.ts +76 -10
- package/esm/types/theme.js +1 -2
- package/esm/types/theme.js.map +1 -1
- package/esm/util/animate.d.ts +2 -2
- package/esm/util/animate.js +52 -17
- package/esm/util/animate.js.map +1 -1
- package/esm/util/array.d.ts +8 -0
- package/esm/util/array.js +11 -1
- package/esm/util/array.js.map +1 -1
- package/esm/util/arrow.d.ts +17 -0
- package/esm/util/arrow.js +56 -0
- package/esm/util/arrow.js.map +1 -0
- package/esm/util/bbox.d.ts +106 -0
- package/esm/util/bbox.js +255 -0
- package/esm/util/bbox.js.map +1 -0
- package/esm/util/behavior.d.ts +2 -0
- package/esm/util/behavior.js +12 -0
- package/esm/util/behavior.js.map +1 -0
- package/esm/util/canvas.d.ts +1 -2
- package/esm/util/canvas.js +11 -20
- package/esm/util/canvas.js.map +1 -1
- package/esm/util/data.d.ts +96 -0
- package/esm/util/data.js +262 -0
- package/esm/util/data.js.map +1 -0
- package/esm/util/event.d.ts +29 -1
- package/esm/util/event.js +70 -0
- package/esm/util/event.js.map +1 -1
- package/esm/util/extend.d.ts +8 -2
- package/esm/util/extend.js.map +1 -1
- package/esm/util/index.d.ts +41 -3
- package/esm/util/index.js +20 -1
- package/esm/util/index.js.map +1 -1
- package/esm/util/item.d.ts +2 -1
- package/esm/util/item.js +38 -13
- package/esm/util/item.js.map +1 -1
- package/esm/util/layout.d.ts +40 -0
- package/esm/util/layout.js +160 -0
- package/esm/util/layout.js.map +1 -0
- package/esm/util/loop.d.ts +37 -0
- package/esm/util/loop.js +104 -0
- package/esm/util/loop.js.map +1 -0
- package/esm/util/mapper.js +4 -9
- package/esm/util/mapper.js.map +1 -1
- package/esm/util/math.d.ts +15 -0
- package/esm/util/math.js +14 -0
- package/esm/util/math.js.map +1 -1
- package/esm/util/mock.d.ts +30 -0
- package/esm/util/mock.js +69 -0
- package/esm/util/mock.js.map +1 -0
- package/esm/util/path.d.ts +11 -0
- package/esm/util/path.js +44 -0
- package/esm/util/path.js.map +1 -0
- package/esm/util/point.d.ts +24 -2
- package/esm/util/point.js +27 -2
- package/esm/util/point.js.map +1 -1
- package/esm/util/polyline.d.ts +113 -0
- package/esm/util/polyline.js +505 -0
- package/esm/util/polyline.js.map +1 -0
- package/esm/util/router.d.ts +31 -0
- package/esm/util/router.js +380 -0
- package/esm/util/router.js.map +1 -0
- package/esm/util/shape.d.ts +39 -4
- package/esm/util/shape.js +118 -2
- package/esm/util/shape.js.map +1 -1
- package/esm/util/shape3d.d.ts +1 -1
- package/esm/util/shape3d.js +12 -6
- package/esm/util/shape3d.js.map +1 -1
- package/esm/util/type.d.ts +6 -0
- package/esm/util/type.js +7 -1
- package/esm/util/type.js.map +1 -1
- package/esm/util/zoom.d.ts +2 -2
- package/esm/util/zoom.js +6 -2
- package/esm/util/zoom.js.map +1 -1
- package/lib/api-doc/behaviors.d.ts +2 -0
- package/lib/api-doc/behaviors.js +18 -0
- package/lib/api-doc/behaviors.js.map +1 -0
- package/lib/api-doc/graph.d.ts +4 -0
- package/lib/api-doc/graph.js +11 -0
- package/lib/api-doc/graph.js.map +1 -0
- package/lib/api-doc/item.d.ts +9 -0
- package/lib/api-doc/item.js +21 -0
- package/lib/api-doc/item.js.map +1 -0
- package/lib/api-doc/layout.d.ts +1 -0
- package/lib/api-doc/layout.js +3 -0
- package/lib/api-doc/layout.js.map +1 -0
- package/lib/api-doc/plugins.d.ts +1 -0
- package/lib/api-doc/plugins.js +18 -0
- package/lib/api-doc/plugins.js.map +1 -0
- package/lib/api-doc/types.d.ts +0 -0
- package/lib/api-doc/types.js +3 -0
- package/lib/api-doc/types.js.map +1 -0
- package/lib/api-doc/util.d.ts +3 -0
- package/lib/api-doc/util.js +10 -0
- package/lib/api-doc/util.js.map +1 -0
- package/lib/constant/shape.d.ts +7 -14
- package/lib/constant/shape.js +1 -0
- package/lib/constant/shape.js.map +1 -1
- package/lib/index.d.ts +215 -95
- package/lib/index.js +13 -3
- package/lib/index.js.map +1 -1
- package/lib/item/combo.d.ts +79 -2
- package/lib/item/combo.js +186 -2
- package/lib/item/combo.js.map +1 -1
- package/lib/item/edge.d.ts +15 -12
- package/lib/item/edge.js +40 -14
- package/lib/item/edge.js.map +1 -1
- package/lib/item/item.d.ts +12 -10
- package/lib/item/item.js +153 -81
- package/lib/item/item.js.map +1 -1
- package/lib/item/node.d.ts +32 -23
- package/lib/item/node.js +70 -49
- package/lib/item/node.js.map +1 -1
- package/lib/runtime/controller/data.d.ts +28 -4
- package/lib/runtime/controller/data.js +561 -172
- package/lib/runtime/controller/data.js.map +1 -1
- package/lib/runtime/controller/interaction.d.ts +1 -0
- package/lib/runtime/controller/interaction.js +22 -7
- package/lib/runtime/controller/interaction.js.map +1 -1
- package/lib/runtime/controller/item.d.ts +47 -5
- package/lib/runtime/controller/item.js +710 -120
- package/lib/runtime/controller/item.js.map +1 -1
- package/lib/runtime/controller/layout.d.ts +4 -1
- package/lib/runtime/controller/layout.js +132 -13
- package/lib/runtime/controller/layout.js.map +1 -1
- package/lib/runtime/controller/plugin.d.ts +11 -0
- package/lib/runtime/controller/plugin.js +39 -6
- package/lib/runtime/controller/plugin.js.map +1 -1
- package/lib/runtime/controller/theme.js +8 -4
- package/lib/runtime/controller/theme.js.map +1 -1
- package/lib/runtime/graph.d.ts +226 -47
- package/lib/runtime/graph.js +709 -89
- package/lib/runtime/graph.js.map +1 -1
- package/lib/stdlib/behavior/activate-relations.d.ts +2 -3
- package/lib/stdlib/behavior/activate-relations.js +14 -9
- package/lib/stdlib/behavior/activate-relations.js.map +1 -1
- package/lib/stdlib/behavior/brush-select.d.ts +3 -4
- package/lib/stdlib/behavior/brush-select.js +3 -2
- package/lib/stdlib/behavior/brush-select.js.map +1 -1
- package/lib/stdlib/behavior/click-select.d.ts +5 -3
- package/lib/stdlib/behavior/click-select.js +22 -7
- package/lib/stdlib/behavior/click-select.js.map +1 -1
- package/lib/stdlib/behavior/collapse-expand-combo.d.ts +28 -0
- package/lib/stdlib/behavior/collapse-expand-combo.js +39 -0
- package/lib/stdlib/behavior/collapse-expand-combo.js.map +1 -0
- package/lib/stdlib/behavior/collapse-expand-tree.d.ts +44 -0
- package/lib/stdlib/behavior/collapse-expand-tree.js +73 -0
- package/lib/stdlib/behavior/collapse-expand-tree.js.map +1 -0
- package/lib/stdlib/behavior/drag-canvas.d.ts +1 -2
- package/lib/stdlib/behavior/drag-canvas.js +16 -11
- package/lib/stdlib/behavior/drag-canvas.js.map +1 -1
- package/lib/stdlib/behavior/drag-combo.d.ts +111 -0
- package/lib/stdlib/behavior/drag-combo.js +384 -0
- package/lib/stdlib/behavior/drag-combo.js.map +1 -0
- package/lib/stdlib/behavior/drag-node.d.ts +33 -13
- package/lib/stdlib/behavior/drag-node.js +252 -66
- package/lib/stdlib/behavior/drag-node.js.map +1 -1
- package/lib/stdlib/behavior/hover-activate.d.ts +2 -1
- package/lib/stdlib/behavior/hover-activate.js +2 -0
- package/lib/stdlib/behavior/hover-activate.js.map +1 -1
- package/lib/stdlib/behavior/index.d.ts +15 -0
- package/lib/stdlib/behavior/index.js +32 -0
- package/lib/stdlib/behavior/index.js.map +1 -0
- package/lib/stdlib/behavior/lasso-select.d.ts +7 -3
- package/lib/stdlib/behavior/lasso-select.js +4 -6
- package/lib/stdlib/behavior/lasso-select.js.map +1 -1
- package/lib/stdlib/behavior/orbit-canvas-3d.d.ts +2 -3
- package/lib/stdlib/behavior/orbit-canvas-3d.js +4 -6
- package/lib/stdlib/behavior/orbit-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/rotate-canvas-3d.d.ts +1 -2
- package/lib/stdlib/behavior/rotate-canvas-3d.js +2 -1
- package/lib/stdlib/behavior/rotate-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/track-canvas-3d.d.ts +2 -3
- package/lib/stdlib/behavior/track-canvas-3d.js +4 -6
- package/lib/stdlib/behavior/track-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/types.d.ts +13 -0
- package/lib/stdlib/behavior/types.js +3 -0
- package/lib/stdlib/behavior/types.js.map +1 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.d.ts +1 -2
- package/lib/stdlib/behavior/zoom-canvas-3d.js +8 -7
- package/lib/stdlib/behavior/zoom-canvas-3d.js.map +1 -1
- package/lib/stdlib/behavior/zoom-canvas.d.ts +1 -2
- package/lib/stdlib/behavior/zoom-canvas.js +21 -18
- package/lib/stdlib/behavior/zoom-canvas.js.map +1 -1
- package/lib/stdlib/data/index.d.ts +3 -0
- package/lib/stdlib/data/index.js +20 -0
- package/lib/stdlib/data/index.js.map +1 -0
- package/lib/stdlib/data/mapNodeSize.d.ts +12 -0
- package/lib/stdlib/data/mapNodeSize.js +47 -0
- package/lib/stdlib/data/mapNodeSize.js.map +1 -0
- package/lib/stdlib/data/transformV4Data.d.ts +9 -0
- package/lib/stdlib/data/transformV4Data.js +146 -0
- package/lib/stdlib/data/transformV4Data.js.map +1 -0
- package/lib/stdlib/data/validateData.d.ts +9 -0
- package/lib/stdlib/data/validateData.js +102 -0
- package/lib/stdlib/data/validateData.js.map +1 -0
- package/lib/stdlib/index.d.ts +115 -49
- package/lib/stdlib/index.js +190 -47
- package/lib/stdlib/index.js.map +1 -1
- package/lib/stdlib/item/combo/circle.d.ts +29 -0
- package/lib/stdlib/item/combo/circle.js +60 -0
- package/lib/stdlib/item/combo/circle.js.map +1 -0
- package/lib/stdlib/item/combo/index.d.ts +2 -0
- package/lib/stdlib/item/combo/index.js +19 -0
- package/lib/stdlib/item/combo/index.js.map +1 -0
- package/lib/stdlib/item/combo/rect.d.ts +31 -0
- package/lib/stdlib/item/combo/rect.js +69 -0
- package/lib/stdlib/item/combo/rect.js.map +1 -0
- package/lib/stdlib/item/edge/base.d.ts +12 -3
- package/lib/stdlib/item/edge/base.js +38 -4
- package/lib/stdlib/item/edge/base.js.map +1 -1
- package/lib/stdlib/item/edge/cubic-horizontal.d.ts +36 -0
- package/lib/stdlib/item/edge/cubic-horizontal.js +60 -0
- package/lib/stdlib/item/edge/cubic-horizontal.js.map +1 -0
- package/lib/stdlib/item/edge/cubic-vertical.d.ts +36 -0
- package/lib/stdlib/item/edge/cubic-vertical.js +60 -0
- package/lib/stdlib/item/edge/cubic-vertical.js.map +1 -0
- package/lib/stdlib/item/edge/cubic.d.ts +59 -0
- package/lib/stdlib/item/edge/cubic.js +120 -0
- package/lib/stdlib/item/edge/cubic.js.map +1 -0
- package/lib/stdlib/item/edge/index.d.ts +6 -0
- package/lib/stdlib/item/edge/index.js +6 -0
- package/lib/stdlib/item/edge/index.js.map +1 -1
- package/lib/stdlib/item/edge/line.d.ts +1 -1
- package/lib/stdlib/item/edge/line.js +16 -1
- package/lib/stdlib/item/edge/line.js.map +1 -1
- package/lib/stdlib/item/edge/loop.d.ts +32 -0
- package/lib/stdlib/item/edge/loop.js +119 -0
- package/lib/stdlib/item/edge/loop.js.map +1 -0
- package/lib/stdlib/item/edge/polyline.d.ts +44 -0
- package/lib/stdlib/item/edge/polyline.js +96 -0
- package/lib/stdlib/item/edge/polyline.js.map +1 -0
- package/lib/stdlib/item/edge/quadratic.d.ts +40 -0
- package/lib/stdlib/item/edge/quadratic.js +82 -0
- package/lib/stdlib/item/edge/quadratic.js.map +1 -0
- package/lib/stdlib/item/node/base.d.ts +83 -38
- package/lib/stdlib/item/node/base.js +100 -15
- package/lib/stdlib/item/node/base.js.map +1 -1
- package/lib/stdlib/item/node/base3d.js +1 -1
- package/lib/stdlib/item/node/base3d.js.map +1 -1
- package/lib/stdlib/item/node/circle.js +5 -5
- package/lib/stdlib/item/node/circle.js.map +1 -1
- package/lib/stdlib/item/node/diamond.d.ts +32 -0
- package/lib/stdlib/item/node/diamond.js +83 -0
- package/lib/stdlib/item/node/diamond.js.map +1 -0
- package/lib/stdlib/item/node/donut.d.ts +70 -0
- package/lib/stdlib/item/node/donut.js +211 -0
- package/lib/stdlib/item/node/donut.js.map +1 -0
- package/lib/stdlib/item/node/ellipse.d.ts +32 -0
- package/lib/stdlib/item/node/ellipse.js +75 -0
- package/lib/stdlib/item/node/ellipse.js.map +1 -0
- package/lib/stdlib/item/node/hexagon.d.ts +33 -0
- package/lib/stdlib/item/node/hexagon.js +106 -0
- package/lib/stdlib/item/node/hexagon.js.map +1 -0
- package/lib/stdlib/item/node/index.d.ts +8 -0
- package/lib/stdlib/item/node/index.js +8 -0
- package/lib/stdlib/item/node/index.js.map +1 -1
- package/lib/stdlib/item/node/modelRect.d.ts +61 -0
- package/lib/stdlib/item/node/modelRect.js +190 -0
- package/lib/stdlib/item/node/modelRect.js.map +1 -0
- package/lib/stdlib/item/node/rect.d.ts +32 -0
- package/lib/stdlib/item/node/rect.js +79 -0
- package/lib/stdlib/item/node/rect.js.map +1 -0
- package/lib/stdlib/item/node/star.d.ts +34 -0
- package/lib/stdlib/item/node/star.js +119 -0
- package/lib/stdlib/item/node/star.js.map +1 -0
- package/lib/stdlib/item/node/triangle.d.ts +44 -0
- package/lib/stdlib/item/node/triangle.js +181 -0
- package/lib/stdlib/item/node/triangle.js.map +1 -0
- package/lib/stdlib/plugin/fisheye/index.d.ts +130 -0
- package/lib/stdlib/plugin/fisheye/index.js +492 -0
- package/lib/stdlib/plugin/fisheye/index.js.map +1 -0
- package/lib/stdlib/plugin/grid/index.d.ts +36 -0
- package/lib/stdlib/plugin/grid/index.js +85 -0
- package/lib/stdlib/plugin/grid/index.js.map +1 -0
- package/lib/stdlib/plugin/history/combo-command.d.ts +9 -0
- package/lib/stdlib/plugin/history/combo-command.js +25 -0
- package/lib/stdlib/plugin/history/combo-command.js.map +1 -0
- package/lib/stdlib/plugin/history/command.d.ts +18 -0
- package/lib/stdlib/plugin/history/command.js +54 -0
- package/lib/stdlib/plugin/history/command.js.map +1 -0
- package/lib/stdlib/plugin/history/index.d.ts +112 -0
- package/lib/stdlib/plugin/history/index.js +283 -0
- package/lib/stdlib/plugin/history/index.js.map +1 -0
- package/lib/stdlib/plugin/history/item-data-command.d.ts +14 -0
- package/lib/stdlib/plugin/history/item-data-command.js +67 -0
- package/lib/stdlib/plugin/history/item-data-command.js.map +1 -0
- package/lib/stdlib/plugin/history/layer-updated-command.d.ts +9 -0
- package/lib/stdlib/plugin/history/layer-updated-command.js +25 -0
- package/lib/stdlib/plugin/history/layer-updated-command.js.map +1 -0
- package/lib/stdlib/plugin/history/state-updated-command.d.ts +9 -0
- package/lib/stdlib/plugin/history/state-updated-command.js +24 -0
- package/lib/stdlib/plugin/history/state-updated-command.js.map +1 -0
- package/lib/stdlib/plugin/history/visibility-updated-command.d.ts +10 -0
- package/lib/stdlib/plugin/history/visibility-updated-command.js +27 -0
- package/lib/stdlib/plugin/history/visibility-updated-command.js.map +1 -0
- package/lib/stdlib/plugin/hull/bubbleset.d.ts +9 -0
- package/lib/stdlib/plugin/hull/bubbleset.js +596 -0
- package/lib/stdlib/plugin/hull/bubbleset.js.map +1 -0
- package/lib/stdlib/plugin/hull/convexHull.d.ts +14 -0
- package/lib/stdlib/plugin/hull/convexHull.js +61 -0
- package/lib/stdlib/plugin/hull/convexHull.js.map +1 -0
- package/lib/stdlib/plugin/hull/hullComponent.d.ts +87 -0
- package/lib/stdlib/plugin/hull/hullComponent.js +385 -0
- package/lib/stdlib/plugin/hull/hullComponent.js.map +1 -0
- package/lib/stdlib/plugin/hull/index.d.ts +59 -0
- package/lib/stdlib/plugin/hull/index.js +167 -0
- package/lib/stdlib/plugin/hull/index.js.map +1 -0
- package/lib/stdlib/plugin/hull/types.d.ts +15 -0
- package/lib/stdlib/plugin/hull/types.js +3 -0
- package/lib/stdlib/plugin/hull/types.js.map +1 -0
- package/lib/stdlib/plugin/hull/util.d.ts +77 -0
- package/lib/stdlib/plugin/hull/util.js +419 -0
- package/lib/stdlib/plugin/hull/util.js.map +1 -0
- package/lib/stdlib/plugin/index.d.ts +8 -0
- package/lib/stdlib/plugin/index.js +25 -0
- package/lib/stdlib/plugin/index.js.map +1 -0
- package/lib/stdlib/plugin/legend/index.d.ts +45 -3
- package/lib/stdlib/plugin/legend/index.js +46 -40
- package/lib/stdlib/plugin/legend/index.js.map +1 -1
- package/lib/stdlib/plugin/menu/index.d.ts +55 -0
- package/lib/stdlib/plugin/menu/index.js +244 -0
- package/lib/stdlib/plugin/menu/index.js.map +1 -0
- package/lib/stdlib/plugin/minimap/index.d.ts +11 -3
- package/lib/stdlib/plugin/minimap/index.js +19 -20
- package/lib/stdlib/plugin/minimap/index.js.map +1 -1
- package/lib/stdlib/plugin/toolbar/index.d.ts +59 -0
- package/lib/stdlib/plugin/toolbar/index.js +222 -0
- package/lib/stdlib/plugin/toolbar/index.js.map +1 -0
- package/lib/stdlib/plugin/tooltip/index.d.ts +96 -0
- package/lib/stdlib/plugin/tooltip/index.js +385 -0
- package/lib/stdlib/plugin/tooltip/index.js.map +1 -0
- package/lib/stdlib/plugin/types.d.ts +8 -0
- package/lib/stdlib/plugin/types.js +3 -0
- package/lib/stdlib/plugin/types.js.map +1 -0
- package/lib/stdlib/theme/dark.d.ts +1 -2
- package/lib/stdlib/theme/dark.js +14 -1
- package/lib/stdlib/theme/dark.js.map +1 -1
- package/lib/stdlib/theme/index.d.ts +2 -0
- package/lib/stdlib/theme/index.js +19 -0
- package/lib/stdlib/theme/index.js.map +1 -0
- package/lib/stdlib/theme/light.d.ts +1 -2
- package/lib/stdlib/theme/light.js +66 -10
- package/lib/stdlib/theme/light.js.map +1 -1
- package/lib/stdlib/themeSolver/base.d.ts +1 -1
- package/lib/stdlib/themeSolver/base.js +2 -1
- package/lib/stdlib/themeSolver/base.js.map +1 -1
- package/lib/stdlib/themeSolver/index.d.ts +3 -0
- package/lib/stdlib/themeSolver/index.js +20 -0
- package/lib/stdlib/themeSolver/index.js.map +1 -0
- package/lib/stdlib/themeSolver/spec.d.ts +2 -4
- package/lib/stdlib/themeSolver/spec.js +4 -6
- package/lib/stdlib/themeSolver/spec.js.map +1 -1
- package/lib/stdlib/themeSolver/subject.d.ts +2 -4
- package/lib/stdlib/themeSolver/subject.js +4 -4
- package/lib/stdlib/themeSolver/subject.js.map +1 -1
- package/lib/types/behavior.js.map +1 -1
- package/lib/types/combo.d.ts +51 -3
- package/lib/types/common.d.ts +10 -0
- package/lib/types/data.d.ts +13 -7
- package/lib/types/edge.d.ts +19 -5
- package/lib/types/event.d.ts +9 -1
- package/lib/types/event.js +10 -10
- package/lib/types/event.js.map +1 -1
- package/lib/types/graph.d.ts +169 -20
- package/lib/types/history.d.ts +28 -0
- package/lib/types/history.js +9 -0
- package/lib/types/history.js.map +1 -0
- package/lib/types/hook.d.ts +33 -6
- package/lib/types/index.d.ts +11 -5
- package/lib/types/index.js.map +1 -1
- package/lib/types/item.d.ts +14 -8
- package/lib/types/item.js +1 -1
- package/lib/types/item.js.map +1 -1
- package/lib/types/layout.d.ts +4 -1
- package/lib/types/loop.d.ts +21 -0
- package/lib/types/loop.js +15 -0
- package/lib/types/loop.js.map +1 -0
- package/lib/types/node.d.ts +90 -10
- package/lib/types/plugin.d.ts +4 -0
- package/lib/types/plugin.js.map +1 -1
- package/lib/types/spec.d.ts +26 -9
- package/lib/types/theme.d.ts +76 -10
- package/lib/types/theme.js +1 -2
- package/lib/types/theme.js.map +1 -1
- package/lib/util/animate.d.ts +2 -2
- package/lib/util/animate.js +52 -17
- package/lib/util/animate.js.map +1 -1
- package/lib/util/array.d.ts +8 -0
- package/lib/util/array.js +13 -2
- package/lib/util/array.js.map +1 -1
- package/lib/util/arrow.d.ts +17 -0
- package/lib/util/arrow.js +60 -0
- package/lib/util/arrow.js.map +1 -0
- package/lib/util/bbox.d.ts +106 -0
- package/lib/util/bbox.js +273 -0
- package/lib/util/bbox.js.map +1 -0
- package/lib/util/behavior.d.ts +2 -0
- package/lib/util/behavior.js +16 -0
- package/lib/util/behavior.js.map +1 -0
- package/lib/util/canvas.d.ts +1 -2
- package/lib/util/canvas.js +11 -20
- package/lib/util/canvas.js.map +1 -1
- package/lib/util/data.d.ts +96 -0
- package/lib/util/data.js +276 -0
- package/lib/util/data.js.map +1 -0
- package/lib/util/event.d.ts +29 -1
- package/lib/util/event.js +73 -1
- package/lib/util/event.js.map +1 -1
- package/lib/util/extend.d.ts +8 -2
- package/lib/util/extend.js.map +1 -1
- package/lib/util/index.d.ts +41 -3
- package/lib/util/index.js +20 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/item.d.ts +2 -1
- package/lib/util/item.js +38 -13
- package/lib/util/item.js.map +1 -1
- package/lib/util/layout.d.ts +40 -0
- package/lib/util/layout.js +172 -0
- package/lib/util/layout.js.map +1 -0
- package/lib/util/loop.d.ts +37 -0
- package/lib/util/loop.js +111 -0
- package/lib/util/loop.js.map +1 -0
- package/lib/util/mapper.js +4 -9
- package/lib/util/mapper.js.map +1 -1
- package/lib/util/math.d.ts +15 -0
- package/lib/util/math.js +17 -1
- package/lib/util/math.js.map +1 -1
- package/lib/util/mock.d.ts +30 -0
- package/lib/util/mock.js +73 -0
- package/lib/util/mock.js.map +1 -0
- package/lib/util/path.d.ts +11 -0
- package/lib/util/path.js +49 -0
- package/lib/util/path.js.map +1 -0
- package/lib/util/point.d.ts +24 -2
- package/lib/util/point.js +31 -3
- package/lib/util/point.js.map +1 -1
- package/lib/util/polyline.d.ts +113 -0
- package/lib/util/polyline.js +524 -0
- package/lib/util/polyline.js.map +1 -0
- package/lib/util/router.d.ts +31 -0
- package/lib/util/router.js +384 -0
- package/lib/util/router.js.map +1 -0
- package/lib/util/shape.d.ts +39 -4
- package/lib/util/shape.js +122 -3
- package/lib/util/shape.js.map +1 -1
- package/lib/util/shape3d.d.ts +1 -1
- package/lib/util/shape3d.js +11 -5
- package/lib/util/shape3d.js.map +1 -1
- package/lib/util/type.d.ts +6 -0
- package/lib/util/type.js +9 -2
- package/lib/util/type.js.map +1 -1
- package/lib/util/zoom.d.ts +2 -2
- package/lib/util/zoom.js +6 -2
- package/lib/util/zoom.js.map +1 -1
- package/package.json +42 -22
- package/src/api-doc/behaviors.ts +2 -0
- package/src/api-doc/graph.ts +4 -0
- package/src/api-doc/item.ts +43 -0
- package/src/api-doc/layout.ts +13 -0
- package/src/api-doc/plugins.ts +1 -0
- package/src/api-doc/readme.md +59 -0
- package/src/api-doc/types.ts +2 -0
- package/src/api-doc/util.ts +3 -0
- package/src/constant/shape.ts +4 -1
- package/src/index.ts +14 -4
- package/src/item/combo.ts +307 -2
- package/src/item/edge.ts +73 -24
- package/src/item/item.ts +184 -85
- package/src/item/node.ts +138 -69
- package/src/runtime/controller/data.ts +665 -191
- package/src/runtime/controller/interaction.ts +31 -7
- package/src/runtime/controller/item.ts +990 -172
- package/src/runtime/controller/layout.ts +165 -13
- package/src/runtime/controller/plugin.ts +47 -10
- package/src/runtime/controller/theme.ts +8 -4
- package/src/runtime/graph.ts +922 -144
- package/src/stdlib/behavior/activate-relations.ts +14 -11
- package/src/stdlib/behavior/brush-select.ts +4 -5
- package/src/stdlib/behavior/click-select.ts +26 -11
- package/src/stdlib/behavior/collapse-expand-combo.ts +57 -0
- package/src/stdlib/behavior/collapse-expand-tree.ts +106 -0
- package/src/stdlib/behavior/drag-canvas.ts +15 -13
- package/src/stdlib/behavior/drag-combo.ts +589 -0
- package/src/stdlib/behavior/drag-node.ts +380 -110
- package/src/stdlib/behavior/hover-activate.ts +3 -5
- package/src/stdlib/behavior/index.ts +15 -0
- package/src/stdlib/behavior/lasso-select.ts +6 -2
- package/src/stdlib/behavior/orbit-canvas-3d.ts +3 -5
- package/src/stdlib/behavior/rotate-canvas-3d.ts +1 -3
- package/src/stdlib/behavior/track-canvas-3d.ts +3 -5
- package/src/stdlib/behavior/types.ts +15 -0
- package/src/stdlib/behavior/zoom-canvas-3d.ts +5 -7
- package/src/stdlib/behavior/zoom-canvas.ts +19 -19
- package/src/stdlib/data/index.ts +3 -0
- package/src/stdlib/data/mapNodeSize.ts +67 -0
- package/src/stdlib/data/transformV4Data.ts +207 -0
- package/src/stdlib/data/validateData.ts +146 -0
- package/src/stdlib/index.ts +221 -37
- package/src/stdlib/item/combo/circle.ts +113 -0
- package/src/stdlib/item/combo/index.ts +2 -0
- package/src/stdlib/item/combo/rect.ts +123 -0
- package/src/stdlib/item/edge/base.ts +71 -6
- package/src/stdlib/item/edge/cubic-horizontal.ts +86 -0
- package/src/stdlib/item/edge/cubic-vertical.ts +85 -0
- package/src/stdlib/item/edge/cubic.ts +198 -0
- package/src/stdlib/item/edge/index.ts +6 -0
- package/src/stdlib/item/edge/line.ts +14 -15
- package/src/stdlib/item/edge/loop.ts +162 -0
- package/src/stdlib/item/edge/polyline.ts +161 -0
- package/src/stdlib/item/edge/quadratic.ts +133 -0
- package/src/stdlib/item/node/base.ts +195 -53
- package/src/stdlib/item/node/base3d.ts +2 -0
- package/src/stdlib/item/node/circle.ts +5 -5
- package/src/stdlib/item/node/diamond.ts +144 -0
- package/src/stdlib/item/node/donut.ts +368 -0
- package/src/stdlib/item/node/ellipse.ts +128 -0
- package/src/stdlib/item/node/hexagon.ts +168 -0
- package/src/stdlib/item/node/index.ts +8 -0
- package/src/stdlib/item/node/modelRect.ts +405 -0
- package/src/stdlib/item/node/rect.ts +141 -0
- package/src/stdlib/item/node/star.ts +181 -0
- package/src/stdlib/item/node/triangle.ts +265 -0
- package/src/stdlib/plugin/fisheye/index.ts +607 -0
- package/src/stdlib/plugin/grid/index.ts +125 -0
- package/src/stdlib/plugin/history/combo-command.ts +28 -0
- package/src/stdlib/plugin/history/command.ts +81 -0
- package/src/stdlib/plugin/history/index.ts +347 -0
- package/src/stdlib/plugin/history/item-data-command.ts +96 -0
- package/src/stdlib/plugin/history/layer-updated-command.ts +28 -0
- package/src/stdlib/plugin/history/state-updated-command.ts +36 -0
- package/src/stdlib/plugin/history/visibility-updated-command.ts +41 -0
- package/src/stdlib/plugin/hull/bubbleset.ts +828 -0
- package/src/stdlib/plugin/hull/convexHull.ts +68 -0
- package/src/stdlib/plugin/hull/hullComponent.ts +501 -0
- package/src/stdlib/plugin/hull/index.ts +234 -0
- package/src/stdlib/plugin/hull/types.ts +15 -0
- package/src/stdlib/plugin/hull/util.ts +511 -0
- package/src/stdlib/plugin/index.ts +8 -0
- package/src/stdlib/plugin/legend/index.ts +122 -61
- package/src/stdlib/plugin/menu/index.ts +275 -0
- package/src/stdlib/plugin/minimap/index.ts +35 -26
- package/src/stdlib/plugin/toolbar/index.ts +257 -0
- package/src/stdlib/plugin/tooltip/index.ts +444 -0
- package/src/stdlib/plugin/types.ts +8 -0
- package/src/stdlib/theme/dark.ts +13 -1
- package/src/stdlib/theme/index.ts +2 -0
- package/src/stdlib/theme/light.ts +88 -10
- package/src/stdlib/themeSolver/base.ts +1 -1
- package/src/stdlib/themeSolver/index.ts +3 -0
- package/src/stdlib/themeSolver/spec.ts +2 -5
- package/src/stdlib/themeSolver/subject.ts +2 -5
- package/src/types/behavior.ts +0 -1
- package/src/types/combo.ts +61 -4
- package/src/types/common.ts +13 -0
- package/src/types/data.ts +28 -7
- package/src/types/edge.ts +30 -6
- package/src/types/event.ts +8 -8
- package/src/types/graph.ts +232 -25
- package/src/types/history.ts +30 -0
- package/src/types/hook.ts +37 -7
- package/src/types/index.ts +37 -12
- package/src/types/item.ts +25 -11
- package/src/types/layout.ts +20 -16
- package/src/types/loop.ts +23 -0
- package/src/types/node.ts +94 -14
- package/src/types/plugin.ts +7 -1
- package/src/types/spec.ts +30 -13
- package/src/types/theme.ts +80 -10
- package/src/util/animate.ts +60 -20
- package/src/util/array.ts +12 -1
- package/src/util/arrow.ts +62 -0
- package/src/util/bbox.ts +298 -0
- package/src/util/behavior.ts +14 -0
- package/src/util/canvas.ts +16 -24
- package/src/util/data.ts +307 -0
- package/src/util/event.ts +114 -1
- package/src/util/extend.ts +8 -2
- package/src/util/index.ts +31 -1
- package/src/util/item.ts +79 -13
- package/src/util/layout.ts +165 -0
- package/src/util/loop.ts +145 -0
- package/src/util/mapper.ts +10 -9
- package/src/util/math.ts +24 -0
- package/src/util/mock.ts +72 -0
- package/src/util/path.ts +52 -0
- package/src/util/point.ts +33 -2
- package/src/util/polyline.ts +676 -0
- package/src/util/router.ts +552 -0
- package/src/util/shape.ts +159 -6
- package/src/util/shape3d.ts +16 -11
- package/src/util/type.ts +8 -1
- package/src/util/zoom.ts +8 -4
- package/esm/stdlib/data/comboFromNode.d.ts +0 -9
- package/esm/stdlib/data/comboFromNode.js +0 -28
- package/esm/stdlib/data/comboFromNode.js.map +0 -1
- package/lib/stdlib/data/comboFromNode.d.ts +0 -9
- package/lib/stdlib/data/comboFromNode.js +0 -32
- package/lib/stdlib/data/comboFromNode.js.map +0 -1
- package/src/stdlib/data/comboFromNode.ts +0 -28
|
@@ -1,13 +1,26 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { Group } from '@antv/g';
|
|
2
|
-
import { debounce, isArray, isObject, throttle } from '@antv/util';
|
|
11
|
+
import { debounce, each, isArray, isObject, map, throttle, uniq, uniqueId, } from '@antv/util';
|
|
12
|
+
import { DirectionalLight, AmbientLight } from '@antv/g-plugin-3d';
|
|
3
13
|
import registry from '../../stdlib';
|
|
4
14
|
import Node from '../../item/node';
|
|
5
15
|
import Edge from '../../item/edge';
|
|
6
|
-
import
|
|
16
|
+
import Combo from '../../item/combo';
|
|
17
|
+
import { getCombinedBoundsByData, upsertShape } from '../../util/shape';
|
|
7
18
|
import { getExtension } from '../../util/extension';
|
|
8
19
|
import { upsertTransientItem } from '../../util/item';
|
|
9
|
-
import { DirectionalLight, AmbientLight } from '@antv/g-plugin-3d';
|
|
10
20
|
import { formatLodStrategy } from '../../util/zoom';
|
|
21
|
+
import { deconstructData, graphComboTreeDfs, graphCoreTreeDfs, traverseAncestors, traverseAncestorsAndSucceeds, traverseGraphAncestors, } from '../../util/data';
|
|
22
|
+
import { getGroupedChanges } from '../../util/event';
|
|
23
|
+
import { EdgeCollisionChecker, QuadTree } from '../../util/polyline';
|
|
11
24
|
/**
|
|
12
25
|
* Manages and stores the node / edge / combo items.
|
|
13
26
|
*/
|
|
@@ -19,18 +32,18 @@ export class ItemController {
|
|
|
19
32
|
/**
|
|
20
33
|
* Node / edge / combo items map
|
|
21
34
|
*/
|
|
22
|
-
this.itemMap =
|
|
23
|
-
// TODO: combo? not a independent group
|
|
35
|
+
this.itemMap = new Map();
|
|
24
36
|
this.nodeDataTypeSet = new Set();
|
|
25
37
|
this.edgeDataTypeSet = new Set();
|
|
38
|
+
this.comboDataTypeSet = new Set();
|
|
26
39
|
// The G shapes or groups on transient map drawn by this controller
|
|
27
|
-
this.transientObjectMap =
|
|
28
|
-
this.transientItemMap =
|
|
40
|
+
this.transientObjectMap = new Map();
|
|
41
|
+
this.transientItemMap = new Map();
|
|
29
42
|
this.onViewportChange = debounce(({ transform, effectTiming }) => {
|
|
30
43
|
const { zoom } = transform;
|
|
31
44
|
if (zoom) {
|
|
32
45
|
const zoomRatio = this.graph.getZoom();
|
|
33
|
-
|
|
46
|
+
this.itemMap.forEach((item) => item.updateZoom(zoomRatio));
|
|
34
47
|
this.zoom = zoomRatio;
|
|
35
48
|
}
|
|
36
49
|
}, 500, false);
|
|
@@ -39,7 +52,7 @@ export class ItemController {
|
|
|
39
52
|
return;
|
|
40
53
|
const { nodeDataTypeSet, edgeDataTypeSet } = this;
|
|
41
54
|
const { node: nodeTheme, edge: edgeTheme } = theme;
|
|
42
|
-
|
|
55
|
+
this.itemMap.forEach((item) => {
|
|
43
56
|
const itemTye = item.getType();
|
|
44
57
|
const usingTheme = itemTye === 'node' ? nodeTheme : edgeTheme;
|
|
45
58
|
const usingTypeSet = itemTye === 'node' ? nodeDataTypeSet : edgeDataTypeSet;
|
|
@@ -53,10 +66,12 @@ export class ItemController {
|
|
|
53
66
|
};
|
|
54
67
|
this.onDestroy = () => {
|
|
55
68
|
Object.values(this.itemMap).forEach((item) => item.destroy());
|
|
69
|
+
// Fix OOM problem, since this map will hold all the refs of items.
|
|
70
|
+
this.itemMap.clear();
|
|
56
71
|
};
|
|
57
72
|
this.graph = graph;
|
|
58
73
|
// get mapper for node / edge / combo
|
|
59
|
-
const { node, edge, combo, nodeState, edgeState, comboState } = graph.getSpecification();
|
|
74
|
+
const { node, edge, combo, nodeState = {}, edgeState = {}, comboState = {}, } = graph.getSpecification();
|
|
60
75
|
this.nodeMapper = node;
|
|
61
76
|
this.edgeMapper = edge;
|
|
62
77
|
this.comboMapper = combo;
|
|
@@ -78,9 +93,11 @@ export class ItemController {
|
|
|
78
93
|
this.graph.hooks.itemchange.tap(this.onChange.bind(this));
|
|
79
94
|
this.graph.hooks.itemstatechange.tap(this.onItemStateChange.bind(this));
|
|
80
95
|
this.graph.hooks.itemvisibilitychange.tap(this.onItemVisibilityChange.bind(this));
|
|
96
|
+
this.graph.hooks.itemzindexchange.tap(this.onItemZIndexChange.bind(this));
|
|
81
97
|
this.graph.hooks.transientupdate.tap(this.onTransientUpdate.bind(this));
|
|
82
98
|
this.graph.hooks.viewportchange.tap(this.onViewportChange.bind(this));
|
|
83
99
|
this.graph.hooks.themechange.tap(this.onThemeChange.bind(this));
|
|
100
|
+
this.graph.hooks.treecollapseexpand.tap(this.onTreeCollapseExpand.bind(this));
|
|
84
101
|
this.graph.hooks.destroy.tap(this.onDestroy.bind(this));
|
|
85
102
|
}
|
|
86
103
|
/**
|
|
@@ -89,9 +106,9 @@ export class ItemController {
|
|
|
89
106
|
getExtensions() {
|
|
90
107
|
// TODO: user need to config using node/edge/combo types from useLib to spec?
|
|
91
108
|
const { node, edge, combo } = this.graph.getSpecification();
|
|
92
|
-
const nodeTypes = Object.keys(registry.useLib.nodes);
|
|
93
|
-
const edgeTypes = Object.keys(registry.useLib.edges);
|
|
94
|
-
const comboTypes = Object.keys(registry.useLib.combos);
|
|
109
|
+
const nodeTypes = Object.keys(registry.useLib.nodes || {});
|
|
110
|
+
const edgeTypes = Object.keys(registry.useLib.edges || {});
|
|
111
|
+
const comboTypes = Object.keys(registry.useLib.combos || {});
|
|
95
112
|
return {
|
|
96
113
|
node: nodeTypes
|
|
97
114
|
.map((config) => getExtension(config, registry.useLib, 'node'))
|
|
@@ -113,16 +130,21 @@ export class ItemController {
|
|
|
113
130
|
const { graph } = this;
|
|
114
131
|
// 0. clear groups on canvas, and create new groups
|
|
115
132
|
graph.canvas.removeChildren();
|
|
133
|
+
const comboGroup = new Group({ id: 'combo-group' });
|
|
116
134
|
const edgeGroup = new Group({ id: 'edge-group' });
|
|
117
135
|
const nodeGroup = new Group({ id: 'node-group' });
|
|
136
|
+
graph.canvas.appendChild(comboGroup);
|
|
118
137
|
graph.canvas.appendChild(edgeGroup);
|
|
119
138
|
graph.canvas.appendChild(nodeGroup);
|
|
120
139
|
this.nodeGroup = nodeGroup;
|
|
121
140
|
this.edgeGroup = edgeGroup;
|
|
141
|
+
this.comboGroup = comboGroup;
|
|
122
142
|
// Also create transient groups on transient canvas.
|
|
123
143
|
transientCanvas.removeChildren();
|
|
144
|
+
this.transientComboGroup = new Group({ id: 'combo-group' });
|
|
124
145
|
this.transientEdgeGroup = new Group({ id: 'edge-group' });
|
|
125
146
|
this.transientNodeGroup = new Group({ id: 'node-group' });
|
|
147
|
+
transientCanvas.appendChild(this.transientComboGroup);
|
|
126
148
|
transientCanvas.appendChild(this.transientEdgeGroup);
|
|
127
149
|
transientCanvas.appendChild(this.transientNodeGroup);
|
|
128
150
|
// 1. create lights for webgl 3d rendering
|
|
@@ -140,134 +162,233 @@ export class ItemController {
|
|
|
140
162
|
intensity: Math.PI * 0.7,
|
|
141
163
|
},
|
|
142
164
|
});
|
|
165
|
+
// @ts-ignore
|
|
143
166
|
graph.canvas.appendChild(ambientLight);
|
|
167
|
+
// @ts-ignore
|
|
144
168
|
graph.canvas.appendChild(light);
|
|
145
169
|
const { width, height } = graph.canvas.getConfig();
|
|
146
170
|
graph.canvas.getCamera().setPerspective(0.1, 50000, 45, width / height);
|
|
147
171
|
}
|
|
148
172
|
// 2. create node / edge / combo items, classes from ../../item, and element drawing and updating fns from node/edge/comboExtensions
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this.
|
|
154
|
-
|
|
173
|
+
const { nodes, edges, combos } = deconstructData({
|
|
174
|
+
nodes: graphCore.getAllNodes(),
|
|
175
|
+
edges: graphCore.getAllEdges(),
|
|
176
|
+
});
|
|
177
|
+
this.renderNodes(nodes, theme.node);
|
|
178
|
+
this.renderCombos(combos, theme.combo, graphCore);
|
|
179
|
+
this.renderEdges(edges, theme.edge);
|
|
180
|
+
this.sortByComboTree(graphCore);
|
|
181
|
+
// collapse the combos which has 'collapsed' in initial data
|
|
182
|
+
if (graphCore.hasTreeStructure('combo')) {
|
|
183
|
+
graphCoreTreeDfs(graphCore, graphCore.getRoots('combo'), (child) => {
|
|
184
|
+
if (child.data.collapsed)
|
|
185
|
+
this.collapseCombo(graphCore, child);
|
|
186
|
+
}, 'BT', 'combo');
|
|
187
|
+
}
|
|
188
|
+
// collapse the sub tree which has 'collapsed' in initial data
|
|
189
|
+
if (graphCore.hasTreeStructure('tree')) {
|
|
190
|
+
const collapseNodes = [];
|
|
191
|
+
graphCoreTreeDfs(graphCore, graphCore.getRoots('tree'), (child) => {
|
|
192
|
+
if (child.data.collapsed)
|
|
193
|
+
collapseNodes.push(child);
|
|
194
|
+
}, 'BT', 'tree');
|
|
195
|
+
this.collapseSubTree(collapseNodes, graphCore, false);
|
|
196
|
+
}
|
|
155
197
|
}
|
|
156
198
|
/**
|
|
157
199
|
* Listener of runtime's itemchange lifecycle hook.
|
|
158
200
|
* @param param
|
|
159
201
|
*/
|
|
160
202
|
onChange(param) {
|
|
161
|
-
const { changes, graphCore, theme = {},
|
|
162
|
-
const groupedChanges =
|
|
163
|
-
NodeRemoved: [],
|
|
164
|
-
EdgeRemoved: [],
|
|
165
|
-
NodeAdded: [],
|
|
166
|
-
EdgeAdded: [],
|
|
167
|
-
NodeDataUpdated: [],
|
|
168
|
-
EdgeUpdated: [],
|
|
169
|
-
EdgeDataUpdated: [],
|
|
170
|
-
};
|
|
171
|
-
changes.forEach((change) => {
|
|
172
|
-
const { type: changeType } = change;
|
|
173
|
-
groupedChanges[changeType].push(change);
|
|
174
|
-
});
|
|
203
|
+
const { changes, graphCore, action, animate = true, upsertAncestors = true, theme = {}, callback = () => { }, } = param;
|
|
204
|
+
const groupedChanges = getGroupedChanges(graphCore, changes);
|
|
175
205
|
const { itemMap } = this;
|
|
176
206
|
// change items according to the order of the keys in groupedChanges
|
|
177
207
|
// === 1. remove edges; 2. remove nodes ===
|
|
178
|
-
groupedChanges.EdgeRemoved
|
|
208
|
+
[...groupedChanges.EdgeRemoved, ...groupedChanges.NodeRemoved].forEach(({ value }) => {
|
|
179
209
|
const { id } = value;
|
|
180
|
-
const item = itemMap
|
|
210
|
+
const item = itemMap.get(id);
|
|
181
211
|
if (item) {
|
|
182
212
|
item.destroy();
|
|
183
|
-
delete
|
|
213
|
+
itemMap.delete(id);
|
|
184
214
|
}
|
|
185
215
|
});
|
|
186
|
-
const { node: nodeTheme = {}, edge: edgeTheme = {} } = theme;
|
|
216
|
+
const { node: nodeTheme = {}, edge: edgeTheme = {}, combo: comboTheme = {}, } = theme;
|
|
187
217
|
// === 3. add nodes ===
|
|
188
218
|
if (groupedChanges.NodeAdded.length) {
|
|
189
|
-
|
|
219
|
+
const newNodes = [];
|
|
220
|
+
const newCombos = [];
|
|
221
|
+
groupedChanges.NodeAdded.map((change) => change.value).forEach((model) => {
|
|
222
|
+
if (model.data._isCombo)
|
|
223
|
+
newCombos.push(model);
|
|
224
|
+
else
|
|
225
|
+
newNodes.push(model);
|
|
226
|
+
});
|
|
227
|
+
if (newNodes.length) {
|
|
228
|
+
this.renderNodes(newNodes, nodeTheme);
|
|
229
|
+
}
|
|
230
|
+
if (newCombos.length) {
|
|
231
|
+
this.renderCombos(newCombos, comboTheme, graphCore);
|
|
232
|
+
}
|
|
190
233
|
}
|
|
191
234
|
// === 4. add edges ===
|
|
192
235
|
if (groupedChanges.EdgeAdded.length) {
|
|
193
236
|
this.renderEdges(groupedChanges.EdgeAdded.map((change) => change.value), edgeTheme);
|
|
194
237
|
}
|
|
195
238
|
// === 5. update nodes's data ===
|
|
196
|
-
// merge changes for each node
|
|
239
|
+
// merge changes for each node or combo
|
|
197
240
|
if (groupedChanges.NodeDataUpdated.length) {
|
|
198
|
-
const
|
|
241
|
+
const nodeComboUpdate = {};
|
|
199
242
|
groupedChanges.NodeDataUpdated.forEach((change) => {
|
|
200
243
|
const { id, propertyName, newValue, oldValue } = change;
|
|
201
|
-
|
|
244
|
+
nodeComboUpdate[id] = nodeComboUpdate[id] || {
|
|
245
|
+
id,
|
|
246
|
+
previous: {},
|
|
247
|
+
current: {},
|
|
248
|
+
};
|
|
202
249
|
if (!propertyName) {
|
|
203
|
-
|
|
250
|
+
nodeComboUpdate[id] = {
|
|
251
|
+
id,
|
|
204
252
|
isReplace: true,
|
|
205
253
|
previous: oldValue,
|
|
206
254
|
current: newValue,
|
|
207
255
|
};
|
|
208
256
|
}
|
|
209
257
|
else {
|
|
210
|
-
|
|
211
|
-
|
|
258
|
+
nodeComboUpdate[id].previous[propertyName] = oldValue;
|
|
259
|
+
nodeComboUpdate[id].current[propertyName] = newValue;
|
|
212
260
|
}
|
|
213
261
|
});
|
|
214
262
|
const { dataTypeField: nodeDataTypeField } = nodeTheme;
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
263
|
+
const edgeIdsToUpdate = new Set();
|
|
264
|
+
const comboIdsToUpdate = new Set();
|
|
265
|
+
const updateRelates = (edgeIds) => {
|
|
266
|
+
const ids = edgeIds
|
|
267
|
+
? [...edgeIds]
|
|
268
|
+
: [...comboIdsToUpdate, ...edgeIdsToUpdate];
|
|
269
|
+
ids.forEach((nid) => {
|
|
270
|
+
const item = itemMap.get(nid);
|
|
219
271
|
if (item && !item.destroyed)
|
|
220
272
|
item.forceUpdate();
|
|
221
273
|
});
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
274
|
+
};
|
|
275
|
+
const debounceUpdateRelates = debounce(updateRelates, 16, false);
|
|
276
|
+
Object.values(nodeComboUpdate).forEach((updateObj) => {
|
|
277
|
+
var _a;
|
|
278
|
+
const { isReplace, previous, current, id } = updateObj;
|
|
279
|
+
if (!graphCore.hasNode(id))
|
|
280
|
+
return;
|
|
281
|
+
const onlyMove = action === 'updatePosition';
|
|
282
|
+
const item = itemMap.get(id);
|
|
283
|
+
if (!item || item.destroyed)
|
|
284
|
+
return;
|
|
285
|
+
const type = item.getType();
|
|
286
|
+
const innerModel = graphCore.getNode(id);
|
|
287
|
+
if (onlyMove &&
|
|
288
|
+
type === 'node' &&
|
|
289
|
+
isNaN(current.x) &&
|
|
290
|
+
isNaN(current.y)) {
|
|
291
|
+
callback(innerModel, true);
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const nodeRelatedIdsToUpdate = new Set();
|
|
295
|
+
// collapse and expand
|
|
296
|
+
if (graphCore.hasTreeStructure('combo')) {
|
|
297
|
+
if (type === 'combo' && current.collapsed !== previous.collapsed) {
|
|
298
|
+
if (current.collapsed) {
|
|
299
|
+
this.collapseCombo(graphCore, innerModel);
|
|
300
|
+
}
|
|
301
|
+
else if (current.collapsed === false) {
|
|
302
|
+
this.expandCombo(graphCore, innerModel);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const previousParentId = item.displayModel.data.parentId;
|
|
306
|
+
// update the current parent combo tree
|
|
307
|
+
// if the node has previous parent, related previous parent combo should be updated to
|
|
308
|
+
if (upsertAncestors) {
|
|
309
|
+
const begins = [innerModel];
|
|
310
|
+
if (previousParentId &&
|
|
311
|
+
previousParentId !== current.parentId &&
|
|
312
|
+
graphCore.hasNode(previousParentId)) {
|
|
313
|
+
begins.push(graphCore.getNode(previousParentId));
|
|
314
|
+
}
|
|
315
|
+
// ancestors and suceeds combos should be updated
|
|
316
|
+
traverseAncestorsAndSucceeds(this.graph, graphCore, begins, (treeItem) => {
|
|
317
|
+
if (treeItem.data._isCombo && treeItem.id !== innerModel.id)
|
|
318
|
+
comboIdsToUpdate.add(treeItem.id);
|
|
319
|
+
const relatedEdges = graphCore.getRelatedEdges(treeItem.id);
|
|
320
|
+
relatedEdges.forEach((edge) => {
|
|
321
|
+
edgeIdsToUpdate.add(edge.id);
|
|
322
|
+
nodeRelatedIdsToUpdate.add(edge.id);
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
else if (type === 'combo') {
|
|
327
|
+
// only the succeed combos should be updated
|
|
328
|
+
graphComboTreeDfs(this.graph, [innerModel], (child) => {
|
|
329
|
+
const relatedEdges = graphCore.getRelatedEdges(child.id);
|
|
330
|
+
relatedEdges.forEach((edge) => {
|
|
331
|
+
edgeIdsToUpdate.add(edge.id);
|
|
332
|
+
nodeRelatedIdsToUpdate.add(edge.id);
|
|
333
|
+
});
|
|
334
|
+
if (child.data._isCombo && child.id !== innerModel.id)
|
|
335
|
+
comboIdsToUpdate.add(child.id);
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
}
|
|
228
339
|
// update the theme if the dataType value is changed
|
|
229
340
|
let itemTheme;
|
|
230
341
|
if (nodeDataTypeField &&
|
|
231
342
|
previous[nodeDataTypeField] !== current[nodeDataTypeField]) {
|
|
232
343
|
itemTheme = getItemTheme(this.nodeDataTypeSet, nodeDataTypeField, current[nodeDataTypeField], nodeTheme);
|
|
233
344
|
}
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
catch (e) {
|
|
240
|
-
innerModel = graphCore.getNode(Number(id));
|
|
241
|
-
}
|
|
242
|
-
let relatedEdgeInnerModels;
|
|
243
|
-
try {
|
|
244
|
-
relatedEdgeInnerModels = graphCore.getRelatedEdges(id);
|
|
245
|
-
}
|
|
246
|
-
catch (e) {
|
|
247
|
-
relatedEdgeInnerModels = graphCore.getRelatedEdges(Number(id));
|
|
248
|
-
}
|
|
249
|
-
const nodeRelatedToUpdate = {};
|
|
345
|
+
const preventPolylineEdgeOverlap = ((_a = innerModel === null || innerModel === void 0 ? void 0 : innerModel.data) === null || _a === void 0 ? void 0 : _a.preventPolylineEdgeOverlap) || false;
|
|
346
|
+
const relatedEdgeInnerModels = preventPolylineEdgeOverlap
|
|
347
|
+
? this.findNearEdgesByNode(id, graphCore).concat(graphCore.getRelatedEdges(id))
|
|
348
|
+
: graphCore.getRelatedEdges(id);
|
|
250
349
|
relatedEdgeInnerModels.forEach((edge) => {
|
|
251
|
-
|
|
252
|
-
|
|
350
|
+
edgeIdsToUpdate.add(edge.id);
|
|
351
|
+
nodeRelatedIdsToUpdate.add(edge.id);
|
|
253
352
|
});
|
|
254
|
-
|
|
255
|
-
|
|
353
|
+
item.onframe = () => updateRelates(nodeRelatedIdsToUpdate);
|
|
354
|
+
let statesCache;
|
|
355
|
+
if (innerModel.data._isCombo &&
|
|
356
|
+
previous.collapsed !== current.collapsed) {
|
|
357
|
+
statesCache = this.graph.getItemAllStates(id);
|
|
358
|
+
this.graph.clearItemState(id);
|
|
359
|
+
}
|
|
360
|
+
item.update(innerModel, { previous, current }, isReplace, itemTheme, onlyMove, animate,
|
|
256
361
|
// call after updating finished
|
|
257
|
-
() => {
|
|
258
|
-
|
|
259
|
-
|
|
362
|
+
throttle((_, canceled) => {
|
|
363
|
+
var _a;
|
|
364
|
+
(_a = item.onframe) === null || _a === void 0 ? void 0 : _a.call(item, true);
|
|
365
|
+
item.onframe = undefined;
|
|
366
|
+
if (statesCache) {
|
|
367
|
+
statesCache.forEach((state) => this.graph.setItemState(id, state, true));
|
|
368
|
+
}
|
|
369
|
+
callback(innerModel, canceled);
|
|
370
|
+
}, 500, {
|
|
371
|
+
leading: false,
|
|
372
|
+
trailing: true,
|
|
373
|
+
}));
|
|
374
|
+
const parentItem = this.itemMap.get(current.parentId);
|
|
375
|
+
if (current.parentId && (parentItem === null || parentItem === void 0 ? void 0 : parentItem.model.data.collapsed)) {
|
|
376
|
+
this.graph.executeWithoutStacking(() => {
|
|
377
|
+
this.graph.hideItem(innerModel.id, false);
|
|
378
|
+
});
|
|
379
|
+
}
|
|
260
380
|
});
|
|
261
|
-
|
|
381
|
+
debounceUpdateRelates();
|
|
262
382
|
}
|
|
263
383
|
// === 6. update edges' data ===
|
|
264
384
|
if (groupedChanges.EdgeDataUpdated.length) {
|
|
265
385
|
const edgeUpdate = {};
|
|
266
386
|
groupedChanges.EdgeDataUpdated.forEach((change) => {
|
|
267
387
|
const { id, propertyName, newValue, oldValue } = change;
|
|
268
|
-
edgeUpdate[id] = edgeUpdate[id] || { previous: {}, current: {} };
|
|
388
|
+
edgeUpdate[id] = edgeUpdate[id] || { id, previous: {}, current: {} };
|
|
269
389
|
if (!propertyName) {
|
|
270
390
|
edgeUpdate[id] = {
|
|
391
|
+
id,
|
|
271
392
|
isReplace: true,
|
|
272
393
|
previous: oldValue,
|
|
273
394
|
current: newValue,
|
|
@@ -278,17 +399,19 @@ export class ItemController {
|
|
|
278
399
|
edgeUpdate[id].current[propertyName] = newValue;
|
|
279
400
|
}
|
|
280
401
|
});
|
|
281
|
-
const { dataTypeField: edgeDataTypeField } = edgeTheme;
|
|
282
|
-
Object.
|
|
283
|
-
const { isReplace, current, previous } =
|
|
402
|
+
const { dataTypeField: edgeDataTypeField = '' } = edgeTheme;
|
|
403
|
+
Object.values(edgeUpdate).forEach((updateObj) => {
|
|
404
|
+
const { isReplace, current, previous, id } = updateObj;
|
|
284
405
|
// update the theme if the dataType value is changed
|
|
285
406
|
let itemTheme;
|
|
286
407
|
if (previous[edgeDataTypeField] !== current[edgeDataTypeField]) {
|
|
287
408
|
itemTheme = getItemTheme(this.edgeDataTypeSet, edgeDataTypeField, current[edgeDataTypeField], edgeTheme);
|
|
288
409
|
}
|
|
289
|
-
const item = itemMap
|
|
410
|
+
const item = itemMap.get(id);
|
|
290
411
|
const innerModel = graphCore.getEdge(id);
|
|
291
|
-
item
|
|
412
|
+
if (!item || item.destroyed)
|
|
413
|
+
return;
|
|
414
|
+
item.update(innerModel, { current, previous }, isReplace, itemTheme, undefined, animate, (_, canceled) => callback(innerModel, canceled));
|
|
292
415
|
});
|
|
293
416
|
}
|
|
294
417
|
// === 7. update edges' source target ===
|
|
@@ -297,16 +420,35 @@ export class ItemController {
|
|
|
297
420
|
groupedChanges.EdgeUpdated.forEach((change) => {
|
|
298
421
|
// propertyName is 'source' or 'target'
|
|
299
422
|
const { id, propertyName, newValue } = change;
|
|
300
|
-
edgeUpdate[id] = edgeUpdate[id] || {};
|
|
423
|
+
edgeUpdate[id] = edgeUpdate[id] || { id };
|
|
301
424
|
edgeUpdate[id][propertyName] = newValue;
|
|
302
425
|
});
|
|
303
|
-
Object.
|
|
304
|
-
const { source, target } =
|
|
305
|
-
const item = itemMap
|
|
426
|
+
Object.values(edgeUpdate).forEach((updateObj) => {
|
|
427
|
+
const { source, target, id } = updateObj;
|
|
428
|
+
const item = itemMap.get(id);
|
|
306
429
|
if (source !== undefined)
|
|
307
|
-
item.updateEnd('source', this.itemMap
|
|
430
|
+
item.updateEnd('source', this.itemMap.get(source));
|
|
308
431
|
if (target !== undefined)
|
|
309
|
-
item.updateEnd('target', this.itemMap
|
|
432
|
+
item.updateEnd('target', this.itemMap.get(target));
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
// === 8. combo tree structure change, resort the shapes ===
|
|
436
|
+
if (groupedChanges.ComboStructureChanged.length) {
|
|
437
|
+
this.sortByComboTree(graphCore);
|
|
438
|
+
}
|
|
439
|
+
// === 9. tree data structure change, hide the new node and edge while one of the ancestor is collapsed ===
|
|
440
|
+
if (groupedChanges.TreeStructureChanged.length) {
|
|
441
|
+
groupedChanges.TreeStructureChanged.forEach((change) => {
|
|
442
|
+
const { nodeId } = change;
|
|
443
|
+
// hide it when an ancestor is collapsed
|
|
444
|
+
let parent = graphCore.getParent(nodeId, 'tree');
|
|
445
|
+
while (parent) {
|
|
446
|
+
if (parent.data.collapsed) {
|
|
447
|
+
this.graph.hideItem(nodeId, true);
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
parent = graphCore.getParent(parent.id, 'tree');
|
|
451
|
+
}
|
|
310
452
|
});
|
|
311
453
|
}
|
|
312
454
|
}
|
|
@@ -322,7 +464,7 @@ export class ItemController {
|
|
|
322
464
|
onItemStateChange(param) {
|
|
323
465
|
const { ids, states, value } = param;
|
|
324
466
|
ids.forEach((id) => {
|
|
325
|
-
const item = this.itemMap
|
|
467
|
+
const item = this.itemMap.get(id);
|
|
326
468
|
if (!item) {
|
|
327
469
|
console.warn(`Fail to set state for item ${id}, which is not exist.`);
|
|
328
470
|
return;
|
|
@@ -337,56 +479,122 @@ export class ItemController {
|
|
|
337
479
|
});
|
|
338
480
|
}
|
|
339
481
|
onItemVisibilityChange(param) {
|
|
340
|
-
const { ids, value, animate = true } = param;
|
|
482
|
+
const { ids, value, graphCore, animate = true } = param;
|
|
341
483
|
ids.forEach((id) => {
|
|
342
|
-
const item = this.itemMap
|
|
484
|
+
const item = this.itemMap.get(id);
|
|
343
485
|
if (!item) {
|
|
344
486
|
console.warn(`Fail to set visibility for item ${id}, which is not exist.`);
|
|
345
487
|
return;
|
|
346
488
|
}
|
|
489
|
+
const type = item.getType();
|
|
347
490
|
if (value) {
|
|
348
|
-
|
|
491
|
+
if (type === 'edge') {
|
|
492
|
+
item.show(animate);
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
if (graphCore.hasTreeStructure('combo')) {
|
|
496
|
+
let anccestorCollapsed = false;
|
|
497
|
+
traverseAncestors(graphCore, [item.model], (model) => {
|
|
498
|
+
if (model.data.collapsed)
|
|
499
|
+
anccestorCollapsed = true;
|
|
500
|
+
return anccestorCollapsed;
|
|
501
|
+
});
|
|
502
|
+
if (anccestorCollapsed)
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
const relatedEdges = graphCore.getRelatedEdges(id);
|
|
506
|
+
item.show(animate);
|
|
507
|
+
relatedEdges.forEach(({ id: edgeId, source, target }) => {
|
|
508
|
+
var _a;
|
|
509
|
+
if (this.getItemVisible(source) && this.getItemVisible(target))
|
|
510
|
+
(_a = this.itemMap.get(edgeId)) === null || _a === void 0 ? void 0 : _a.show(animate);
|
|
511
|
+
});
|
|
512
|
+
}
|
|
349
513
|
}
|
|
350
514
|
else {
|
|
351
515
|
item.hide(animate);
|
|
516
|
+
if (type !== 'edge') {
|
|
517
|
+
const relatedEdges = graphCore.getRelatedEdges(id);
|
|
518
|
+
relatedEdges.forEach(({ id: edgeId }) => {
|
|
519
|
+
var _a;
|
|
520
|
+
(_a = this.itemMap.get(edgeId)) === null || _a === void 0 ? void 0 : _a.hide(animate);
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
onItemZIndexChange(params) {
|
|
527
|
+
const { ids = [], action, graphCore } = params;
|
|
528
|
+
ids.forEach((id) => {
|
|
529
|
+
const item = this.itemMap.get(id);
|
|
530
|
+
if (!item)
|
|
531
|
+
return;
|
|
532
|
+
if (action === 'front') {
|
|
533
|
+
item.toFront();
|
|
534
|
+
if (graphCore.hasTreeStructure('combo')) {
|
|
535
|
+
graphComboTreeDfs(this.graph, [item.model], (model) => {
|
|
536
|
+
if (model.data._isCombo) {
|
|
537
|
+
const subCombo = this.itemMap.get(model.id);
|
|
538
|
+
subCombo && subCombo.toFront();
|
|
539
|
+
}
|
|
540
|
+
}, 'TB');
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
item.toBack();
|
|
545
|
+
if (graphCore.hasTreeStructure('combo')) {
|
|
546
|
+
traverseGraphAncestors(this.graph, [item.model], (model) => {
|
|
547
|
+
var _a;
|
|
548
|
+
(_a = this.itemMap.get(model.id)) === null || _a === void 0 ? void 0 : _a.toBack();
|
|
549
|
+
});
|
|
550
|
+
}
|
|
352
551
|
}
|
|
353
552
|
});
|
|
354
553
|
}
|
|
355
554
|
onTransientUpdate(param) {
|
|
356
555
|
const { transientObjectMap } = this;
|
|
357
|
-
const { type, id, config = {}, canvas } = param;
|
|
358
|
-
const { style = {}, data = {}, capture, action, onlyDrawKeyShape, } = config;
|
|
556
|
+
const { type, id, config = {}, canvas, graphCore } = param;
|
|
557
|
+
const { style = {}, data = {}, capture, action, onlyDrawKeyShape, upsertAncestors, } = config;
|
|
359
558
|
const isItemType = type === 'node' || type === 'edge' || type === 'combo';
|
|
360
559
|
// Removing
|
|
361
560
|
if (action === 'remove') {
|
|
362
561
|
if (isItemType) {
|
|
363
|
-
const transientItem = this.transientItemMap
|
|
562
|
+
const transientItem = this.transientItemMap.get(id);
|
|
563
|
+
if (type === 'combo') {
|
|
564
|
+
// remove children from bottom to top
|
|
565
|
+
graphCoreTreeDfs(graphCore, [graphCore.getNode(id)], (child) => {
|
|
566
|
+
const transientChild = this.transientItemMap.get(child.id);
|
|
567
|
+
if (transientChild && !transientChild.destroyed) {
|
|
568
|
+
transientChild.destroy();
|
|
569
|
+
}
|
|
570
|
+
this.transientItemMap.delete(child.id);
|
|
571
|
+
}, 'BT');
|
|
572
|
+
}
|
|
364
573
|
if (transientItem && !transientItem.destroyed) {
|
|
365
574
|
transientItem.destroy();
|
|
366
575
|
}
|
|
367
|
-
|
|
576
|
+
this.transientItemMap.delete(id);
|
|
368
577
|
return;
|
|
369
578
|
}
|
|
370
579
|
else {
|
|
371
|
-
const preObj = transientObjectMap
|
|
372
|
-
if (preObj && !preObj.destroyed)
|
|
580
|
+
const preObj = transientObjectMap.get(id);
|
|
581
|
+
if (preObj && !preObj.destroyed)
|
|
373
582
|
preObj.destroy();
|
|
374
|
-
|
|
375
|
-
delete transientObjectMap[id];
|
|
583
|
+
transientObjectMap.delete(id);
|
|
376
584
|
return;
|
|
377
585
|
}
|
|
378
586
|
}
|
|
379
587
|
// Adding / Updating
|
|
380
588
|
if (isItemType) {
|
|
381
|
-
const item = this.itemMap
|
|
589
|
+
const item = this.itemMap.get(id);
|
|
382
590
|
if (!item) {
|
|
383
591
|
console.warn(`Fail to draw transient item of ${id}, which is not exist.`);
|
|
384
592
|
return;
|
|
385
593
|
}
|
|
386
|
-
const transientItem = upsertTransientItem(item, this.transientNodeGroup, this.transientEdgeGroup, this.transientItemMap, onlyDrawKeyShape);
|
|
594
|
+
const transientItem = upsertTransientItem(item, this.transientNodeGroup, this.transientEdgeGroup, this.transientComboGroup, this.transientItemMap, this.itemMap, graphCore, onlyDrawKeyShape, upsertAncestors);
|
|
387
595
|
if (onlyDrawKeyShape) {
|
|
388
596
|
// only update node positions to cloned node container(group)
|
|
389
|
-
if (type === 'node' &&
|
|
597
|
+
if ((type === 'node' || type === 'combo') &&
|
|
390
598
|
data.hasOwnProperty('x') &&
|
|
391
599
|
data.hasOwnProperty('y')) {
|
|
392
600
|
const { x, y } = data;
|
|
@@ -396,16 +604,54 @@ export class ItemController {
|
|
|
396
604
|
}
|
|
397
605
|
else {
|
|
398
606
|
const transItem = transientItem;
|
|
607
|
+
const positionChanged = data.hasOwnProperty('x') && data.hasOwnProperty('y');
|
|
608
|
+
if (type === 'combo' && positionChanged) {
|
|
609
|
+
const { x, y } = data;
|
|
610
|
+
const { x: ox = x, y: oy = y } = transItem.displayModel.data;
|
|
611
|
+
const dx = x - ox;
|
|
612
|
+
const dy = y - oy;
|
|
613
|
+
// move combo = move children nodes from bottom to top
|
|
614
|
+
graphCoreTreeDfs(graphCore, [transItem.model], (node) => {
|
|
615
|
+
const transChild = this.transientItemMap.get(node.id);
|
|
616
|
+
if (!transChild)
|
|
617
|
+
return;
|
|
618
|
+
const { x: childX = 0, y: childY = 0 } = transChild.model
|
|
619
|
+
.data;
|
|
620
|
+
transChild === null || transChild === void 0 ? void 0 : transChild.update(Object.assign(Object.assign({}, transChild.model), { data: Object.assign(Object.assign({}, transChild.model.data), { x: childX + dx, y: childY + dy }) }));
|
|
621
|
+
}, 'BT');
|
|
622
|
+
}
|
|
623
|
+
if (graphCore.hasTreeStructure('combo') &&
|
|
624
|
+
type !== 'edge' &&
|
|
625
|
+
positionChanged) {
|
|
626
|
+
// force update ancestor combos in the sametime
|
|
627
|
+
let currentAncestor = graphCore.getParent(transItem.model.id, 'combo');
|
|
628
|
+
while (currentAncestor) {
|
|
629
|
+
const ancestorItem = this.transientItemMap.get(currentAncestor.id);
|
|
630
|
+
if (ancestorItem)
|
|
631
|
+
ancestorItem.forceUpdate();
|
|
632
|
+
currentAncestor = graphCore.getParent(currentAncestor.id, 'combo');
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
// Update the target combo's posiiton and other props
|
|
399
636
|
transItem.update(Object.assign(Object.assign({}, transItem.model), { data: Object.assign(Object.assign({}, transItem.model.data), data) }));
|
|
400
637
|
}
|
|
401
638
|
return;
|
|
402
639
|
}
|
|
403
|
-
const
|
|
640
|
+
const idStr = String(id);
|
|
641
|
+
const shape = upsertShape(type, idStr, style, Object.fromEntries(transientObjectMap));
|
|
642
|
+
transientObjectMap.set(idStr, shape);
|
|
404
643
|
shape.style.pointerEvents = capture ? 'auto' : 'none';
|
|
405
644
|
canvas.getRoot().appendChild(shape);
|
|
406
645
|
}
|
|
407
646
|
getTransient(id) {
|
|
408
|
-
return this.transientObjectMap
|
|
647
|
+
return this.transientObjectMap.get(id);
|
|
648
|
+
}
|
|
649
|
+
getTransientItem(id) {
|
|
650
|
+
return this.transientItemMap[id];
|
|
651
|
+
}
|
|
652
|
+
findDisplayModel(id) {
|
|
653
|
+
var _a;
|
|
654
|
+
return (_a = this.itemMap.get(id)) === null || _a === void 0 ? void 0 : _a.displayModel;
|
|
409
655
|
}
|
|
410
656
|
/**
|
|
411
657
|
* Create nodes with inner data to canvas.
|
|
@@ -413,7 +659,7 @@ export class ItemController {
|
|
|
413
659
|
*/
|
|
414
660
|
renderNodes(models, nodeTheme = {}) {
|
|
415
661
|
const { nodeExtensions, nodeGroup, nodeDataTypeSet, graph } = this;
|
|
416
|
-
const { dataTypeField } = nodeTheme;
|
|
662
|
+
const { dataTypeField = '' } = nodeTheme;
|
|
417
663
|
const zoom = graph.getZoom();
|
|
418
664
|
models.forEach((node) => {
|
|
419
665
|
// get the base styles from theme
|
|
@@ -421,7 +667,7 @@ export class ItemController {
|
|
|
421
667
|
if (dataTypeField)
|
|
422
668
|
dataType = node.data[dataTypeField];
|
|
423
669
|
const itemTheme = getItemTheme(nodeDataTypeSet, dataTypeField, dataType, nodeTheme);
|
|
424
|
-
this.itemMap
|
|
670
|
+
this.itemMap.set(node.id, new Node({
|
|
425
671
|
model: node,
|
|
426
672
|
renderExtensions: nodeExtensions,
|
|
427
673
|
containerGroup: nodeGroup,
|
|
@@ -433,7 +679,50 @@ export class ItemController {
|
|
|
433
679
|
? // TODO: G type
|
|
434
680
|
graph.canvas.context.deviceRendererPlugin.getDevice()
|
|
435
681
|
: undefined,
|
|
682
|
+
}));
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
renderCombos(models, comboTheme = {}, graphCore) {
|
|
686
|
+
const { comboExtensions, comboGroup, comboDataTypeSet, graph, itemMap } = this;
|
|
687
|
+
const { dataTypeField = '' } = comboTheme;
|
|
688
|
+
const zoom = graph.getZoom();
|
|
689
|
+
models.forEach((combo) => {
|
|
690
|
+
// get the base styles from theme
|
|
691
|
+
let dataType;
|
|
692
|
+
if (dataTypeField)
|
|
693
|
+
dataType = combo.data[dataTypeField];
|
|
694
|
+
const itemTheme = getItemTheme(comboDataTypeSet, dataTypeField, dataType, comboTheme);
|
|
695
|
+
const getCombinedBounds = () => {
|
|
696
|
+
// calculate the position of the combo according to its children
|
|
697
|
+
return getCombinedBoundsByData(graph, graphCore
|
|
698
|
+
.getChildren(combo.id, 'combo')
|
|
699
|
+
.map(({ id }) => itemMap.get(id))
|
|
700
|
+
.filter(Boolean));
|
|
701
|
+
};
|
|
702
|
+
const getChildren = () => {
|
|
703
|
+
const childModels = graphCore.getChildren(combo.id, 'combo');
|
|
704
|
+
return childModels.map(({ id }) => itemMap.get(id));
|
|
705
|
+
};
|
|
706
|
+
const comboItem = new Combo({
|
|
707
|
+
model: combo,
|
|
708
|
+
getCombinedBounds,
|
|
709
|
+
getChildren,
|
|
710
|
+
renderExtensions: comboExtensions,
|
|
711
|
+
containerGroup: comboGroup,
|
|
712
|
+
mapper: this.comboMapper,
|
|
713
|
+
stateMapper: this.comboStateMapper,
|
|
714
|
+
zoom,
|
|
715
|
+
theme: itemTheme,
|
|
716
|
+
device: graph.rendererType === 'webgl-3d'
|
|
717
|
+
? graph.canvas.context.deviceRendererPlugin.getDevice()
|
|
718
|
+
: undefined,
|
|
436
719
|
});
|
|
720
|
+
// ------- for integration tests -------
|
|
721
|
+
comboItem.getCombinedBounds = getCombinedBounds;
|
|
722
|
+
comboItem.getChildren = getChildren;
|
|
723
|
+
comboItem.type = 'combo';
|
|
724
|
+
// ------- for integration tests end-------
|
|
725
|
+
itemMap.set(combo.id, comboItem);
|
|
437
726
|
});
|
|
438
727
|
}
|
|
439
728
|
/**
|
|
@@ -442,24 +731,27 @@ export class ItemController {
|
|
|
442
731
|
*/
|
|
443
732
|
renderEdges(models, edgeTheme = {}) {
|
|
444
733
|
const { edgeExtensions, edgeGroup, itemMap, edgeDataTypeSet, graph } = this;
|
|
445
|
-
const { dataTypeField } = edgeTheme;
|
|
734
|
+
const { dataTypeField = '' } = edgeTheme;
|
|
446
735
|
const zoom = graph.getZoom();
|
|
736
|
+
const nodeMap = filterItemMapByType(itemMap, 'node');
|
|
447
737
|
models.forEach((edge) => {
|
|
448
738
|
const { source, target, id } = edge;
|
|
449
|
-
const sourceItem = itemMap
|
|
450
|
-
const targetItem = itemMap
|
|
739
|
+
const sourceItem = itemMap.get(source);
|
|
740
|
+
const targetItem = itemMap.get(target);
|
|
451
741
|
if (!sourceItem) {
|
|
452
742
|
console.warn(`The source node ${source} is not exist in the graph for edge ${id}, please add the node first`);
|
|
743
|
+
return;
|
|
453
744
|
}
|
|
454
745
|
if (!targetItem) {
|
|
455
746
|
console.warn(`The source node ${source} is not exist in the graph for edge ${id}, please add the node first`);
|
|
747
|
+
return;
|
|
456
748
|
}
|
|
457
749
|
// get the base styles from theme
|
|
458
750
|
let dataType;
|
|
459
751
|
if (dataTypeField)
|
|
460
752
|
dataType = edge.data[dataTypeField];
|
|
461
753
|
const itemTheme = getItemTheme(edgeDataTypeSet, dataTypeField, dataType, edgeTheme);
|
|
462
|
-
itemMap
|
|
754
|
+
itemMap.set(id, new Edge({
|
|
463
755
|
model: edge,
|
|
464
756
|
renderExtensions: edgeExtensions,
|
|
465
757
|
containerGroup: edgeGroup,
|
|
@@ -467,9 +759,10 @@ export class ItemController {
|
|
|
467
759
|
stateMapper: this.edgeStateMapper,
|
|
468
760
|
sourceItem,
|
|
469
761
|
targetItem,
|
|
762
|
+
nodeMap,
|
|
470
763
|
zoom,
|
|
471
764
|
theme: itemTheme,
|
|
472
|
-
});
|
|
765
|
+
}));
|
|
473
766
|
});
|
|
474
767
|
}
|
|
475
768
|
/**
|
|
@@ -481,7 +774,7 @@ export class ItemController {
|
|
|
481
774
|
*/
|
|
482
775
|
findIdByState(itemType, state, value = true) {
|
|
483
776
|
const ids = [];
|
|
484
|
-
|
|
777
|
+
this.itemMap.forEach((item) => {
|
|
485
778
|
if (item.getType() !== itemType)
|
|
486
779
|
return;
|
|
487
780
|
if (item.hasState(state) === value)
|
|
@@ -496,35 +789,290 @@ export class ItemController {
|
|
|
496
789
|
* @returns {boolean | string} the state value
|
|
497
790
|
*/
|
|
498
791
|
getItemState(id, state) {
|
|
499
|
-
const item = this.itemMap
|
|
792
|
+
const item = this.itemMap.get(id);
|
|
500
793
|
if (!item) {
|
|
501
794
|
console.warn(`Fail to get item state, the item with id ${id} does not exist.`);
|
|
502
795
|
return false;
|
|
503
796
|
}
|
|
504
797
|
return item.hasState(state);
|
|
505
798
|
}
|
|
799
|
+
getItemAllStates(id) {
|
|
800
|
+
const item = this.itemMap.get(id);
|
|
801
|
+
if (!item) {
|
|
802
|
+
console.warn(`Fail to get item state, the item with id ${id} does not exist.`);
|
|
803
|
+
return [];
|
|
804
|
+
}
|
|
805
|
+
return item
|
|
806
|
+
.getStates()
|
|
807
|
+
.filter(({ value }) => value)
|
|
808
|
+
.map(({ name }) => name);
|
|
809
|
+
}
|
|
506
810
|
getItemById(id) {
|
|
507
|
-
return this.itemMap
|
|
811
|
+
return this.itemMap.get(id);
|
|
508
812
|
}
|
|
509
|
-
getItemBBox(id, isKeyShape = false) {
|
|
510
|
-
const item =
|
|
813
|
+
getItemBBox(id, isKeyShape = false, isTransient = false) {
|
|
814
|
+
const item = isTransient
|
|
815
|
+
? this.transientItemMap.get(id)
|
|
816
|
+
: this.itemMap.get(id);
|
|
511
817
|
if (!item) {
|
|
512
818
|
console.warn(`Fail to get item bbox, the item with id ${id} does not exist.`);
|
|
513
819
|
return false;
|
|
514
820
|
}
|
|
821
|
+
if (item instanceof Group)
|
|
822
|
+
return item.getRenderBounds();
|
|
515
823
|
return isKeyShape ? item.getKeyBBox() : item.getBBox();
|
|
516
824
|
}
|
|
517
825
|
getItemVisible(id) {
|
|
518
|
-
const item = this.itemMap
|
|
826
|
+
const item = this.itemMap.get(id);
|
|
519
827
|
if (!item) {
|
|
520
828
|
console.warn(`Fail to get item visible, the item with id ${id} does not exist.`);
|
|
521
829
|
return false;
|
|
522
830
|
}
|
|
523
831
|
return item.isVisible();
|
|
524
832
|
}
|
|
833
|
+
/**
|
|
834
|
+
* Identify edges that are intersected by a particular node
|
|
835
|
+
* @param nodeId node id
|
|
836
|
+
* @param graphCore
|
|
837
|
+
* @returns
|
|
838
|
+
*/
|
|
839
|
+
findNearEdgesByNode(nodeId, graphCore) {
|
|
840
|
+
var _a;
|
|
841
|
+
const edges = graphCore.getAllEdges();
|
|
842
|
+
const canvasBBox = this.graph.getRenderBBox(undefined);
|
|
843
|
+
const quadTree = new QuadTree(canvasBBox, 4);
|
|
844
|
+
each(edges, (edge) => {
|
|
845
|
+
const { data: { x: sourceX, y: sourceY }, } = graphCore.getNode(edge.source);
|
|
846
|
+
const { data: { x: targetX, y: targetY }, } = graphCore.getNode(edge.target);
|
|
847
|
+
quadTree.insert({
|
|
848
|
+
id: edge.id,
|
|
849
|
+
p1: { x: sourceX, y: sourceY },
|
|
850
|
+
p2: { x: targetX, y: targetY },
|
|
851
|
+
bbox: this.graph.getRenderBBox(edge.id),
|
|
852
|
+
});
|
|
853
|
+
});
|
|
854
|
+
// update node position
|
|
855
|
+
const node = (this.getTransientItem(nodeId) ||
|
|
856
|
+
this.getItemById(nodeId));
|
|
857
|
+
const nodeBBox = this.graph.getRenderBBox(nodeId);
|
|
858
|
+
const nodeData = (_a = node === null || node === void 0 ? void 0 : node.model) === null || _a === void 0 ? void 0 : _a.data;
|
|
859
|
+
if (nodeData) {
|
|
860
|
+
nodeBBox.update([nodeData.x, nodeData.y, 0], nodeBBox.halfExtents);
|
|
861
|
+
}
|
|
862
|
+
const checker = new EdgeCollisionChecker(quadTree);
|
|
863
|
+
const collisions = checker.getCollidingEdges(nodeBBox);
|
|
864
|
+
const collidingEdges = map(collisions, (collision) => graphCore.getEdge(collision.id));
|
|
865
|
+
return collidingEdges;
|
|
866
|
+
}
|
|
867
|
+
sortByComboTree(graphCore) {
|
|
868
|
+
if (!graphCore.hasTreeStructure('combo'))
|
|
869
|
+
return;
|
|
870
|
+
graphCoreTreeDfs(graphCore, graphCore.getRoots('combo'), (node) => {
|
|
871
|
+
const nodeItem = this.itemMap.get(node.id);
|
|
872
|
+
if (node.data._isCombo && nodeItem) {
|
|
873
|
+
nodeItem.toFront();
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
collapseCombo(graphCore, comboModel) {
|
|
878
|
+
let relatedEdges = [];
|
|
879
|
+
const succeedIds = [];
|
|
880
|
+
// find the succeeds in collapsed
|
|
881
|
+
graphComboTreeDfs(this.graph, [comboModel], (child) => {
|
|
882
|
+
if (child.id !== comboModel.id) {
|
|
883
|
+
this.graph.executeWithoutStacking(() => {
|
|
884
|
+
this.graph.hideItem(child.id, false);
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
relatedEdges = relatedEdges.concat(graphCore.getRelatedEdges(child.id));
|
|
888
|
+
succeedIds.push(child.id);
|
|
889
|
+
});
|
|
890
|
+
const pairs = [];
|
|
891
|
+
uniq(relatedEdges).forEach((edge) => {
|
|
892
|
+
const { id, source: s, target: t } = edge;
|
|
893
|
+
if (!this.graph.getItemVisible(id))
|
|
894
|
+
return;
|
|
895
|
+
const sourceIsSucceed = succeedIds.includes(s);
|
|
896
|
+
const targetIsSucceed = succeedIds.includes(t);
|
|
897
|
+
// do not add virtual edge if the source and target are both the succeed
|
|
898
|
+
if (sourceIsSucceed && targetIsSucceed)
|
|
899
|
+
return;
|
|
900
|
+
const source = sourceIsSucceed ? comboModel.id : s;
|
|
901
|
+
const target = targetIsSucceed ? comboModel.id : t;
|
|
902
|
+
pairs.push({ source, target });
|
|
903
|
+
});
|
|
904
|
+
// each item in groupedEdges is a virtual edge
|
|
905
|
+
this.graph.executeWithoutStacking(() => {
|
|
906
|
+
this.graph.addData('edge', groupVirtualEdges(pairs));
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
expandCombo(graphCore, comboModel) {
|
|
910
|
+
let isAncestorCollapsed = false;
|
|
911
|
+
traverseAncestors(graphCore, [comboModel], (anccestor) => {
|
|
912
|
+
if (anccestor.data.collapsed) {
|
|
913
|
+
isAncestorCollapsed = true;
|
|
914
|
+
return true;
|
|
915
|
+
}
|
|
916
|
+
return false;
|
|
917
|
+
});
|
|
918
|
+
if (isAncestorCollapsed)
|
|
919
|
+
return;
|
|
920
|
+
const relatedVirtualEdgeIds = [];
|
|
921
|
+
let edgesToShow = [];
|
|
922
|
+
const nodesToShow = [];
|
|
923
|
+
// show the succeeds and remove the related virtual edges, including the succeeds' related edges
|
|
924
|
+
graphComboTreeDfs(this.graph, [comboModel], (child) => {
|
|
925
|
+
graphCore.getRelatedEdges(child.id).forEach((edge) => {
|
|
926
|
+
if (edge.data._virtual)
|
|
927
|
+
relatedVirtualEdgeIds.push(edge.id);
|
|
928
|
+
else
|
|
929
|
+
edgesToShow.push(edge.id);
|
|
930
|
+
});
|
|
931
|
+
if (child.id !== comboModel.id) {
|
|
932
|
+
if (!graphCore.getNode(child.data.parentId).data.collapsed) {
|
|
933
|
+
nodesToShow.push(child.id);
|
|
934
|
+
}
|
|
935
|
+
// re-add collapsed succeeds' virtual edges by calling collapseCombo
|
|
936
|
+
if (child.data._isCombo && child.data.collapsed) {
|
|
937
|
+
this.collapseCombo(graphCore, child);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
const virtualPairs = [];
|
|
942
|
+
const visibleAncestorMap = new Map();
|
|
943
|
+
edgesToShow = uniq(edgesToShow.filter((eid) => {
|
|
944
|
+
const { source, target } = graphCore.getEdge(eid);
|
|
945
|
+
const ends = { source, target };
|
|
946
|
+
const endsVisible = {
|
|
947
|
+
source: this.graph.getItemVisible(source) || nodesToShow.includes(source),
|
|
948
|
+
target: this.graph.getItemVisible(target) || nodesToShow.includes(target),
|
|
949
|
+
};
|
|
950
|
+
// actual edges to show
|
|
951
|
+
if (endsVisible.source && endsVisible.target)
|
|
952
|
+
return true;
|
|
953
|
+
// add virtual edges by finding the visible ancestor
|
|
954
|
+
const virtualEnds = { source: undefined, target: undefined };
|
|
955
|
+
Object.keys(virtualEnds).forEach((end) => {
|
|
956
|
+
if (!endsVisible[end]) {
|
|
957
|
+
if (!visibleAncestorMap.get(ends[end])) {
|
|
958
|
+
traverseAncestors(graphCore, [graphCore.getNode(ends[end])], (ancestor) => {
|
|
959
|
+
if (visibleAncestorMap.has(ends[end]))
|
|
960
|
+
return;
|
|
961
|
+
if (this.graph.getItemVisible(ancestor.id) ||
|
|
962
|
+
nodesToShow.includes(ancestor.id))
|
|
963
|
+
visibleAncestorMap.set(ends[end], ancestor.id);
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
virtualEnds[end] = visibleAncestorMap.get(ends[end]);
|
|
967
|
+
}
|
|
968
|
+
else {
|
|
969
|
+
virtualEnds[end] = ends[end];
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
if (virtualEnds.source !== undefined &&
|
|
973
|
+
virtualEnds.target !== undefined) {
|
|
974
|
+
virtualPairs.push(virtualEnds);
|
|
975
|
+
}
|
|
976
|
+
return false;
|
|
977
|
+
}));
|
|
978
|
+
// remove related virtual edges
|
|
979
|
+
this.graph.executeWithoutStacking(() => {
|
|
980
|
+
this.graph.removeData('edge', uniq(relatedVirtualEdgeIds));
|
|
981
|
+
this.graph.showItem(edgesToShow.concat(nodesToShow));
|
|
982
|
+
// add virtual edges by grouping visible ancestor edges
|
|
983
|
+
this.graph.addData('edge', groupVirtualEdges(virtualPairs));
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Collapse or expand a sub tree according to action
|
|
988
|
+
* @param params
|
|
989
|
+
*/
|
|
990
|
+
onTreeCollapseExpand(params) {
|
|
991
|
+
const { ids, animate, action, graphCore } = params;
|
|
992
|
+
const rootModels = ids.map((id) => graphCore.getNode(id));
|
|
993
|
+
switch (action) {
|
|
994
|
+
case 'collapse':
|
|
995
|
+
this.collapseSubTree(rootModels, graphCore, animate);
|
|
996
|
+
break;
|
|
997
|
+
case 'expand':
|
|
998
|
+
default:
|
|
999
|
+
this.expandSubTree(rootModels, graphCore, animate);
|
|
1000
|
+
break;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* Collapse sub tree(s).
|
|
1005
|
+
* @param rootModels The root node models of sub trees
|
|
1006
|
+
* @param graphCore
|
|
1007
|
+
* @param animate Whether enable animations for expanding, true by default
|
|
1008
|
+
* @returns
|
|
1009
|
+
*/
|
|
1010
|
+
collapseSubTree(rootModels, graphCore, animate = true) {
|
|
1011
|
+
let positions = [];
|
|
1012
|
+
rootModels.forEach((root) => {
|
|
1013
|
+
let shouldCollapse = true;
|
|
1014
|
+
const nodes = [];
|
|
1015
|
+
graphCoreTreeDfs(graphCore, [root], (node) => {
|
|
1016
|
+
var _a;
|
|
1017
|
+
if (node.id === root.id)
|
|
1018
|
+
return;
|
|
1019
|
+
const neighbors = graphCore.getNeighbors(node.id);
|
|
1020
|
+
if (!((_a = graphCore.getChildren(node.id, 'tree')) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
1021
|
+
neighbors.length > 1) {
|
|
1022
|
+
shouldCollapse = false;
|
|
1023
|
+
}
|
|
1024
|
+
nodes.push(node);
|
|
1025
|
+
}, 'TB', 'tree', {
|
|
1026
|
+
stopAllFn: () => !shouldCollapse,
|
|
1027
|
+
});
|
|
1028
|
+
if (shouldCollapse) {
|
|
1029
|
+
positions = positions.concat(nodes.map((node) => ({
|
|
1030
|
+
id: node.id,
|
|
1031
|
+
data: { x: root.data.x, y: root.data.y },
|
|
1032
|
+
})));
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
1035
|
+
if (!positions.length)
|
|
1036
|
+
return;
|
|
1037
|
+
this.graph.updateNodePosition(positions, undefined, !animate, (model, canceled) => {
|
|
1038
|
+
this.graph.hideItem(model.id, canceled);
|
|
1039
|
+
}, undefined);
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* Expand sub tree(s).
|
|
1043
|
+
* @param rootModels The root node models of sub trees.
|
|
1044
|
+
* @param graphCore
|
|
1045
|
+
* @param animate Whether enable animations for expanding, true by default.
|
|
1046
|
+
* @returns
|
|
1047
|
+
*/
|
|
1048
|
+
expandSubTree(rootModels, graphCore, animate = true) {
|
|
1049
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1050
|
+
let allNodeIds = [];
|
|
1051
|
+
let allEdgeIds = [];
|
|
1052
|
+
rootModels.forEach((root) => {
|
|
1053
|
+
const nodeIds = [];
|
|
1054
|
+
graphCoreTreeDfs(graphCore, [root], (node) => nodeIds.push(node.id), 'TB', 'tree', {
|
|
1055
|
+
stopBranchFn: (node) => {
|
|
1056
|
+
const shouldStop = node.id !== root.id && node.data.collapsed;
|
|
1057
|
+
if (shouldStop)
|
|
1058
|
+
nodeIds.push(node.id);
|
|
1059
|
+
return shouldStop;
|
|
1060
|
+
},
|
|
1061
|
+
});
|
|
1062
|
+
allEdgeIds = allEdgeIds.concat(graphCore
|
|
1063
|
+
.getAllEdges()
|
|
1064
|
+
.filter((edge) => nodeIds.includes(edge.source) && nodeIds.includes(edge.target))
|
|
1065
|
+
.map((edge) => edge.id));
|
|
1066
|
+
allNodeIds = allNodeIds.concat(nodeIds.filter((id) => id !== root.id));
|
|
1067
|
+
});
|
|
1068
|
+
const ids = uniq(allNodeIds.concat(allEdgeIds));
|
|
1069
|
+
this.graph.showItem(ids, !animate);
|
|
1070
|
+
yield this.graph.layout(undefined, !animate);
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
525
1073
|
}
|
|
526
1074
|
const getItemTheme = (dataTypeSet, dataTypeField, dataType, itemTheme) => {
|
|
527
|
-
const { styles: themeStyles, lodStrategy } = itemTheme;
|
|
1075
|
+
const { styles: themeStyles = [], lodStrategy } = itemTheme;
|
|
528
1076
|
const formattedLodStrategy = formatLodStrategy(lodStrategy);
|
|
529
1077
|
if (!dataTypeField) {
|
|
530
1078
|
// dataType field is not assigned
|
|
@@ -541,11 +1089,53 @@ const getItemTheme = (dataTypeSet, dataTypeField, dataType, itemTheme) => {
|
|
|
541
1089
|
themeStyle = themeStyles[idx % themeStylesLength];
|
|
542
1090
|
}
|
|
543
1091
|
else if (isObject(themeStyles)) {
|
|
544
|
-
themeStyle =
|
|
1092
|
+
themeStyle =
|
|
1093
|
+
themeStyles[dataType] ||
|
|
1094
|
+
themeStyles.others;
|
|
545
1095
|
}
|
|
546
1096
|
return {
|
|
547
1097
|
styles: themeStyle,
|
|
548
1098
|
lodStrategy: formattedLodStrategy,
|
|
549
1099
|
};
|
|
550
1100
|
};
|
|
1101
|
+
const filterItemMapByType = (itemMap, type) => {
|
|
1102
|
+
const filteredMap = new Map();
|
|
1103
|
+
itemMap.forEach((value, key) => {
|
|
1104
|
+
if (value.type === type) {
|
|
1105
|
+
filteredMap.set(key, value);
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
return filteredMap;
|
|
1109
|
+
};
|
|
1110
|
+
const groupVirtualEdges = (pairs) => {
|
|
1111
|
+
const groupedVirtualEdges = new Map();
|
|
1112
|
+
pairs.forEach((edge) => {
|
|
1113
|
+
const { source, target } = edge;
|
|
1114
|
+
const key = `${source}_${target}`;
|
|
1115
|
+
const group = groupedVirtualEdges.get(key) || {
|
|
1116
|
+
edges: [],
|
|
1117
|
+
source,
|
|
1118
|
+
target,
|
|
1119
|
+
};
|
|
1120
|
+
group.edges.push(edge);
|
|
1121
|
+
groupedVirtualEdges.set(key, group);
|
|
1122
|
+
});
|
|
1123
|
+
// each item in groupedEdges is a virtual edge
|
|
1124
|
+
const virtualEdges = [];
|
|
1125
|
+
groupedVirtualEdges.forEach((group) => {
|
|
1126
|
+
const { source, target, edges } = group;
|
|
1127
|
+
virtualEdges.push({
|
|
1128
|
+
id: `virtual-${uniqueId()}`,
|
|
1129
|
+
source,
|
|
1130
|
+
target,
|
|
1131
|
+
data: {
|
|
1132
|
+
_virtual: true,
|
|
1133
|
+
keyShape: {
|
|
1134
|
+
lineWidth: edges.length,
|
|
1135
|
+
},
|
|
1136
|
+
},
|
|
1137
|
+
});
|
|
1138
|
+
});
|
|
1139
|
+
return virtualEdges;
|
|
1140
|
+
};
|
|
551
1141
|
//# sourceMappingURL=item.js.map
|