@antv/g6 4.8.14 → 5.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g6.min.js +19 -3
- package/esm/constant/index.d.ts +1 -0
- package/esm/constant/index.js +2 -0
- package/esm/constant/index.js.map +1 -0
- package/esm/constant/shape.d.ts +27 -0
- package/esm/constant/shape.js +26 -0
- package/esm/constant/shape.js.map +1 -0
- package/esm/index.d.ts +124 -0
- package/esm/index.js +11 -0
- package/esm/index.js.map +1 -0
- package/esm/item/combo.d.ts +4 -0
- package/esm/item/combo.js +4 -0
- package/esm/item/combo.js.map +1 -0
- package/esm/item/edge.d.ts +54 -0
- package/esm/item/edge.js +113 -0
- package/esm/item/edge.js.map +1 -0
- package/esm/item/item.d.ts +189 -0
- package/esm/item/item.js +636 -0
- package/esm/item/item.js.map +1 -0
- package/esm/item/node.d.ts +54 -0
- package/esm/item/node.js +170 -0
- package/esm/item/node.js.map +1 -0
- package/esm/runtime/controller/data.d.ts +65 -0
- package/esm/runtime/controller/data.js +489 -0
- package/esm/runtime/controller/data.js.map +1 -0
- package/esm/runtime/controller/extension.d.ts +9 -0
- package/esm/runtime/controller/extension.js +11 -0
- package/esm/runtime/controller/extension.js.map +1 -0
- package/esm/runtime/controller/index.d.ts +7 -0
- package/esm/runtime/controller/index.js +8 -0
- package/esm/runtime/controller/index.js.map +1 -0
- package/esm/runtime/controller/interaction.d.ts +51 -0
- package/esm/runtime/controller/interaction.js +259 -0
- package/esm/runtime/controller/interaction.js.map +1 -0
- package/esm/runtime/controller/item.d.ts +101 -0
- package/esm/runtime/controller/item.js +537 -0
- package/esm/runtime/controller/item.js.map +1 -0
- package/esm/runtime/controller/layout.d.ts +30 -0
- package/esm/runtime/controller/layout.js +204 -0
- package/esm/runtime/controller/layout.js.map +1 -0
- package/esm/runtime/controller/plugin.d.ts +34 -0
- package/esm/runtime/controller/plugin.js +140 -0
- package/esm/runtime/controller/plugin.js.map +1 -0
- package/esm/runtime/controller/theme.d.ts +29 -0
- package/esm/runtime/controller/theme.js +54 -0
- package/esm/runtime/controller/theme.js.map +1 -0
- package/esm/runtime/controller/viewport.d.ts +11 -0
- package/esm/runtime/controller/viewport.js +102 -0
- package/esm/runtime/controller/viewport.js.map +1 -0
- package/esm/runtime/graph.d.ts +462 -0
- package/esm/runtime/graph.js +1077 -0
- package/esm/runtime/graph.js.map +1 -0
- package/esm/runtime/hooks.d.ts +33 -0
- package/esm/runtime/hooks.js +74 -0
- package/esm/runtime/hooks.js.map +1 -0
- package/esm/stdlib/behavior/activate-relations.d.ts +62 -0
- package/esm/stdlib/behavior/activate-relations.js +81 -0
- package/esm/stdlib/behavior/activate-relations.js.map +1 -0
- package/esm/stdlib/behavior/brush-select.d.ts +110 -0
- package/esm/stdlib/behavior/brush-select.js +268 -0
- package/esm/stdlib/behavior/brush-select.js.map +1 -0
- package/esm/stdlib/behavior/click-select.d.ts +71 -0
- package/esm/stdlib/behavior/click-select.js +143 -0
- package/esm/stdlib/behavior/click-select.js.map +1 -0
- package/esm/stdlib/behavior/drag-canvas.d.ts +82 -0
- package/esm/stdlib/behavior/drag-canvas.js +246 -0
- package/esm/stdlib/behavior/drag-canvas.js.map +1 -0
- package/esm/stdlib/behavior/drag-node.d.ts +80 -0
- package/esm/stdlib/behavior/drag-node.js +250 -0
- package/esm/stdlib/behavior/drag-node.js.map +1 -0
- package/esm/stdlib/behavior/hover-activate.d.ts +41 -0
- package/esm/stdlib/behavior/hover-activate.js +63 -0
- package/esm/stdlib/behavior/hover-activate.js.map +1 -0
- package/esm/stdlib/behavior/lasso-select.d.ts +27 -0
- package/esm/stdlib/behavior/lasso-select.js +79 -0
- package/esm/stdlib/behavior/lasso-select.js.map +1 -0
- package/esm/stdlib/behavior/orbit-canvas-3d.d.ts +37 -0
- package/esm/stdlib/behavior/orbit-canvas-3d.js +62 -0
- package/esm/stdlib/behavior/orbit-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/rotate-canvas-3d.d.ts +61 -0
- package/esm/stdlib/behavior/rotate-canvas-3d.js +123 -0
- package/esm/stdlib/behavior/rotate-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/track-canvas-3d.d.ts +37 -0
- package/esm/stdlib/behavior/track-canvas-3d.js +62 -0
- package/esm/stdlib/behavior/track-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.d.ts +51 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.js +74 -0
- package/esm/stdlib/behavior/zoom-canvas-3d.js.map +1 -0
- package/esm/stdlib/behavior/zoom-canvas.d.ts +61 -0
- package/esm/stdlib/behavior/zoom-canvas.js +160 -0
- package/esm/stdlib/behavior/zoom-canvas.js.map +1 -0
- package/esm/stdlib/data/comboFromNode.d.ts +9 -0
- package/esm/stdlib/data/comboFromNode.js +28 -0
- package/esm/stdlib/data/comboFromNode.js.map +1 -0
- package/esm/stdlib/index.d.ts +80 -0
- package/esm/stdlib/index.js +82 -0
- package/esm/stdlib/index.js.map +1 -0
- package/esm/stdlib/item/edge/base.d.ts +111 -0
- package/esm/stdlib/item/edge/base.js +341 -0
- package/esm/stdlib/item/edge/base.js.map +1 -0
- package/esm/stdlib/item/edge/index.d.ts +1 -0
- package/esm/stdlib/item/edge/index.js +2 -0
- package/esm/stdlib/item/edge/index.js.map +1 -0
- package/esm/stdlib/item/edge/line.d.ts +33 -0
- package/esm/stdlib/item/edge/line.js +45 -0
- package/esm/stdlib/item/edge/line.js.map +1 -0
- package/esm/stdlib/item/node/base.d.ts +137 -0
- package/esm/stdlib/item/node/base.js +414 -0
- package/esm/stdlib/item/node/base.js.map +1 -0
- package/esm/stdlib/item/node/base3d.d.ts +72 -0
- package/esm/stdlib/item/node/base3d.js +113 -0
- package/esm/stdlib/item/node/base3d.js.map +1 -0
- package/esm/stdlib/item/node/circle.d.ts +30 -0
- package/esm/stdlib/item/node/circle.js +56 -0
- package/esm/stdlib/item/node/circle.js.map +1 -0
- package/esm/stdlib/item/node/index.d.ts +2 -0
- package/esm/stdlib/item/node/index.js +3 -0
- package/esm/stdlib/item/node/index.js.map +1 -0
- package/esm/stdlib/item/node/sphere.d.ts +33 -0
- package/esm/stdlib/item/node/sphere.js +52 -0
- package/esm/stdlib/item/node/sphere.js.map +1 -0
- package/esm/stdlib/plugin/legend/index.d.ts +121 -0
- package/esm/stdlib/plugin/legend/index.js +587 -0
- package/esm/stdlib/plugin/legend/index.js.map +1 -0
- package/esm/stdlib/plugin/minimap/index.d.ts +106 -0
- package/esm/stdlib/plugin/minimap/index.js +578 -0
- package/esm/stdlib/plugin/minimap/index.js.map +1 -0
- package/esm/stdlib/selector/lasso.d.ts +15 -0
- package/esm/stdlib/selector/lasso.js +61 -0
- package/esm/stdlib/selector/lasso.js.map +1 -0
- package/esm/stdlib/selector/rect.d.ts +16 -0
- package/esm/stdlib/selector/rect.js +54 -0
- package/esm/stdlib/selector/rect.js.map +1 -0
- package/esm/stdlib/theme/dark.d.ts +3 -0
- package/esm/stdlib/theme/dark.js +279 -0
- package/esm/stdlib/theme/dark.js.map +1 -0
- package/esm/stdlib/theme/light.d.ts +3 -0
- package/esm/stdlib/theme/light.js +274 -0
- package/esm/stdlib/theme/light.js.map +1 -0
- package/esm/stdlib/themeSolver/base.d.ts +15 -0
- package/esm/stdlib/themeSolver/base.js +11 -0
- package/esm/stdlib/themeSolver/base.js.map +1 -0
- package/esm/stdlib/themeSolver/spec.d.ts +37 -0
- package/esm/stdlib/themeSolver/spec.js +66 -0
- package/esm/stdlib/themeSolver/spec.js.map +1 -0
- package/esm/stdlib/themeSolver/subject.d.ts +43 -0
- package/esm/stdlib/themeSolver/subject.js +396 -0
- package/esm/stdlib/themeSolver/subject.js.map +1 -0
- package/esm/types/animate.d.ts +59 -0
- package/esm/types/animate.js +2 -0
- package/esm/types/animate.js.map +1 -0
- package/esm/types/behavior.d.ts +45 -0
- package/esm/types/behavior.js +14 -0
- package/esm/types/behavior.js.map +1 -0
- package/esm/types/combo.d.ts +87 -0
- package/esm/types/combo.js +2 -0
- package/esm/types/combo.js.map +1 -0
- package/esm/types/common.d.ts +6 -0
- package/esm/types/common.js +2 -0
- package/esm/types/common.js.map +1 -0
- package/esm/types/data.d.ts +21 -0
- package/esm/types/data.js +2 -0
- package/esm/types/data.js.map +1 -0
- package/esm/types/edge.d.ts +100 -0
- package/esm/types/edge.js +2 -0
- package/esm/types/edge.js.map +1 -0
- package/esm/types/event.d.ts +30 -0
- package/esm/types/event.js +31 -0
- package/esm/types/event.js.map +1 -0
- package/esm/types/graph.d.ts +445 -0
- package/esm/types/graph.js +2 -0
- package/esm/types/graph.js.map +1 -0
- package/esm/types/hook.d.ts +97 -0
- package/esm/types/hook.js +2 -0
- package/esm/types/hook.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.js +2 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/item.d.ts +229 -0
- package/esm/types/item.js +16 -0
- package/esm/types/item.js.map +1 -0
- package/esm/types/layout.d.ts +69 -0
- package/esm/types/layout.js +20 -0
- package/esm/types/layout.js.map +1 -0
- package/esm/types/node.d.ts +134 -0
- package/esm/types/node.js +2 -0
- package/esm/types/node.js.map +1 -0
- package/esm/types/plugin.d.ts +40 -0
- package/esm/types/plugin.js +53 -0
- package/esm/types/plugin.js.map +1 -0
- package/esm/types/render.d.ts +1 -0
- package/esm/types/render.js +2 -0
- package/esm/types/render.js.map +1 -0
- package/esm/types/spec.d.ts +65 -0
- package/esm/types/spec.js +2 -0
- package/esm/types/spec.js.map +1 -0
- package/esm/types/stdlib.d.ts +13 -0
- package/esm/types/stdlib.js +2 -0
- package/esm/types/stdlib.js.map +1 -0
- package/esm/types/theme.d.ts +102 -0
- package/esm/types/theme.js +15 -0
- package/esm/types/theme.js.map +1 -0
- package/esm/types/view.d.ts +23 -0
- package/esm/types/view.js +2 -0
- package/esm/types/view.js.map +1 -0
- package/esm/util/animate.d.ts +101 -0
- package/esm/util/animate.js +350 -0
- package/esm/util/animate.js.map +1 -0
- package/esm/util/array.d.ts +20 -0
- package/esm/util/array.js +60 -0
- package/esm/util/array.js.map +1 -0
- package/esm/util/canvas.d.ts +20 -0
- package/esm/util/canvas.js +81 -0
- package/esm/util/canvas.js.map +1 -0
- package/esm/util/event.d.ts +12 -0
- package/esm/util/event.js +26 -0
- package/esm/util/event.js.map +1 -0
- package/esm/util/extend.d.ts +21 -0
- package/esm/util/extend.js +22 -0
- package/esm/util/extend.js.map +1 -0
- package/esm/util/extension.d.ts +10 -0
- package/esm/util/extension.js +24 -0
- package/esm/util/extension.js.map +1 -0
- package/esm/util/index.d.ts +14 -0
- package/esm/util/index.js +5 -0
- package/esm/util/index.js.map +1 -0
- package/esm/util/item.d.ts +14 -0
- package/esm/util/item.js +42 -0
- package/esm/util/item.js.map +1 -0
- package/esm/util/mapper.d.ts +17 -0
- package/esm/util/mapper.js +60 -0
- package/esm/util/mapper.js.map +1 -0
- package/esm/util/math.d.ts +8 -0
- package/esm/util/math.js +9 -0
- package/esm/util/math.js.map +1 -0
- package/esm/util/point.d.ts +61 -0
- package/esm/util/point.js +160 -0
- package/esm/util/point.js.map +1 -0
- package/esm/util/shape.d.ts +105 -0
- package/esm/util/shape.js +504 -0
- package/esm/util/shape.js.map +1 -0
- package/esm/util/shape3d.d.ts +23 -0
- package/esm/util/shape3d.js +147 -0
- package/esm/util/shape3d.js.map +1 -0
- package/esm/util/text.d.ts +18 -0
- package/esm/util/text.js +36 -0
- package/esm/util/text.js.map +1 -0
- package/esm/util/type.d.ts +2 -0
- package/esm/util/type.js +2 -0
- package/esm/util/type.js.map +1 -0
- package/esm/util/zoom.d.ts +17 -0
- package/esm/util/zoom.js +36 -0
- package/esm/util/zoom.js.map +1 -0
- package/lib/constant/index.d.ts +1 -0
- package/lib/constant/index.js +18 -0
- package/lib/constant/index.js.map +1 -0
- package/lib/constant/shape.d.ts +27 -0
- package/lib/constant/shape.js +29 -0
- package/lib/constant/shape.js.map +1 -0
- package/lib/index.d.ts +124 -4
- package/lib/index.js +30 -27
- package/lib/index.js.map +1 -0
- package/lib/item/combo.d.ts +4 -0
- package/lib/item/combo.js +10 -0
- package/lib/item/combo.js.map +1 -0
- package/lib/item/edge.d.ts +54 -0
- package/lib/item/edge.js +119 -0
- package/lib/item/edge.js.map +1 -0
- package/lib/item/item.d.ts +189 -0
- package/lib/item/item.js +639 -0
- package/lib/item/item.js.map +1 -0
- package/lib/item/node.d.ts +54 -0
- package/lib/item/node.js +176 -0
- package/lib/item/node.js.map +1 -0
- package/lib/runtime/controller/data.d.ts +65 -0
- package/lib/runtime/controller/data.js +493 -0
- package/lib/runtime/controller/data.js.map +1 -0
- package/lib/runtime/controller/extension.d.ts +9 -0
- package/lib/runtime/controller/extension.js +15 -0
- package/lib/runtime/controller/extension.js.map +1 -0
- package/lib/runtime/controller/index.d.ts +7 -0
- package/lib/runtime/controller/index.js +24 -0
- package/lib/runtime/controller/index.js.map +1 -0
- package/lib/runtime/controller/interaction.d.ts +51 -0
- package/lib/runtime/controller/interaction.js +263 -0
- package/lib/runtime/controller/interaction.js.map +1 -0
- package/lib/runtime/controller/item.d.ts +101 -0
- package/lib/runtime/controller/item.js +544 -0
- package/lib/runtime/controller/item.js.map +1 -0
- package/lib/runtime/controller/layout.d.ts +30 -0
- package/lib/runtime/controller/layout.js +208 -0
- package/lib/runtime/controller/layout.js.map +1 -0
- package/lib/runtime/controller/plugin.d.ts +34 -0
- package/lib/runtime/controller/plugin.js +147 -0
- package/lib/runtime/controller/plugin.js.map +1 -0
- package/lib/runtime/controller/theme.d.ts +29 -0
- package/lib/runtime/controller/theme.js +61 -0
- package/lib/runtime/controller/theme.js.map +1 -0
- package/lib/runtime/controller/viewport.d.ts +11 -0
- package/lib/runtime/controller/viewport.js +106 -0
- package/lib/runtime/controller/viewport.js.map +1 -0
- package/lib/runtime/graph.d.ts +462 -0
- package/lib/runtime/graph.js +1083 -0
- package/lib/runtime/graph.js.map +1 -0
- package/lib/runtime/hooks.d.ts +33 -0
- package/lib/runtime/hooks.js +77 -0
- package/lib/runtime/hooks.js.map +1 -0
- package/lib/stdlib/behavior/activate-relations.d.ts +62 -0
- package/lib/stdlib/behavior/activate-relations.js +84 -0
- package/lib/stdlib/behavior/activate-relations.js.map +1 -0
- package/lib/stdlib/behavior/brush-select.d.ts +110 -0
- package/lib/stdlib/behavior/brush-select.js +271 -0
- package/lib/stdlib/behavior/brush-select.js.map +1 -0
- package/lib/stdlib/behavior/click-select.d.ts +71 -0
- package/lib/stdlib/behavior/click-select.js +146 -0
- package/lib/stdlib/behavior/click-select.js.map +1 -0
- package/lib/stdlib/behavior/drag-canvas.d.ts +82 -0
- package/lib/stdlib/behavior/drag-canvas.js +249 -0
- package/lib/stdlib/behavior/drag-canvas.js.map +1 -0
- package/lib/stdlib/behavior/drag-node.d.ts +80 -0
- package/lib/stdlib/behavior/drag-node.js +253 -0
- package/lib/stdlib/behavior/drag-node.js.map +1 -0
- package/lib/stdlib/behavior/hover-activate.d.ts +41 -0
- package/lib/stdlib/behavior/hover-activate.js +67 -0
- package/lib/stdlib/behavior/hover-activate.js.map +1 -0
- package/lib/stdlib/behavior/lasso-select.d.ts +27 -0
- package/lib/stdlib/behavior/lasso-select.js +85 -0
- package/lib/stdlib/behavior/lasso-select.js.map +1 -0
- package/lib/stdlib/behavior/orbit-canvas-3d.d.ts +37 -0
- package/lib/stdlib/behavior/orbit-canvas-3d.js +68 -0
- package/lib/stdlib/behavior/orbit-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/rotate-canvas-3d.d.ts +61 -0
- package/lib/stdlib/behavior/rotate-canvas-3d.js +126 -0
- package/lib/stdlib/behavior/rotate-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/track-canvas-3d.d.ts +37 -0
- package/lib/stdlib/behavior/track-canvas-3d.js +68 -0
- package/lib/stdlib/behavior/track-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.d.ts +51 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.js +77 -0
- package/lib/stdlib/behavior/zoom-canvas-3d.js.map +1 -0
- package/lib/stdlib/behavior/zoom-canvas.d.ts +61 -0
- package/lib/stdlib/behavior/zoom-canvas.js +163 -0
- package/lib/stdlib/behavior/zoom-canvas.js.map +1 -0
- package/lib/stdlib/data/comboFromNode.d.ts +9 -0
- package/lib/stdlib/data/comboFromNode.js +32 -0
- package/lib/stdlib/data/comboFromNode.js.map +1 -0
- package/lib/stdlib/index.d.ts +80 -0
- package/lib/stdlib/index.js +90 -0
- package/lib/stdlib/index.js.map +1 -0
- package/lib/stdlib/item/edge/base.d.ts +111 -0
- package/lib/stdlib/item/edge/base.js +345 -0
- package/lib/stdlib/item/edge/base.js.map +1 -0
- package/lib/stdlib/item/edge/index.d.ts +1 -0
- package/lib/stdlib/item/edge/index.js +18 -0
- package/lib/stdlib/item/edge/index.js.map +1 -0
- package/lib/stdlib/item/edge/line.d.ts +33 -0
- package/lib/stdlib/item/edge/line.js +49 -0
- package/lib/stdlib/item/edge/line.js.map +1 -0
- package/lib/stdlib/item/node/base.d.ts +137 -0
- package/lib/stdlib/item/node/base.js +418 -0
- package/lib/stdlib/item/node/base.js.map +1 -0
- package/lib/stdlib/item/node/base3d.d.ts +72 -0
- package/lib/stdlib/item/node/base3d.js +117 -0
- package/lib/stdlib/item/node/base3d.js.map +1 -0
- package/lib/stdlib/item/node/circle.d.ts +30 -0
- package/lib/stdlib/item/node/circle.js +60 -0
- package/lib/stdlib/item/node/circle.js.map +1 -0
- package/lib/stdlib/item/node/index.d.ts +2 -0
- package/lib/stdlib/item/node/index.js +19 -0
- package/lib/stdlib/item/node/index.js.map +1 -0
- package/lib/stdlib/item/node/sphere.d.ts +33 -0
- package/lib/stdlib/item/node/sphere.js +56 -0
- package/lib/stdlib/item/node/sphere.js.map +1 -0
- package/lib/stdlib/plugin/legend/index.d.ts +121 -0
- package/lib/stdlib/plugin/legend/index.js +590 -0
- package/lib/stdlib/plugin/legend/index.js.map +1 -0
- package/lib/stdlib/plugin/minimap/index.d.ts +106 -0
- package/lib/stdlib/plugin/minimap/index.js +581 -0
- package/lib/stdlib/plugin/minimap/index.js.map +1 -0
- package/lib/stdlib/selector/lasso.d.ts +15 -0
- package/lib/stdlib/selector/lasso.js +63 -0
- package/lib/stdlib/selector/lasso.js.map +1 -0
- package/lib/stdlib/selector/rect.d.ts +16 -0
- package/lib/stdlib/selector/rect.js +56 -0
- package/lib/stdlib/selector/rect.js.map +1 -0
- package/lib/stdlib/theme/dark.d.ts +3 -0
- package/lib/stdlib/theme/dark.js +281 -0
- package/lib/stdlib/theme/dark.js.map +1 -0
- package/lib/stdlib/theme/light.d.ts +3 -0
- package/lib/stdlib/theme/light.js +276 -0
- package/lib/stdlib/theme/light.js.map +1 -0
- package/lib/stdlib/themeSolver/base.d.ts +15 -0
- package/lib/stdlib/themeSolver/base.js +14 -0
- package/lib/stdlib/themeSolver/base.js.map +1 -0
- package/lib/stdlib/themeSolver/spec.d.ts +37 -0
- package/lib/stdlib/themeSolver/spec.js +72 -0
- package/lib/stdlib/themeSolver/spec.js.map +1 -0
- package/lib/stdlib/themeSolver/subject.d.ts +43 -0
- package/lib/stdlib/themeSolver/subject.js +404 -0
- package/lib/stdlib/themeSolver/subject.js.map +1 -0
- package/lib/types/animate.d.ts +59 -0
- package/lib/types/animate.js +3 -0
- package/lib/types/animate.js.map +1 -0
- package/lib/types/behavior.d.ts +45 -0
- package/lib/types/behavior.js +18 -0
- package/lib/types/behavior.js.map +1 -0
- package/lib/types/combo.d.ts +87 -0
- package/lib/types/combo.js +3 -0
- package/lib/types/combo.js.map +1 -0
- package/lib/types/common.d.ts +6 -0
- package/lib/types/common.js +3 -0
- package/lib/types/common.js.map +1 -0
- package/lib/types/data.d.ts +21 -0
- package/lib/types/data.js +3 -0
- package/lib/types/data.js.map +1 -0
- package/lib/types/edge.d.ts +100 -0
- package/lib/types/edge.js +3 -0
- package/lib/types/edge.js.map +1 -0
- package/lib/types/event.d.ts +30 -0
- package/lib/types/event.js +34 -0
- package/lib/types/event.js.map +1 -0
- package/lib/types/graph.d.ts +445 -0
- package/lib/types/graph.js +3 -0
- package/lib/types/graph.js.map +1 -0
- package/lib/types/hook.d.ts +97 -0
- package/lib/types/hook.js +3 -0
- package/lib/types/hook.js.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.js +7 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/item.d.ts +229 -0
- package/lib/types/item.js +19 -0
- package/lib/types/item.js.map +1 -0
- package/lib/types/layout.d.ts +69 -0
- package/lib/types/layout.js +25 -0
- package/lib/types/layout.js.map +1 -0
- package/lib/types/node.d.ts +134 -0
- package/lib/types/node.js +3 -0
- package/lib/types/node.js.map +1 -0
- package/lib/types/plugin.d.ts +40 -0
- package/lib/types/plugin.js +57 -0
- package/lib/types/plugin.js.map +1 -0
- package/lib/types/render.d.ts +1 -0
- package/lib/types/render.js +3 -0
- package/lib/types/render.js.map +1 -0
- package/lib/types/spec.d.ts +65 -0
- package/lib/types/spec.js +3 -0
- package/lib/types/spec.js.map +1 -0
- package/lib/types/stdlib.d.ts +13 -0
- package/lib/types/stdlib.js +3 -0
- package/lib/types/stdlib.js.map +1 -0
- package/lib/types/theme.d.ts +102 -0
- package/lib/types/theme.js +19 -0
- package/lib/types/theme.js.map +1 -0
- package/lib/types/view.d.ts +23 -0
- package/lib/types/view.js +3 -0
- package/lib/types/view.js.map +1 -0
- package/lib/util/animate.d.ts +101 -0
- package/lib/util/animate.js +358 -0
- package/lib/util/animate.js.map +1 -0
- package/lib/util/array.d.ts +20 -0
- package/lib/util/array.js +68 -0
- package/lib/util/array.js.map +1 -0
- package/lib/util/canvas.d.ts +20 -0
- package/lib/util/canvas.js +86 -0
- package/lib/util/canvas.js.map +1 -0
- package/lib/util/event.d.ts +12 -0
- package/lib/util/event.js +30 -0
- package/lib/util/event.js.map +1 -0
- package/lib/util/extend.d.ts +21 -0
- package/lib/util/extend.js +29 -0
- package/lib/util/extend.js.map +1 -0
- package/lib/util/extension.d.ts +10 -0
- package/lib/util/extension.js +29 -0
- package/lib/util/extension.js.map +1 -0
- package/lib/util/index.d.ts +14 -0
- package/lib/util/index.js +7 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/item.d.ts +14 -0
- package/lib/util/item.js +47 -0
- package/lib/util/item.js.map +1 -0
- package/lib/util/mapper.d.ts +17 -0
- package/lib/util/mapper.js +63 -0
- package/lib/util/mapper.js.map +1 -0
- package/lib/util/math.d.ts +8 -0
- package/lib/util/math.js +13 -0
- package/lib/util/math.js.map +1 -0
- package/lib/util/point.d.ts +61 -0
- package/lib/util/point.js +169 -0
- package/lib/util/point.js.map +1 -0
- package/lib/util/shape.d.ts +105 -0
- package/lib/util/shape.js +519 -0
- package/lib/util/shape.js.map +1 -0
- package/lib/util/shape3d.d.ts +23 -0
- package/lib/util/shape3d.js +153 -0
- package/lib/util/shape3d.js.map +1 -0
- package/lib/util/text.d.ts +18 -0
- package/lib/util/text.js +41 -0
- package/lib/util/text.js.map +1 -0
- package/lib/util/type.d.ts +2 -0
- package/lib/util/type.js +6 -0
- package/lib/util/type.js.map +1 -0
- package/lib/util/zoom.d.ts +17 -0
- package/lib/util/zoom.js +41 -0
- package/lib/util/zoom.js.map +1 -0
- package/package.json +82 -50
- package/src/constant/index.ts +1 -0
- package/src/constant/shape.ts +33 -0
- package/src/index.ts +13 -0
- package/src/item/combo.ts +5 -0
- package/src/item/edge.ts +177 -0
- package/src/item/item.ts +812 -0
- package/src/item/node.ts +275 -0
- package/src/runtime/controller/data.ts +575 -0
- package/src/runtime/controller/extension.ts +14 -0
- package/src/runtime/controller/index.ts +7 -0
- package/src/runtime/controller/interaction.ts +343 -0
- package/src/runtime/controller/item.ts +780 -0
- package/src/runtime/controller/layout.ts +251 -0
- package/src/runtime/controller/plugin.ts +171 -0
- package/src/runtime/controller/theme.ts +69 -0
- package/src/runtime/controller/viewport.ts +131 -0
- package/src/runtime/graph.ts +1439 -0
- package/src/runtime/hooks.ts +64 -0
- package/src/stdlib/behavior/activate-relations.ts +139 -0
- package/src/stdlib/behavior/brush-select.ts +386 -0
- package/src/stdlib/behavior/click-select.ts +201 -0
- package/src/stdlib/behavior/drag-canvas.ts +333 -0
- package/src/stdlib/behavior/drag-node.ts +402 -0
- package/src/stdlib/behavior/hover-activate.ts +106 -0
- package/src/stdlib/behavior/lasso-select.ts +94 -0
- package/src/stdlib/behavior/orbit-canvas-3d.ts +104 -0
- package/src/stdlib/behavior/rotate-canvas-3d.ts +172 -0
- package/src/stdlib/behavior/track-canvas-3d.ts +104 -0
- package/src/stdlib/behavior/zoom-canvas-3d.ts +127 -0
- package/src/stdlib/behavior/zoom-canvas.ts +244 -0
- package/src/stdlib/data/comboFromNode.ts +28 -0
- package/src/stdlib/index.ts +87 -0
- package/src/stdlib/item/edge/base.ts +571 -0
- package/src/stdlib/item/edge/index.ts +1 -0
- package/src/stdlib/item/edge/line.ts +98 -0
- package/src/stdlib/item/node/base.ts +726 -0
- package/src/stdlib/item/node/base3d.ts +192 -0
- package/src/stdlib/item/node/circle.ts +113 -0
- package/src/stdlib/item/node/index.ts +2 -0
- package/src/stdlib/item/node/sphere.ts +99 -0
- package/src/stdlib/plugin/legend/index.ts +733 -0
- package/src/stdlib/plugin/minimap/index.ts +689 -0
- package/src/stdlib/selector/lasso.ts +75 -0
- package/src/stdlib/selector/rect.ts +78 -0
- package/src/stdlib/theme/dark.ts +340 -0
- package/src/stdlib/theme/light.ts +333 -0
- package/src/stdlib/themeSolver/base.ts +22 -0
- package/src/stdlib/themeSolver/spec.ts +110 -0
- package/src/stdlib/themeSolver/subject.ts +502 -0
- package/src/types/animate.ts +71 -0
- package/src/types/behavior.ts +49 -0
- package/src/types/combo.ts +120 -0
- package/src/types/common.ts +7 -0
- package/src/types/data.ts +35 -0
- package/src/types/edge.ts +119 -0
- package/src/types/event.ts +47 -0
- package/src/types/graph.ts +573 -0
- package/src/types/hook.ts +98 -0
- package/src/types/index.ts +29 -0
- package/src/types/item.ts +324 -0
- package/src/types/layout.ts +138 -0
- package/src/types/node.ts +162 -0
- package/src/types/plugin.ts +77 -0
- package/src/types/render.ts +1 -0
- package/src/types/spec.ts +116 -0
- package/src/types/stdlib.ts +25 -0
- package/src/types/theme.ts +101 -0
- package/src/types/view.ts +31 -0
- package/src/util/animate.ts +430 -0
- package/src/util/array.ts +57 -0
- package/src/util/canvas.ts +95 -0
- package/src/util/event.ts +34 -0
- package/src/util/extend.ts +42 -0
- package/src/util/extension.ts +29 -0
- package/src/util/index.ts +4 -0
- package/src/util/item.ts +70 -0
- package/src/util/mapper.ts +61 -0
- package/src/util/math.ts +9 -0
- package/src/util/point.ts +195 -0
- package/src/util/shape.ts +609 -0
- package/src/util/shape3d.ts +198 -0
- package/src/util/text.ts +49 -0
- package/src/util/type.ts +4 -0
- package/src/util/zoom.ts +39 -0
- package/README.en-US.md +0 -170
- package/README.md +0 -177
- package/dist/g6.min.js.map +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.js +0 -5
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { FederatedPointerEvent, IElement } from '@antv/g';
|
|
2
|
+
import { IGraph } from '../../types';
|
|
3
|
+
import { registery } from '../../stdlib';
|
|
4
|
+
import { getExtension } from '../../util/extension';
|
|
5
|
+
import { Behavior } from '../../types/behavior';
|
|
6
|
+
import {
|
|
7
|
+
CANVAS_EVENT_TYPE,
|
|
8
|
+
DOM_EVENT_TYPE,
|
|
9
|
+
IG6GraphEvent,
|
|
10
|
+
} from '../../types/event';
|
|
11
|
+
import { getItemInfoFromElement, ItemInfo } from '../../util/event';
|
|
12
|
+
|
|
13
|
+
type Listener = (event: IG6GraphEvent) => void;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Wraps the listener with error logging.
|
|
17
|
+
* @returns a new listener with error logging.
|
|
18
|
+
*/
|
|
19
|
+
const wrapListener = (
|
|
20
|
+
type: string,
|
|
21
|
+
eventName: string,
|
|
22
|
+
listener: Listener,
|
|
23
|
+
): Listener => {
|
|
24
|
+
return (event: any) => {
|
|
25
|
+
try {
|
|
26
|
+
listener(event);
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error(
|
|
29
|
+
`G6: Error occurred in "${eventName}" phase of the behavior "${type}"!`,
|
|
30
|
+
);
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Manages the interaction extensions and graph modes;
|
|
38
|
+
* Storage related data.
|
|
39
|
+
*/
|
|
40
|
+
export class InteractionController {
|
|
41
|
+
private graph: IGraph;
|
|
42
|
+
private mode: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Available behaviors of current mode.
|
|
46
|
+
* @example
|
|
47
|
+
* { 'drag-node': DragNode, 'drag-canvas': DragCanvas }
|
|
48
|
+
*/
|
|
49
|
+
private behaviorMap: Map<string, Behavior> = new Map();
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Listeners added by all current behaviors.
|
|
53
|
+
* @example
|
|
54
|
+
* {
|
|
55
|
+
* 'drag-node': { 'node:pointerEnter': function },
|
|
56
|
+
* }
|
|
57
|
+
*/
|
|
58
|
+
private listenersMap: Record<string, Record<string, Listener>> = {};
|
|
59
|
+
|
|
60
|
+
private prevItemInfo: ItemInfo;
|
|
61
|
+
|
|
62
|
+
constructor(graph: IGraph<any, any>) {
|
|
63
|
+
this.graph = graph;
|
|
64
|
+
this.initEvents();
|
|
65
|
+
this.tap();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Subscribe the lifecycle of graph.
|
|
70
|
+
*/
|
|
71
|
+
private tap = (): void => {
|
|
72
|
+
this.graph.hooks.init.tap(() => this.onModeChange({ mode: 'default' }));
|
|
73
|
+
this.onModeChange({ mode: 'default' });
|
|
74
|
+
this.graph.hooks.modechange.tap(this.onModeChange);
|
|
75
|
+
this.graph.hooks.behaviorchange.tap(this.onBehaviorChange);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
private validateMode = (mode: string): boolean => {
|
|
79
|
+
if (mode === 'default') return true;
|
|
80
|
+
const modes = this.graph.getSpecification().modes || {};
|
|
81
|
+
return Object.keys(modes).includes(mode);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
private initBehavior = (
|
|
85
|
+
config: string | { type: string; key: string },
|
|
86
|
+
): Behavior | null => {
|
|
87
|
+
const key =
|
|
88
|
+
typeof config === 'string'
|
|
89
|
+
? config
|
|
90
|
+
: (config as any).key || (config as any).type;
|
|
91
|
+
if (this.behaviorMap.has(key)) {
|
|
92
|
+
console.error(
|
|
93
|
+
`G6: Failed to add behavior with key or type "${key}"! It was already added.`,
|
|
94
|
+
);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
// Get behavior extensions from useLib.
|
|
99
|
+
const BehaviorClass = getExtension(config, registery.useLib, 'behavior');
|
|
100
|
+
const options = typeof config === 'string' ? {} : config;
|
|
101
|
+
const behavior = new BehaviorClass(options);
|
|
102
|
+
behavior.graph = this.graph;
|
|
103
|
+
if (behavior) {
|
|
104
|
+
this.behaviorMap.set(key, behavior);
|
|
105
|
+
}
|
|
106
|
+
return behavior;
|
|
107
|
+
} catch (error) {
|
|
108
|
+
console.error(
|
|
109
|
+
`G6: Failed to initialize behavior with key or type "${key}"!`,
|
|
110
|
+
error,
|
|
111
|
+
);
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
private destroyBehavior = (key: string, behavior: Behavior) => {
|
|
117
|
+
try {
|
|
118
|
+
behavior.destroy();
|
|
119
|
+
} catch (error) {
|
|
120
|
+
console.error(
|
|
121
|
+
`G6: Failed to destroy behavior with key or type "${key}"!`,
|
|
122
|
+
error,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
private addListeners = (key: string, behavior: Behavior) => {
|
|
128
|
+
const events = behavior.getEvents();
|
|
129
|
+
this.listenersMap[key] = {};
|
|
130
|
+
Object.keys(events).forEach((eventName) => {
|
|
131
|
+
// Wrap the listener with error logging.
|
|
132
|
+
const listener = wrapListener(
|
|
133
|
+
key,
|
|
134
|
+
eventName,
|
|
135
|
+
events[eventName].bind(behavior),
|
|
136
|
+
);
|
|
137
|
+
this.graph.on(eventName, listener);
|
|
138
|
+
this.listenersMap[key][eventName] = listener;
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
private removeListeners = (key: string) => {
|
|
143
|
+
Object.keys(this.listenersMap[key] || {}).forEach((eventName) => {
|
|
144
|
+
const listener = this.listenersMap[key][eventName];
|
|
145
|
+
this.graph.off(eventName, listener);
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Listener of graph's init hook. Add listeners from behaviors to graph.
|
|
151
|
+
* @param param contains the mode to switch to
|
|
152
|
+
*/
|
|
153
|
+
private onModeChange = (param: { mode: string }) => {
|
|
154
|
+
const { mode } = param;
|
|
155
|
+
|
|
156
|
+
// Skip if set to same mode.
|
|
157
|
+
if (this.mode === mode) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (!this.validateMode(mode)) {
|
|
162
|
+
console.warn(`G6: Mode "${mode}" was not specified in current graph.`);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
this.mode = mode;
|
|
166
|
+
|
|
167
|
+
// 1. Remove listeners && destroy current behaviors.
|
|
168
|
+
this.behaviorMap.forEach((behavior, key) => {
|
|
169
|
+
this.removeListeners(key);
|
|
170
|
+
this.destroyBehavior(key, behavior);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// 2. Initialize new behaviors.
|
|
174
|
+
this.behaviorMap.clear();
|
|
175
|
+
const behaviorConfigs = this.graph.getSpecification().modes?.[mode] || [];
|
|
176
|
+
behaviorConfigs.forEach((config) => {
|
|
177
|
+
this.initBehavior(config);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// 3. Add listeners for each behavior.
|
|
181
|
+
this.listenersMap = {};
|
|
182
|
+
this.behaviorMap.forEach((behavior, key) => {
|
|
183
|
+
this.addListeners(key, behavior);
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Listener of graph's behaviorchange hook. Update, add, or remove behaviors from modes.
|
|
189
|
+
* @param param contains action, modes, and behaviors
|
|
190
|
+
*/
|
|
191
|
+
private onBehaviorChange = (param: {
|
|
192
|
+
action: 'update' | 'add' | 'remove';
|
|
193
|
+
modes: string[];
|
|
194
|
+
behaviors: (string | { type: string; key: string })[];
|
|
195
|
+
}) => {
|
|
196
|
+
const { action, modes, behaviors } = param;
|
|
197
|
+
modes.forEach((mode) => {
|
|
198
|
+
// Do nothing if it's not the current mode.
|
|
199
|
+
// Changes are recorded in `graph.specification`. They are applied in onModeChange.
|
|
200
|
+
if (mode !== this.mode) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (action === 'add') {
|
|
205
|
+
behaviors.forEach((config) => {
|
|
206
|
+
const key =
|
|
207
|
+
typeof config === 'string'
|
|
208
|
+
? config
|
|
209
|
+
: (config as any).key || (config as any).type;
|
|
210
|
+
const behavior = this.initBehavior(config);
|
|
211
|
+
if (behavior) {
|
|
212
|
+
this.addListeners(key, behavior);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (action === 'remove') {
|
|
219
|
+
behaviors.forEach((config) => {
|
|
220
|
+
const key =
|
|
221
|
+
typeof config === 'string'
|
|
222
|
+
? config
|
|
223
|
+
: (config as any).key || (config as any).type;
|
|
224
|
+
const behavior = this.behaviorMap.get(key);
|
|
225
|
+
if (behavior) {
|
|
226
|
+
this.removeListeners(key);
|
|
227
|
+
this.destroyBehavior(key, behavior);
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (action === 'update') {
|
|
234
|
+
behaviors.forEach((config) => {
|
|
235
|
+
const key =
|
|
236
|
+
typeof config === 'string'
|
|
237
|
+
? config
|
|
238
|
+
: (config as any).key || (config as any).type;
|
|
239
|
+
const behavior = this.behaviorMap.get(key);
|
|
240
|
+
if (behavior) {
|
|
241
|
+
behavior.updateConfig(config);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
private initEvents = () => {
|
|
249
|
+
Object.values(CANVAS_EVENT_TYPE).forEach((eventName) => {
|
|
250
|
+
this.graph.canvas.document.addEventListener(
|
|
251
|
+
eventName,
|
|
252
|
+
this.handleCanvasEvent,
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
Object.values(DOM_EVENT_TYPE).forEach((eventName) => {
|
|
256
|
+
this.graph.canvas
|
|
257
|
+
.getContextService()
|
|
258
|
+
.getDomElement()
|
|
259
|
+
.addEventListener(eventName, this.handleDOMEvent);
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
private handleCanvasEvent = (gEvent: FederatedPointerEvent) => {
|
|
264
|
+
const itemInfo = getItemInfoFromElement(gEvent.target as IElement);
|
|
265
|
+
if (!itemInfo) {
|
|
266
|
+
// This event was triggered from an element which belongs to none of the nodes/edges/canvas.
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// GEvent => G6Event
|
|
271
|
+
const { itemType, itemId } = itemInfo;
|
|
272
|
+
const event = {
|
|
273
|
+
...gEvent,
|
|
274
|
+
itemType,
|
|
275
|
+
itemId,
|
|
276
|
+
gEvent,
|
|
277
|
+
// Set currentTarget to this.graph instead of canvas.
|
|
278
|
+
// Because we add listeners like this: `graph.on('node:click', listener)`.
|
|
279
|
+
currentTarget: this.graph,
|
|
280
|
+
} as unknown as IG6GraphEvent;
|
|
281
|
+
|
|
282
|
+
// Trigger a dblclick event.
|
|
283
|
+
if (event.type === 'click' && (event as any as MouseEvent).detail === 2) {
|
|
284
|
+
this.handleCanvasEvent({
|
|
285
|
+
...gEvent,
|
|
286
|
+
type: 'dblclick',
|
|
287
|
+
} as FederatedPointerEvent);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Canvas Events
|
|
291
|
+
if (event.itemType === 'canvas') {
|
|
292
|
+
if (event.type === 'pointermove') {
|
|
293
|
+
this.handlePointerMove(event);
|
|
294
|
+
}
|
|
295
|
+
this.graph.emit(`canvas:${gEvent.type}`, event);
|
|
296
|
+
this.graph.emit(`${gEvent.type}`, event);
|
|
297
|
+
// debug(`Canvas ${event.type} :`, event);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Item Events (Node/Edge)
|
|
302
|
+
if (itemType === 'node' || itemType === 'edge') {
|
|
303
|
+
if (event.type === 'pointermove' || event.type === 'pointerleave') {
|
|
304
|
+
this.handlePointerMove(event);
|
|
305
|
+
}
|
|
306
|
+
this.graph.emit(`${itemType}:${gEvent.type}`, event);
|
|
307
|
+
this.graph.emit(`${gEvent.type}`, event);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Emit item's pointerleave/pointerenter events when pointer moves on the canvas.
|
|
313
|
+
*/
|
|
314
|
+
private handlePointerMove = (event: IG6GraphEvent) => {
|
|
315
|
+
const prevItemInfo = this.prevItemInfo;
|
|
316
|
+
const curItemInfo = getItemInfoFromElement(event.target as IElement);
|
|
317
|
+
if (prevItemInfo?.itemId !== curItemInfo?.itemId) {
|
|
318
|
+
if (prevItemInfo) {
|
|
319
|
+
const preType = prevItemInfo.itemType;
|
|
320
|
+
this.graph.emit(`${preType}:pointerleave`, {
|
|
321
|
+
...event,
|
|
322
|
+
itemId: prevItemInfo.itemId,
|
|
323
|
+
itemType: prevItemInfo.itemType,
|
|
324
|
+
type: 'pointerleave',
|
|
325
|
+
target: prevItemInfo.groupElement,
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
if (curItemInfo) {
|
|
329
|
+
const curType = curItemInfo.itemType;
|
|
330
|
+
this.graph.emit(`${curType}:pointerenter`, {
|
|
331
|
+
...event,
|
|
332
|
+
type: 'pointerenter',
|
|
333
|
+
target: curItemInfo.groupElement,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
this.prevItemInfo = curItemInfo;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
private handleDOMEvent = (event: Event) => {
|
|
341
|
+
this.graph.emit(event.type, event);
|
|
342
|
+
};
|
|
343
|
+
}
|