@logicflow/core 1.2.27 → 2.0.0-beta.1
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/.turbo/turbo-build$colon$dev.log +10 -0
- package/.turbo/turbo-build.log +36 -0
- package/CHANGELOG.md +2114 -0
- package/LICENSE +206 -0
- package/__tests__/algorithm/egde.test.ts +118 -0
- package/__tests__/algorithm/index.test.ts +69 -0
- package/__tests__/algorithm/outline.test.ts +43 -0
- package/__tests__/bugs/1545-spec.test.ts +38 -0
- package/__tests__/event/event.test.ts +22 -0
- package/__tests__/history/history.test.ts +28 -0
- package/__tests__/logicflow.test.ts +567 -0
- package/__tests__/model/graphmodel.test.ts +67 -0
- package/__tests__/util/compatible.test.ts +48 -0
- package/__tests__/util/edge.test.ts +224 -0
- package/__tests__/util/geometry.test.ts +14 -0
- package/__tests__/util/graph.test.ts +16 -0
- package/__tests__/util/matrix.test.ts +41 -0
- package/__tests__/util/node.test.ts +68 -0
- package/__tests__/util/sampling.test.ts +16 -0
- package/__tests__/util/vector.test.ts +50 -0
- package/__tests__/util/zIndex.test.ts +10 -0
- package/dist/{style/index.css → index.css} +64 -52
- package/dist/index.min.js +26 -0
- package/dist/index.min.js.map +1 -0
- package/es/LogicFlow.d.ts +966 -0
- package/es/LogicFlow.js +1174 -0
- package/es/LogicFlow.js.map +1 -0
- package/es/algorithm/edge.d.ts +15 -0
- package/es/algorithm/edge.js +57 -0
- package/es/algorithm/edge.js.map +1 -0
- package/es/algorithm/index.js +71 -0
- package/es/algorithm/index.js.map +1 -0
- package/es/algorithm/outline.d.ts +7 -0
- package/es/algorithm/outline.js +61 -0
- package/es/algorithm/outline.js.map +1 -0
- package/{types/constant/constant.d.ts → es/constant/index.d.ts} +23 -22
- package/es/constant/index.js +117 -0
- package/es/constant/index.js.map +1 -0
- package/es/event/eventArgs.d.ts +428 -0
- package/es/event/eventArgs.js +2 -0
- package/es/event/eventArgs.js.map +1 -0
- package/es/event/eventEmitter.d.ts +48 -0
- package/es/event/eventEmitter.js +92 -0
- package/es/event/eventEmitter.js.map +1 -0
- package/es/history/index.d.ts +23 -0
- package/es/history/index.js +111 -0
- package/es/history/index.js.map +1 -0
- package/es/index.css +210 -0
- package/{types → es}/index.d.ts +4 -6
- package/es/index.js +16 -0
- package/es/index.js.map +1 -0
- package/es/index.less +1 -0
- package/{types → es}/keyboard/index.d.ts +7 -8
- package/es/keyboard/index.js +87 -0
- package/es/keyboard/index.js.map +1 -0
- package/es/keyboard/shortcut.js +116 -0
- package/es/keyboard/shortcut.js.map +1 -0
- package/es/model/BaseModel.d.ts +181 -0
- package/es/model/BaseModel.js +2 -0
- package/es/model/BaseModel.js.map +1 -0
- package/{types → es}/model/EditConfigModel.d.ts +13 -8
- package/es/model/EditConfigModel.js +192 -0
- package/es/model/EditConfigModel.js.map +1 -0
- package/{types → es}/model/GraphModel.d.ts +118 -178
- package/es/model/GraphModel.js +1473 -0
- package/es/model/GraphModel.js.map +1 -0
- package/es/model/SnaplineModel.d.ts +34 -0
- package/es/model/SnaplineModel.js +217 -0
- package/es/model/SnaplineModel.js.map +1 -0
- package/{types → es}/model/TransformModel.d.ts +21 -11
- package/es/model/TransformModel.js +240 -0
- package/es/model/TransformModel.js.map +1 -0
- package/{types → es}/model/edge/BaseEdgeModel.d.ts +82 -63
- package/es/model/edge/BaseEdgeModel.js +739 -0
- package/es/model/edge/BaseEdgeModel.js.map +1 -0
- package/es/model/edge/BezierEdgeModel.d.ts +63 -0
- package/es/model/edge/BezierEdgeModel.js +244 -0
- package/es/model/edge/BezierEdgeModel.js.map +1 -0
- package/es/model/edge/LineEdgeModel.d.ts +19 -0
- package/es/model/edge/LineEdgeModel.js +77 -0
- package/es/model/edge/LineEdgeModel.js.map +1 -0
- package/es/model/edge/PolylineEdgeModel.d.ts +85 -0
- package/es/model/edge/PolylineEdgeModel.js +593 -0
- package/es/model/edge/PolylineEdgeModel.js.map +1 -0
- package/es/model/edge/index.js +5 -0
- package/es/model/edge/index.js.map +1 -0
- package/es/model/index.js +8 -0
- package/es/model/index.js.map +1 -0
- package/es/model/node/BaseNodeModel.d.ts +260 -0
- package/es/model/node/BaseNodeModel.js +883 -0
- package/es/model/node/BaseNodeModel.js.map +1 -0
- package/es/model/node/CircleNodeModel.d.ts +40 -0
- package/es/model/node/CircleNodeModel.js +110 -0
- package/es/model/node/CircleNodeModel.js.map +1 -0
- package/es/model/node/DiamondNodeModel.d.ts +46 -0
- package/es/model/node/DiamondNodeModel.js +187 -0
- package/es/model/node/DiamondNodeModel.js.map +1 -0
- package/es/model/node/EllipseNodeModel.d.ts +42 -0
- package/es/model/node/EllipseNodeModel.js +118 -0
- package/es/model/node/EllipseNodeModel.js.map +1 -0
- package/es/model/node/HtmlNodeModel.d.ts +21 -0
- package/es/model/node/HtmlNodeModel.js +59 -0
- package/es/model/node/HtmlNodeModel.js.map +1 -0
- package/es/model/node/PolygonNodeModel.d.ts +50 -0
- package/es/model/node/PolygonNodeModel.js +196 -0
- package/es/model/node/PolygonNodeModel.js.map +1 -0
- package/es/model/node/RectNodeModel.d.ts +34 -0
- package/es/model/node/RectNodeModel.js +80 -0
- package/es/model/node/RectNodeModel.js.map +1 -0
- package/es/model/node/TextNodeModel.d.ts +27 -0
- package/es/model/node/TextNodeModel.js +113 -0
- package/es/model/node/TextNodeModel.js.map +1 -0
- package/es/model/node/index.js +9 -0
- package/es/model/node/index.js.map +1 -0
- package/es/options.d.ts +80 -0
- package/es/options.js +44 -0
- package/es/options.js.map +1 -0
- package/es/style/index.css +210 -0
- package/es/style/index.less +256 -0
- package/es/style/raw.d.ts +4 -0
- package/es/style/raw.js +6 -0
- package/es/style/raw.js.map +1 -0
- package/es/tool/MultipleSelectTool.d.ts +13 -0
- package/es/tool/MultipleSelectTool.js +159 -0
- package/es/tool/MultipleSelectTool.js.map +1 -0
- package/es/tool/TextEditTool.d.ts +26 -0
- package/es/tool/TextEditTool.js +187 -0
- package/es/tool/TextEditTool.js.map +1 -0
- package/es/tool/index.d.ts +2 -0
- package/es/tool/index.js +3 -0
- package/es/tool/index.js.map +1 -0
- package/{types/tool/SnaplineTool.d.ts → es/tool/snapline.d.ts} +1 -1
- package/es/tool/snapline.js +13 -0
- package/es/tool/snapline.js.map +1 -0
- package/es/tool/tool.d.ts +22 -0
- package/es/tool/tool.js +43 -0
- package/es/tool/tool.js.map +1 -0
- package/es/util/animation.d.ts +12 -0
- package/es/util/animation.js +20 -0
- package/es/util/animation.js.map +1 -0
- package/es/util/browser.js +3 -0
- package/es/util/browser.js.map +1 -0
- package/es/util/compatible.d.ts +6 -0
- package/es/util/compatible.js +17 -0
- package/es/util/compatible.js.map +1 -0
- package/es/util/drag.d.ts +47 -0
- package/es/util/drag.js +139 -0
- package/es/util/drag.js.map +1 -0
- package/es/util/edge.d.ts +94 -0
- package/es/util/edge.js +833 -0
- package/es/util/edge.js.map +1 -0
- package/es/util/geometry.d.ts +11 -0
- package/es/util/geometry.js +72 -0
- package/es/util/geometry.js.map +1 -0
- package/{types → es}/util/graph.d.ts +4 -3
- package/es/util/graph.js +54 -0
- package/es/util/graph.js.map +1 -0
- package/es/util/index.d.ts +16 -0
- package/es/util/index.js +17 -0
- package/es/util/index.js.map +1 -0
- package/{types → es}/util/matrix.d.ts +1 -1
- package/es/util/matrix.js +161 -0
- package/es/util/matrix.js.map +1 -0
- package/es/util/mobx.js +4 -0
- package/es/util/mobx.js.map +1 -0
- package/es/util/node.d.ts +69 -0
- package/es/util/node.js +402 -0
- package/es/util/node.js.map +1 -0
- package/es/util/raf.d.ts +2 -0
- package/es/util/raf.js +24 -0
- package/es/util/raf.js.map +1 -0
- package/{types → es}/util/sampling.d.ts +4 -2
- package/es/util/sampling.js +66 -0
- package/es/util/sampling.js.map +1 -0
- package/es/util/theme.d.ts +4 -0
- package/es/util/theme.js +156 -0
- package/es/util/theme.js.map +1 -0
- package/es/util/uuid.d.ts +7 -0
- package/es/util/uuid.js +20 -0
- package/es/util/uuid.js.map +1 -0
- package/{types → es}/util/vector.d.ts +2 -2
- package/es/util/vector.js +97 -0
- package/es/util/vector.js.map +1 -0
- package/es/util/zIndex.js +5 -0
- package/es/util/zIndex.js.map +1 -0
- package/es/view/Anchor.d.ts +47 -0
- package/es/view/Anchor.js +315 -0
- package/es/view/Anchor.js.map +1 -0
- package/es/view/Control.d.ts +100 -0
- package/es/view/Control.js +324 -0
- package/es/view/Control.js.map +1 -0
- package/es/view/Graph.d.ts +18 -0
- package/es/view/Graph.js +77 -0
- package/es/view/Graph.js.map +1 -0
- package/{types → es}/view/Rotate.d.ts +9 -9
- package/es/view/Rotate.js +108 -0
- package/es/view/Rotate.js.map +1 -0
- package/es/view/behavior/dnd.d.ts +27 -0
- package/es/view/behavior/dnd.js +110 -0
- package/es/view/behavior/dnd.js.map +1 -0
- package/es/view/edge/AdjustPoint.d.ts +50 -0
- package/es/view/edge/AdjustPoint.js +368 -0
- package/es/view/edge/AdjustPoint.js.map +1 -0
- package/es/view/edge/Arrow.d.ts +25 -0
- package/es/view/edge/Arrow.js +60 -0
- package/es/view/edge/Arrow.js.map +1 -0
- package/{types → es}/view/edge/BaseEdge.d.ts +25 -17
- package/es/view/edge/BaseEdge.js +381 -0
- package/es/view/edge/BaseEdge.js.map +1 -0
- package/es/view/edge/BezierEdge.d.ts +26 -0
- package/es/view/edge/BezierEdge.js +118 -0
- package/es/view/edge/BezierEdge.js.map +1 -0
- package/{types → es}/view/edge/LineEdge.d.ts +9 -4
- package/es/view/edge/LineEdge.js +78 -0
- package/es/view/edge/LineEdge.js.map +1 -0
- package/{types → es}/view/edge/PolylineEdge.d.ts +18 -8
- package/es/view/edge/PolylineEdge.js +274 -0
- package/es/view/edge/PolylineEdge.js.map +1 -0
- package/es/view/edge/index.d.ts +6 -0
- package/es/view/edge/index.js +7 -0
- package/es/view/edge/index.js.map +1 -0
- package/es/view/index.d.ts +7 -0
- package/es/view/index.js +8 -0
- package/es/view/index.js.map +1 -0
- package/es/view/node/BaseNode.d.ts +49 -0
- package/es/view/node/BaseNode.js +420 -0
- package/es/view/node/BaseNode.js.map +1 -0
- package/es/view/node/CircleNode.d.ts +10 -0
- package/es/view/node/CircleNode.js +45 -0
- package/es/view/node/CircleNode.js.map +1 -0
- package/es/view/node/DiamondNode.d.ts +10 -0
- package/es/view/node/DiamondNode.js +44 -0
- package/es/view/node/DiamondNode.js.map +1 -0
- package/es/view/node/EllipseNode.d.ts +10 -0
- package/es/view/node/EllipseNode.js +44 -0
- package/es/view/node/EllipseNode.js.map +1 -0
- package/{types → es}/view/node/HtmlNode.d.ts +15 -9
- package/es/view/node/HtmlNode.js +129 -0
- package/es/view/node/HtmlNode.js.map +1 -0
- package/es/view/node/PolygonNode.d.ts +10 -0
- package/es/view/node/PolygonNode.js +48 -0
- package/es/view/node/PolygonNode.js.map +1 -0
- package/es/view/node/RectNode.d.ts +11 -0
- package/es/view/node/RectNode.js +44 -0
- package/es/view/node/RectNode.js.map +1 -0
- package/es/view/node/TextNode.d.ts +12 -0
- package/es/view/node/TextNode.js +55 -0
- package/es/view/node/TextNode.js.map +1 -0
- package/es/view/node/index.d.ts +8 -0
- package/es/view/node/index.js +9 -0
- package/es/view/node/index.js.map +1 -0
- package/{types → es}/view/overlay/BackgroundOverlay.d.ts +7 -7
- package/es/view/overlay/BackgroundOverlay.js +31 -0
- package/es/view/overlay/BackgroundOverlay.js.map +1 -0
- package/es/view/overlay/BezierAdjustOverlay.d.ts +31 -0
- package/es/view/overlay/BezierAdjustOverlay.js +142 -0
- package/es/view/overlay/BezierAdjustOverlay.js.map +1 -0
- package/{types → es}/view/overlay/CanvasOverlay.d.ts +8 -11
- package/es/view/overlay/CanvasOverlay.js +172 -0
- package/es/view/overlay/CanvasOverlay.js.map +1 -0
- package/es/view/overlay/Grid.d.ts +45 -0
- package/es/view/overlay/Grid.js +127 -0
- package/es/view/overlay/Grid.js.map +1 -0
- package/es/view/overlay/ModificationOverlay.d.ts +9 -0
- package/es/view/overlay/ModificationOverlay.js +43 -0
- package/es/view/overlay/ModificationOverlay.js.map +1 -0
- package/es/view/overlay/OutlineOverlay.d.ts +14 -0
- package/es/view/overlay/OutlineOverlay.js +134 -0
- package/es/view/overlay/OutlineOverlay.js.map +1 -0
- package/es/view/overlay/SnaplineOverlay.d.ts +10 -0
- package/es/view/overlay/SnaplineOverlay.js +60 -0
- package/es/view/overlay/SnaplineOverlay.js.map +1 -0
- package/es/view/overlay/ToolOverlay.d.ts +19 -0
- package/es/view/overlay/ToolOverlay.js +76 -0
- package/es/view/overlay/ToolOverlay.js.map +1 -0
- package/{types → es}/view/overlay/getTransformHoc.d.ts +17 -14
- package/es/view/overlay/getTransformHoc.js +57 -0
- package/es/view/overlay/getTransformHoc.js.map +1 -0
- package/es/view/overlay/index.d.ts +8 -0
- package/es/view/overlay/index.js +9 -0
- package/es/view/overlay/index.js.map +1 -0
- package/es/view/shape/Circle.d.ts +2 -0
- package/es/view/shape/Circle.js +57 -0
- package/es/view/shape/Circle.js.map +1 -0
- package/es/view/shape/Ellipse.d.ts +2 -0
- package/es/view/shape/Ellipse.js +58 -0
- package/es/view/shape/Ellipse.js.map +1 -0
- package/es/view/shape/Line.d.ts +2 -0
- package/es/view/shape/Line.js +54 -0
- package/es/view/shape/Line.js.map +1 -0
- package/es/view/shape/Path.d.ts +6 -0
- package/es/view/shape/Path.js +43 -0
- package/es/view/shape/Path.js.map +1 -0
- package/es/view/shape/Polygon.d.ts +8 -0
- package/es/view/shape/Polygon.js +56 -0
- package/es/view/shape/Polygon.js.map +1 -0
- package/es/view/shape/Polyline.d.ts +2 -0
- package/es/view/shape/Polyline.js +49 -0
- package/es/view/shape/Polyline.js.map +1 -0
- package/es/view/shape/Rect.d.ts +15 -0
- package/es/view/shape/Rect.js +60 -0
- package/es/view/shape/Rect.js.map +1 -0
- package/es/view/shape/Text.d.ts +2 -0
- package/es/view/shape/Text.js +110 -0
- package/es/view/shape/Text.js.map +1 -0
- package/es/view/shape/index.d.ts +8 -0
- package/es/view/shape/index.js +9 -0
- package/es/view/shape/index.js.map +1 -0
- package/es/view/text/BaseText.d.ts +25 -0
- package/es/view/text/BaseText.js +114 -0
- package/es/view/text/BaseText.js.map +1 -0
- package/es/view/text/LineText.d.ts +9 -0
- package/es/view/text/LineText.js +149 -0
- package/es/view/text/LineText.js.map +1 -0
- package/es/view/text/index.d.ts +2 -0
- package/es/view/text/index.js +3 -0
- package/es/view/text/index.js.map +1 -0
- package/lib/LogicFlow.d.ts +966 -0
- package/lib/LogicFlow.js +1203 -0
- package/lib/LogicFlow.js.map +1 -0
- package/lib/algorithm/edge.d.ts +15 -0
- package/lib/algorithm/edge.js +62 -0
- package/lib/algorithm/edge.js.map +1 -0
- package/lib/algorithm/index.d.ts +6 -0
- package/lib/algorithm/index.js +75 -0
- package/lib/algorithm/index.js.map +1 -0
- package/lib/algorithm/outline.d.ts +7 -0
- package/lib/algorithm/outline.js +69 -0
- package/lib/algorithm/outline.js.map +1 -0
- package/lib/constant/index.d.ts +102 -0
- package/lib/constant/index.js +120 -0
- package/lib/constant/index.js.map +1 -0
- package/lib/event/eventArgs.d.ts +428 -0
- package/lib/event/eventArgs.js +3 -0
- package/lib/event/eventArgs.js.map +1 -0
- package/lib/event/eventEmitter.d.ts +48 -0
- package/lib/event/eventEmitter.js +95 -0
- package/lib/event/eventEmitter.js.map +1 -0
- package/lib/history/index.d.ts +23 -0
- package/lib/history/index.js +114 -0
- package/lib/history/index.js.map +1 -0
- package/lib/index.css +210 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +58 -0
- package/lib/index.js.map +1 -0
- package/lib/index.less +1 -0
- package/lib/keyboard/index.d.ts +31 -0
- package/lib/keyboard/index.js +93 -0
- package/lib/keyboard/index.js.map +1 -0
- package/lib/keyboard/shortcut.d.ts +3 -0
- package/lib/keyboard/shortcut.js +120 -0
- package/lib/keyboard/shortcut.js.map +1 -0
- package/lib/model/BaseModel.d.ts +181 -0
- package/lib/model/BaseModel.js +3 -0
- package/lib/model/BaseModel.js.map +1 -0
- package/lib/model/EditConfigModel.d.ts +114 -0
- package/lib/model/EditConfigModel.js +195 -0
- package/lib/model/EditConfigModel.js.map +1 -0
- package/lib/model/GraphModel.d.ts +426 -0
- package/lib/model/GraphModel.js +1479 -0
- package/lib/model/GraphModel.js.map +1 -0
- package/lib/model/SnaplineModel.d.ts +34 -0
- package/lib/model/SnaplineModel.js +220 -0
- package/lib/model/SnaplineModel.js.map +1 -0
- package/lib/model/TransformModel.d.ts +101 -0
- package/lib/model/TransformModel.js +243 -0
- package/lib/model/TransformModel.js.map +1 -0
- package/lib/model/edge/BaseEdgeModel.d.ts +270 -0
- package/lib/model/edge/BaseEdgeModel.js +742 -0
- package/lib/model/edge/BaseEdgeModel.js.map +1 -0
- package/lib/model/edge/BezierEdgeModel.d.ts +63 -0
- package/lib/model/edge/BezierEdgeModel.js +250 -0
- package/lib/model/edge/BezierEdgeModel.js.map +1 -0
- package/lib/model/edge/LineEdgeModel.d.ts +19 -0
- package/lib/model/edge/LineEdgeModel.js +83 -0
- package/lib/model/edge/LineEdgeModel.js.map +1 -0
- package/lib/model/edge/PolylineEdgeModel.d.ts +85 -0
- package/lib/model/edge/PolylineEdgeModel.js +596 -0
- package/lib/model/edge/PolylineEdgeModel.js.map +1 -0
- package/lib/model/edge/index.d.ts +4 -0
- package/lib/model/edge/index.js +21 -0
- package/lib/model/edge/index.js.map +1 -0
- package/lib/model/index.d.ts +7 -0
- package/lib/model/index.js +24 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/node/BaseNodeModel.d.ts +260 -0
- package/lib/model/node/BaseNodeModel.js +886 -0
- package/lib/model/node/BaseNodeModel.js.map +1 -0
- package/lib/model/node/CircleNodeModel.d.ts +40 -0
- package/lib/model/node/CircleNodeModel.js +116 -0
- package/lib/model/node/CircleNodeModel.js.map +1 -0
- package/lib/model/node/DiamondNodeModel.d.ts +46 -0
- package/lib/model/node/DiamondNodeModel.js +193 -0
- package/lib/model/node/DiamondNodeModel.js.map +1 -0
- package/lib/model/node/EllipseNodeModel.d.ts +42 -0
- package/lib/model/node/EllipseNodeModel.js +124 -0
- package/lib/model/node/EllipseNodeModel.js.map +1 -0
- package/lib/model/node/HtmlNodeModel.d.ts +21 -0
- package/lib/model/node/HtmlNodeModel.js +65 -0
- package/lib/model/node/HtmlNodeModel.js.map +1 -0
- package/lib/model/node/PolygonNodeModel.d.ts +50 -0
- package/lib/model/node/PolygonNodeModel.js +202 -0
- package/lib/model/node/PolygonNodeModel.js.map +1 -0
- package/lib/model/node/RectNodeModel.d.ts +34 -0
- package/lib/model/node/RectNodeModel.js +86 -0
- package/lib/model/node/RectNodeModel.js.map +1 -0
- package/lib/model/node/TextNodeModel.d.ts +27 -0
- package/lib/model/node/TextNodeModel.js +119 -0
- package/lib/model/node/TextNodeModel.js.map +1 -0
- package/lib/model/node/index.d.ts +8 -0
- package/lib/model/node/index.js +25 -0
- package/lib/model/node/index.js.map +1 -0
- package/lib/options.d.ts +80 -0
- package/lib/options.js +47 -0
- package/lib/options.js.map +1 -0
- package/lib/style/index.css +210 -0
- package/lib/style/index.less +256 -0
- package/lib/style/raw.d.ts +4 -0
- package/lib/style/raw.js +9 -0
- package/lib/style/raw.js.map +1 -0
- package/lib/tool/MultipleSelectTool.d.ts +13 -0
- package/lib/tool/MultipleSelectTool.js +161 -0
- package/lib/tool/MultipleSelectTool.js.map +1 -0
- package/lib/tool/TextEditTool.d.ts +26 -0
- package/lib/tool/TextEditTool.js +190 -0
- package/lib/tool/TextEditTool.js.map +1 -0
- package/lib/tool/index.d.ts +2 -0
- package/lib/tool/index.js +19 -0
- package/lib/tool/index.js.map +1 -0
- package/lib/tool/snapline.d.ts +3 -0
- package/lib/tool/snapline.js +17 -0
- package/lib/tool/snapline.js.map +1 -0
- package/lib/tool/tool.d.ts +22 -0
- package/lib/tool/tool.js +49 -0
- package/lib/tool/tool.js.map +1 -0
- package/lib/util/animation.d.ts +12 -0
- package/lib/util/animation.js +24 -0
- package/lib/util/animation.js.map +1 -0
- package/lib/util/browser.d.ts +1 -0
- package/lib/util/browser.js +6 -0
- package/lib/util/browser.js.map +1 -0
- package/lib/util/compatible.d.ts +6 -0
- package/lib/util/compatible.js +21 -0
- package/lib/util/compatible.js.map +1 -0
- package/lib/util/drag.d.ts +47 -0
- package/lib/util/drag.js +142 -0
- package/lib/util/drag.js.map +1 -0
- package/lib/util/edge.d.ts +94 -0
- package/lib/util/edge.js +879 -0
- package/lib/util/edge.js.map +1 -0
- package/lib/util/geometry.d.ts +11 -0
- package/lib/util/geometry.js +78 -0
- package/lib/util/geometry.js.map +1 -0
- package/lib/util/graph.d.ts +13 -0
- package/lib/util/graph.js +59 -0
- package/lib/util/graph.js.map +1 -0
- package/lib/util/index.d.ts +16 -0
- package/lib/util/index.js +33 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/matrix.d.ts +32 -0
- package/lib/util/matrix.js +164 -0
- package/lib/util/matrix.js.map +1 -0
- package/lib/util/mobx.d.ts +2 -0
- package/lib/util/mobx.js +13 -0
- package/lib/util/mobx.js.map +1 -0
- package/lib/util/node.d.ts +69 -0
- package/lib/util/node.js +424 -0
- package/lib/util/node.js.map +1 -0
- package/lib/util/raf.d.ts +2 -0
- package/lib/util/raf.js +29 -0
- package/lib/util/raf.js.map +1 -0
- package/lib/util/sampling.d.ts +6 -0
- package/lib/util/sampling.js +72 -0
- package/lib/util/sampling.js.map +1 -0
- package/lib/util/theme.d.ts +4 -0
- package/lib/util/theme.js +160 -0
- package/lib/util/theme.js.map +1 -0
- package/lib/util/uuid.d.ts +7 -0
- package/lib/util/uuid.js +25 -0
- package/lib/util/uuid.js.map +1 -0
- package/lib/util/vector.d.ts +23 -0
- package/lib/util/vector.js +101 -0
- package/lib/util/vector.js.map +1 -0
- package/lib/util/zIndex.d.ts +2 -0
- package/lib/util/zIndex.js +10 -0
- package/lib/util/zIndex.js.map +1 -0
- package/lib/view/Anchor.d.ts +47 -0
- package/lib/view/Anchor.js +317 -0
- package/lib/view/Anchor.js.map +1 -0
- package/lib/view/Control.d.ts +100 -0
- package/lib/view/Control.js +327 -0
- package/lib/view/Control.js.map +1 -0
- package/lib/view/Graph.d.ts +18 -0
- package/lib/view/Graph.js +79 -0
- package/lib/view/Graph.js.map +1 -0
- package/lib/view/Rotate.d.ts +21 -0
- package/lib/view/Rotate.js +113 -0
- package/lib/view/Rotate.js.map +1 -0
- package/lib/view/behavior/dnd.d.ts +27 -0
- package/lib/view/behavior/dnd.js +113 -0
- package/lib/view/behavior/dnd.js.map +1 -0
- package/lib/view/edge/AdjustPoint.d.ts +50 -0
- package/lib/view/edge/AdjustPoint.js +371 -0
- package/lib/view/edge/AdjustPoint.js.map +1 -0
- package/lib/view/edge/Arrow.d.ts +25 -0
- package/lib/view/edge/Arrow.js +63 -0
- package/lib/view/edge/Arrow.js.map +1 -0
- package/lib/view/edge/BaseEdge.d.ts +148 -0
- package/lib/view/edge/BaseEdge.js +407 -0
- package/lib/view/edge/BaseEdge.js.map +1 -0
- package/lib/view/edge/BezierEdge.d.ts +26 -0
- package/lib/view/edge/BezierEdge.js +124 -0
- package/lib/view/edge/BezierEdge.js.map +1 -0
- package/{types/view/edge/BezierEdge.d.ts → lib/view/edge/LineEdge.d.ts} +9 -10
- package/lib/view/edge/LineEdge.js +84 -0
- package/lib/view/edge/LineEdge.js.map +1 -0
- package/lib/view/edge/PolylineEdge.d.ts +55 -0
- package/lib/view/edge/PolylineEdge.js +280 -0
- package/lib/view/edge/PolylineEdge.js.map +1 -0
- package/lib/view/edge/index.d.ts +6 -0
- package/lib/view/edge/index.js +23 -0
- package/lib/view/edge/index.js.map +1 -0
- package/lib/view/index.d.ts +7 -0
- package/lib/view/index.js +24 -0
- package/lib/view/index.js.map +1 -0
- package/lib/view/node/BaseNode.d.ts +49 -0
- package/lib/view/node/BaseNode.js +424 -0
- package/lib/view/node/BaseNode.js.map +1 -0
- package/lib/view/node/CircleNode.d.ts +10 -0
- package/lib/view/node/CircleNode.js +51 -0
- package/lib/view/node/CircleNode.js.map +1 -0
- package/lib/view/node/DiamondNode.d.ts +10 -0
- package/lib/view/node/DiamondNode.js +50 -0
- package/lib/view/node/DiamondNode.js.map +1 -0
- package/lib/view/node/EllipseNode.d.ts +10 -0
- package/lib/view/node/EllipseNode.js +50 -0
- package/lib/view/node/EllipseNode.js.map +1 -0
- package/lib/view/node/HtmlNode.d.ts +38 -0
- package/lib/view/node/HtmlNode.js +135 -0
- package/lib/view/node/HtmlNode.js.map +1 -0
- package/lib/view/node/PolygonNode.d.ts +10 -0
- package/lib/view/node/PolygonNode.js +54 -0
- package/lib/view/node/PolygonNode.js.map +1 -0
- package/lib/view/node/RectNode.d.ts +11 -0
- package/lib/view/node/RectNode.js +50 -0
- package/lib/view/node/RectNode.js.map +1 -0
- package/lib/view/node/TextNode.d.ts +12 -0
- package/lib/view/node/TextNode.js +61 -0
- package/lib/view/node/TextNode.js.map +1 -0
- package/lib/view/node/index.d.ts +8 -0
- package/lib/view/node/index.js +25 -0
- package/lib/view/node/index.js.map +1 -0
- package/lib/view/overlay/BackgroundOverlay.d.ts +28 -0
- package/lib/view/overlay/BackgroundOverlay.js +34 -0
- package/lib/view/overlay/BackgroundOverlay.js.map +1 -0
- package/lib/view/overlay/BezierAdjustOverlay.d.ts +31 -0
- package/lib/view/overlay/BezierAdjustOverlay.js +145 -0
- package/lib/view/overlay/BezierAdjustOverlay.js.map +1 -0
- package/lib/view/overlay/CanvasOverlay.d.ts +25 -0
- package/lib/view/overlay/CanvasOverlay.js +175 -0
- package/lib/view/overlay/CanvasOverlay.js.map +1 -0
- package/lib/view/overlay/Grid.d.ts +45 -0
- package/lib/view/overlay/Grid.js +130 -0
- package/lib/view/overlay/Grid.js.map +1 -0
- package/lib/view/overlay/ModificationOverlay.d.ts +9 -0
- package/lib/view/overlay/ModificationOverlay.js +46 -0
- package/lib/view/overlay/ModificationOverlay.js.map +1 -0
- package/lib/view/overlay/OutlineOverlay.d.ts +14 -0
- package/lib/view/overlay/OutlineOverlay.js +137 -0
- package/lib/view/overlay/OutlineOverlay.js.map +1 -0
- package/lib/view/overlay/SnaplineOverlay.d.ts +10 -0
- package/lib/view/overlay/SnaplineOverlay.js +66 -0
- package/lib/view/overlay/SnaplineOverlay.js.map +1 -0
- package/lib/view/overlay/ToolOverlay.d.ts +19 -0
- package/lib/view/overlay/ToolOverlay.js +79 -0
- package/lib/view/overlay/ToolOverlay.js.map +1 -0
- package/lib/view/overlay/getTransformHoc.d.ts +37 -0
- package/lib/view/overlay/getTransformHoc.js +61 -0
- package/lib/view/overlay/getTransformHoc.js.map +1 -0
- package/lib/view/overlay/index.d.ts +8 -0
- package/lib/view/overlay/index.js +25 -0
- package/lib/view/overlay/index.js.map +1 -0
- package/lib/view/shape/Circle.d.ts +2 -0
- package/lib/view/shape/Circle.js +61 -0
- package/lib/view/shape/Circle.js.map +1 -0
- package/lib/view/shape/Ellipse.d.ts +2 -0
- package/lib/view/shape/Ellipse.js +62 -0
- package/lib/view/shape/Ellipse.js.map +1 -0
- package/lib/view/shape/Line.d.ts +2 -0
- package/lib/view/shape/Line.js +58 -0
- package/lib/view/shape/Line.js.map +1 -0
- package/lib/view/shape/Path.d.ts +6 -0
- package/lib/view/shape/Path.js +47 -0
- package/lib/view/shape/Path.js.map +1 -0
- package/lib/view/shape/Polygon.d.ts +8 -0
- package/lib/view/shape/Polygon.js +60 -0
- package/lib/view/shape/Polygon.js.map +1 -0
- package/lib/view/shape/Polyline.d.ts +2 -0
- package/lib/view/shape/Polyline.js +53 -0
- package/lib/view/shape/Polyline.js.map +1 -0
- package/lib/view/shape/Rect.d.ts +15 -0
- package/lib/view/shape/Rect.js +64 -0
- package/lib/view/shape/Rect.js.map +1 -0
- package/lib/view/shape/Text.d.ts +2 -0
- package/lib/view/shape/Text.js +114 -0
- package/lib/view/shape/Text.js.map +1 -0
- package/lib/view/shape/index.d.ts +8 -0
- package/lib/view/shape/index.js +25 -0
- package/lib/view/shape/index.js.map +1 -0
- package/lib/view/text/BaseText.d.ts +25 -0
- package/lib/view/text/BaseText.js +117 -0
- package/lib/view/text/BaseText.js.map +1 -0
- package/lib/view/text/LineText.d.ts +9 -0
- package/lib/view/text/LineText.js +155 -0
- package/lib/view/text/LineText.js.map +1 -0
- package/lib/view/text/index.d.ts +2 -0
- package/lib/view/text/index.js +19 -0
- package/lib/view/text/index.js.map +1 -0
- package/package.json +41 -88
- package/rollup.config.js +15 -0
- package/src/LogicFlow.tsx +1831 -0
- package/src/algorithm/edge.ts +68 -0
- package/src/algorithm/index.ts +68 -0
- package/src/algorithm/outline.ts +77 -0
- package/src/constant/index.ts +127 -0
- package/src/event/event.md +66 -0
- package/src/event/eventArgs.ts +476 -0
- package/src/event/eventEmitter.ts +153 -0
- package/src/history/index.ts +112 -0
- package/src/index.less +1 -0
- package/src/index.ts +21 -0
- package/src/keyboard/index.ts +106 -0
- package/src/keyboard/shortcut.ts +123 -0
- package/src/model/BaseModel.ts +223 -0
- package/src/model/EditConfigModel.ts +215 -0
- package/src/model/GraphModel.ts +1516 -0
- package/src/model/SnaplineModel.ts +238 -0
- package/src/model/TransformModel.ts +258 -0
- package/src/model/edge/BaseEdgeModel.ts +720 -0
- package/src/model/edge/BezierEdgeModel.ts +196 -0
- package/src/model/edge/LineEdgeModel.ts +26 -0
- package/src/model/edge/PolylineEdgeModel.ts +656 -0
- package/src/model/edge/index.ts +4 -0
- package/src/model/index.ts +8 -0
- package/src/model/node/BaseNodeModel.ts +839 -0
- package/src/model/node/CircleNodeModel.ts +89 -0
- package/src/model/node/DiamondNodeModel.ts +128 -0
- package/src/model/node/EllipseNodeModel.ts +94 -0
- package/src/model/node/HtmlNodeModel.ts +49 -0
- package/src/model/node/PolygonNodeModel.ts +147 -0
- package/src/model/node/RectNodeModel.ts +57 -0
- package/src/model/node/TextNodeModel.ts +41 -0
- package/src/model/node/index.ts +8 -0
- package/src/options.ts +142 -0
- package/src/style/index.less +256 -0
- package/src/style/raw.ts +217 -0
- package/src/tool/MultipleSelectTool.tsx +132 -0
- package/src/tool/TextEditTool.tsx +193 -0
- package/src/tool/index.ts +2 -0
- package/src/tool/snapline.ts +17 -0
- package/src/tool/tool.ts +66 -0
- package/src/typings.d.ts +5 -0
- package/src/util/animation.ts +29 -0
- package/src/util/browser.ts +4 -0
- package/src/util/compatible.ts +15 -0
- package/src/util/drag.ts +186 -0
- package/src/util/edge.ts +1034 -0
- package/src/util/geometry.ts +53 -0
- package/src/util/graph.ts +46 -0
- package/src/util/index.ts +16 -0
- package/src/util/matrix.ts +129 -0
- package/src/util/mobx.ts +23 -0
- package/src/util/node.ts +519 -0
- package/src/util/raf.ts +28 -0
- package/src/util/sampling.ts +85 -0
- package/src/util/theme.ts +180 -0
- package/src/util/uuid.ts +26 -0
- package/src/util/vector.ts +93 -0
- package/src/util/zIndex.ts +6 -0
- package/src/view/Anchor.tsx +407 -0
- package/src/view/Control.tsx +446 -0
- package/src/view/Graph.tsx +104 -0
- package/src/view/Rotate.tsx +112 -0
- package/src/view/behavior/dnd.ts +116 -0
- package/src/view/edge/AdjustPoint.tsx +439 -0
- package/src/view/edge/Arrow.tsx +54 -0
- package/src/view/edge/BaseEdge.tsx +489 -0
- package/src/view/edge/BezierEdge.tsx +101 -0
- package/src/view/edge/LineEdge.tsx +81 -0
- package/src/view/edge/PolylineEdge.tsx +299 -0
- package/src/view/edge/index.ts +6 -0
- package/src/view/index.ts +8 -0
- package/src/view/node/BaseNode.tsx +494 -0
- package/src/view/node/CircleNode.tsx +19 -0
- package/src/view/node/DiamondNode.tsx +22 -0
- package/src/view/node/EllipseNode.tsx +20 -0
- package/src/view/node/HtmlNode.tsx +92 -0
- package/src/view/node/PolygonNode.tsx +26 -0
- package/src/view/node/RectNode.tsx +28 -0
- package/src/view/node/TextNode.tsx +37 -0
- package/src/view/node/index.ts +8 -0
- package/src/view/overlay/BackgroundOverlay.tsx +39 -0
- package/src/view/overlay/BezierAdjustOverlay.tsx +150 -0
- package/src/view/overlay/CanvasOverlay.tsx +180 -0
- package/src/view/overlay/Grid.tsx +157 -0
- package/src/view/overlay/ModificationOverlay.tsx +31 -0
- package/src/view/overlay/OutlineOverlay.tsx +170 -0
- package/src/view/overlay/SnaplineOverlay.tsx +44 -0
- package/src/view/overlay/ToolOverlay.tsx +65 -0
- package/src/view/overlay/getTransformHoc.tsx +50 -0
- package/src/view/overlay/index.ts +8 -0
- package/src/view/shape/Circle.tsx +27 -0
- package/src/view/shape/Ellipse.tsx +28 -0
- package/src/view/shape/Line.tsx +24 -0
- package/src/view/shape/Path.tsx +19 -0
- package/src/view/shape/Polygon.tsx +36 -0
- package/src/view/shape/Polyline.tsx +19 -0
- package/src/view/shape/Rect.tsx +44 -0
- package/src/view/shape/Text.tsx +138 -0
- package/src/view/shape/index.ts +8 -0
- package/src/view/text/BaseText.tsx +96 -0
- package/src/view/text/LineText.tsx +154 -0
- package/src/view/text/index.ts +2 -0
- package/tsconfig.json +18 -0
- package/dist/entry.js +0 -7
- package/dist/logic-flow.js +0 -23
- package/dist/logic-flow.min.js +0 -23
- package/types/LogicFlow.d.ts +0 -581
- package/types/algorithm/edge.d.ts +0 -6
- package/types/algorithm/outline.d.ts +0 -35
- package/types/constant/DefaultAnimation.d.ts +0 -12
- package/types/constant/DefaultTheme.d.ts +0 -270
- package/types/event/eventEmitter.d.ts +0 -36
- package/types/history/History.d.ts +0 -20
- package/types/model/BaseModel.d.ts +0 -99
- package/types/model/SnaplineModel.d.ts +0 -33
- package/types/model/edge/BezierEdgeModel.d.ts +0 -51
- package/types/model/edge/LineEdgeModel.d.ts +0 -14
- package/types/model/edge/PolylineEdgeModel.d.ts +0 -63
- package/types/model/node/BaseNodeModel.d.ts +0 -232
- package/types/model/node/CircleNodeModel.d.ts +0 -21
- package/types/model/node/DiamondNodeModel.d.ts +0 -25
- package/types/model/node/EllipseNodeModel.d.ts +0 -22
- package/types/model/node/HtmlNodeModel.d.ts +0 -12
- package/types/model/node/PolygonNodeModel.d.ts +0 -28
- package/types/model/node/RectNodeModel.d.ts +0 -19
- package/types/model/node/TextNodeModel.d.ts +0 -19
- package/types/options.d.ts +0 -240
- package/types/tool/MultipleSelectTool.d.ts +0 -20
- package/types/tool/TextEditTool.d.ts +0 -34
- package/types/tool/index.d.ts +0 -13
- package/types/type/index.d.ts +0 -429
- package/types/util/animation.d.ts +0 -2
- package/types/util/compatible.d.ts +0 -1
- package/types/util/drag.d.ts +0 -38
- package/types/util/edge.d.ts +0 -108
- package/types/util/geometry.d.ts +0 -2
- package/types/util/index.d.ts +0 -7
- package/types/util/node.d.ts +0 -66
- package/types/util/raf.d.ts +0 -2
- package/types/util/theme.d.ts +0 -2
- package/types/util/uuid.d.ts +0 -6
- package/types/view/Anchor.d.ts +0 -54
- package/types/view/Graph.d.ts +0 -21
- package/types/view/basic-shape/Circle.d.ts +0 -2
- package/types/view/basic-shape/Ellipse.d.ts +0 -2
- package/types/view/basic-shape/Line.d.ts +0 -3
- package/types/view/basic-shape/LinearGradient.d.ts +0 -1
- package/types/view/basic-shape/Path.d.ts +0 -7
- package/types/view/basic-shape/Polygon.d.ts +0 -2
- package/types/view/basic-shape/Polyline.d.ts +0 -3
- package/types/view/basic-shape/Rect.d.ts +0 -14
- package/types/view/basic-shape/Text.d.ts +0 -2
- package/types/view/behavior/DnD.d.ts +0 -35
- package/types/view/behavior/Transform.d.ts +0 -4
- package/types/view/edge/AdjustPoint.d.ts +0 -56
- package/types/view/edge/Arrow.d.ts +0 -24
- package/types/view/edge/index.d.ts +0 -6
- package/types/view/index.d.ts +0 -2
- package/types/view/node/BaseNode.d.ts +0 -57
- package/types/view/node/CircleNode.d.ts +0 -5
- package/types/view/node/DiamondNode.d.ts +0 -5
- package/types/view/node/EllipseNode.d.ts +0 -5
- package/types/view/node/PolygonNode.d.ts +0 -5
- package/types/view/node/RectNode.d.ts +0 -5
- package/types/view/node/TextNode.d.ts +0 -6
- package/types/view/node/index.d.ts +0 -9
- package/types/view/overlay/BezierAdjustOverlay.d.ts +0 -12
- package/types/view/overlay/Grid.d.ts +0 -30
- package/types/view/overlay/HtmlOverlay.d.ts +0 -15
- package/types/view/overlay/ModificationOverlay.d.ts +0 -9
- package/types/view/overlay/OutlineOverlay.d.ts +0 -17
- package/types/view/overlay/SnaplineOverlay.d.ts +0 -9
- package/types/view/overlay/ToolOverlay.d.ts +0 -17
- package/types/view/text/BaseText.d.ts +0 -29
- package/types/view/text/LineText.d.ts +0 -9
- /package/{types → es}/algorithm/index.d.ts +0 -0
- /package/{types → es}/keyboard/shortcut.d.ts +0 -0
- /package/{types → es}/model/edge/index.d.ts +0 -0
- /package/{types → es}/model/index.d.ts +0 -0
- /package/{types → es}/model/node/index.d.ts +0 -0
- /package/{types → es}/util/browser.d.ts +0 -0
- /package/{types → es}/util/mobx.d.ts +0 -0
- /package/{types → es}/util/zIndex.d.ts +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
import BaseNodeModel from './BaseNodeModel';
|
|
23
|
+
import { ModelType } from '../../constant';
|
|
24
|
+
import { observable } from 'mobx';
|
|
25
|
+
var HtmlNodeModel = /** @class */ (function (_super) {
|
|
26
|
+
__extends(HtmlNodeModel, _super);
|
|
27
|
+
function HtmlNodeModel(data, graphModel) {
|
|
28
|
+
var _this = _super.call(this, data, graphModel) || this;
|
|
29
|
+
_this.modelType = ModelType.HTML_NODE;
|
|
30
|
+
_this.properties = {};
|
|
31
|
+
_this.properties = data.properties || {};
|
|
32
|
+
_this.setAttributes();
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
HtmlNodeModel.prototype.setAttributes = function () {
|
|
36
|
+
_super.prototype.setAttributes.call(this);
|
|
37
|
+
var _a = this.properties, width = _a.width, height = _a.height;
|
|
38
|
+
if (width)
|
|
39
|
+
this.width = width;
|
|
40
|
+
if (height)
|
|
41
|
+
this.height = height;
|
|
42
|
+
};
|
|
43
|
+
HtmlNodeModel.prototype.getDefaultAnchor = function () {
|
|
44
|
+
var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
45
|
+
return [
|
|
46
|
+
{ x: x, y: y - height / 2, id: "".concat(this.id, "_0") },
|
|
47
|
+
{ x: x + width / 2, y: y, id: "".concat(this.id, "_1") },
|
|
48
|
+
{ x: x, y: y + height / 2, id: "".concat(this.id, "_2") },
|
|
49
|
+
{ x: x - width / 2, y: y, id: "".concat(this.id, "_3") },
|
|
50
|
+
];
|
|
51
|
+
};
|
|
52
|
+
__decorate([
|
|
53
|
+
observable
|
|
54
|
+
], HtmlNodeModel.prototype, "properties", void 0);
|
|
55
|
+
return HtmlNodeModel;
|
|
56
|
+
}(BaseNodeModel));
|
|
57
|
+
export { HtmlNodeModel };
|
|
58
|
+
export default HtmlNodeModel;
|
|
59
|
+
//# sourceMappingURL=HtmlNodeModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlNodeModel.js","sourceRoot":"","sources":["../../../src/model/node/HtmlNodeModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAajC;IAAmC,iCAAa;IAI9C,uBAAY,IAA0B,EAAE,UAAsB;QAC5D,YAAA,MAAK,YAAC,IAAI,EAAE,UAAU,CAAC,SAAA;QAJzB,eAAS,GAAG,SAAS,CAAC,SAAS,CAAA;QACnB,gBAAU,GAAmB,EAAE,CAAA;QAIzC,KAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAA;QAEvC,KAAI,CAAC,aAAa,EAAE,CAAA;;IACtB,CAAC;IAED,qCAAa,GAAb;QACE,gBAAK,CAAC,aAAa,WAAE,CAAA;QAEf,IAAA,KAAoB,IAAI,CAAC,UAAU,EAAjC,KAAK,WAAA,EAAE,MAAM,YAAoB,CAAA;QACzC,IAAI,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAC7B,IAAI,MAAM;YAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IAClC,CAAC;IAED,wCAAgB,GAAhB;QACQ,IAAA,KAA0B,IAAI,EAA5B,CAAC,OAAA,EAAE,CAAC,OAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAS,CAAA;QACpC,OAAO;YACL,EAAE,CAAC,GAAA,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;YAC5C,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAA,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;YAC3C,EAAE,CAAC,GAAA,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;YAC5C,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAA,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;SAC5C,CAAA;IACH,CAAC;IAzBW;QAAX,UAAU;qDAAgC;IA0B7C,oBAAC;CAAA,AA5BD,CAAmC,aAAa,GA4B/C;SA5BY,aAAa;AA8B1B,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import BaseNodeModel from './BaseNodeModel';
|
|
2
|
+
import GraphModel from '../GraphModel';
|
|
3
|
+
import LogicFlow from '../../LogicFlow';
|
|
4
|
+
import { ModelType } from '../../constant';
|
|
5
|
+
import { ResizeControl } from '../../view/Control';
|
|
6
|
+
import Point = LogicFlow.Point;
|
|
7
|
+
import PointTuple = LogicFlow.PointTuple;
|
|
8
|
+
import NodeConfig = LogicFlow.NodeConfig;
|
|
9
|
+
import ResizeInfo = ResizeControl.ResizeInfo;
|
|
10
|
+
import ResizeNodeData = ResizeControl.ResizeNodeData;
|
|
11
|
+
export type IPolygonNodeProperties = {
|
|
12
|
+
points?: PointTuple[];
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
style?: LogicFlow.CommonTheme;
|
|
16
|
+
textStyle?: LogicFlow.CommonTheme;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
export declare class PolygonNodeModel extends BaseNodeModel {
|
|
20
|
+
modelType: ModelType;
|
|
21
|
+
points: PointTuple[];
|
|
22
|
+
properties: IPolygonNodeProperties;
|
|
23
|
+
constructor(data: NodeConfig, graphModel: GraphModel);
|
|
24
|
+
setAttributes(): void;
|
|
25
|
+
getNodeStyle(): {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
fill?: string | undefined;
|
|
28
|
+
stroke?: string | undefined;
|
|
29
|
+
strokeWidth?: number | undefined;
|
|
30
|
+
radius?: number | undefined;
|
|
31
|
+
rx?: number | undefined;
|
|
32
|
+
ry?: number | undefined;
|
|
33
|
+
path?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 由于大多数情况下,我们初始化拿到的多边形坐标都是基于原点的(例如绘图工具到处的svg)。
|
|
37
|
+
* 在logicflow中对多边形进行移动,我们不需要去更新points,
|
|
38
|
+
* 而是去更新多边形中心点即可。
|
|
39
|
+
*/
|
|
40
|
+
get pointsPosition(): Point[];
|
|
41
|
+
get width(): number;
|
|
42
|
+
get height(): number;
|
|
43
|
+
getDefaultAnchor(): {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
id: string;
|
|
47
|
+
}[];
|
|
48
|
+
resize(resizeInfo: ResizeInfo): ResizeNodeData;
|
|
49
|
+
}
|
|
50
|
+
export default PolygonNodeModel;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
28
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
30
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32
|
+
};
|
|
33
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
34
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
35
|
+
if (!m) return o;
|
|
36
|
+
var i = m.call(o), r, ar = [], e;
|
|
37
|
+
try {
|
|
38
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
39
|
+
}
|
|
40
|
+
catch (error) { e = { error: error }; }
|
|
41
|
+
finally {
|
|
42
|
+
try {
|
|
43
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
44
|
+
}
|
|
45
|
+
finally { if (e) throw e.error; }
|
|
46
|
+
}
|
|
47
|
+
return ar;
|
|
48
|
+
};
|
|
49
|
+
import { cloneDeep, map } from 'lodash-es';
|
|
50
|
+
import { computed, observable } from 'mobx';
|
|
51
|
+
import BaseNodeModel from './BaseNodeModel';
|
|
52
|
+
import { ModelType } from '../../constant';
|
|
53
|
+
import { normalizePolygon } from '../../util';
|
|
54
|
+
var PolygonNodeModel = /** @class */ (function (_super) {
|
|
55
|
+
__extends(PolygonNodeModel, _super);
|
|
56
|
+
function PolygonNodeModel(data, graphModel) {
|
|
57
|
+
var _this = _super.call(this, data, graphModel) || this;
|
|
58
|
+
_this.modelType = ModelType.POLYGON_NODE;
|
|
59
|
+
_this.points = [
|
|
60
|
+
[50, 0],
|
|
61
|
+
[100, 50],
|
|
62
|
+
[50, 100],
|
|
63
|
+
[0, 50], // 菱形
|
|
64
|
+
// [0,100], [50,25], [50,75], [100,0] // 闪电
|
|
65
|
+
// [100, 10],
|
|
66
|
+
// [40, 198],
|
|
67
|
+
// [190, 78],
|
|
68
|
+
// [10, 78],
|
|
69
|
+
// [160, 198], // 五角星
|
|
70
|
+
];
|
|
71
|
+
_this.properties = {};
|
|
72
|
+
_this.properties = data.properties || {};
|
|
73
|
+
_this.setAttributes();
|
|
74
|
+
return _this;
|
|
75
|
+
}
|
|
76
|
+
PolygonNodeModel.prototype.setAttributes = function () {
|
|
77
|
+
_super.prototype.setAttributes.call(this);
|
|
78
|
+
var _a = this.properties, points = _a.points, width = _a.width, height = _a.height;
|
|
79
|
+
// DONE: 如果设置了 points,又设置了节点的宽高,则需要做如下操作
|
|
80
|
+
// 1. 将 points 的位置置零,即将图形向原点移动(找到 points 中 x,y 的最小值,所有坐标值减掉该值)
|
|
81
|
+
// 2. 按宽高的比例重新计算最新的 points
|
|
82
|
+
// if (points) {
|
|
83
|
+
// this.points = points
|
|
84
|
+
// }
|
|
85
|
+
var nextPoints = points || this.points;
|
|
86
|
+
this.points = normalizePolygon(nextPoints, width, height);
|
|
87
|
+
};
|
|
88
|
+
PolygonNodeModel.prototype.getNodeStyle = function () {
|
|
89
|
+
var style = _super.prototype.getNodeStyle.call(this);
|
|
90
|
+
var polygon = this.graphModel.theme.polygon;
|
|
91
|
+
var customStyle = this.properties.style;
|
|
92
|
+
return __assign(__assign(__assign({}, style), cloneDeep(polygon)), (cloneDeep(customStyle) || {}));
|
|
93
|
+
};
|
|
94
|
+
Object.defineProperty(PolygonNodeModel.prototype, "pointsPosition", {
|
|
95
|
+
/**
|
|
96
|
+
* 由于大多数情况下,我们初始化拿到的多边形坐标都是基于原点的(例如绘图工具到处的svg)。
|
|
97
|
+
* 在logicflow中对多边形进行移动,我们不需要去更新points,
|
|
98
|
+
* 而是去更新多边形中心点即可。
|
|
99
|
+
*/
|
|
100
|
+
get: function () {
|
|
101
|
+
var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
102
|
+
return this.points.map(function (item) { return ({
|
|
103
|
+
x: item[0] + x - width / 2,
|
|
104
|
+
y: item[1] + y - height / 2,
|
|
105
|
+
}); });
|
|
106
|
+
},
|
|
107
|
+
enumerable: false,
|
|
108
|
+
configurable: true
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(PolygonNodeModel.prototype, "width", {
|
|
111
|
+
get: function () {
|
|
112
|
+
var min = Number.MAX_SAFE_INTEGER;
|
|
113
|
+
var max = Number.MIN_SAFE_INTEGER;
|
|
114
|
+
this.points.forEach(function (_a) {
|
|
115
|
+
var _b = __read(_a, 1), x = _b[0];
|
|
116
|
+
if (x < min) {
|
|
117
|
+
min = x;
|
|
118
|
+
}
|
|
119
|
+
if (x > max) {
|
|
120
|
+
max = x;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
return max - min;
|
|
124
|
+
},
|
|
125
|
+
enumerable: false,
|
|
126
|
+
configurable: true
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(PolygonNodeModel.prototype, "height", {
|
|
129
|
+
get: function () {
|
|
130
|
+
var min = Number.MAX_SAFE_INTEGER;
|
|
131
|
+
var max = Number.MIN_SAFE_INTEGER;
|
|
132
|
+
this.points.forEach(function (_a) {
|
|
133
|
+
var _b = __read(_a, 2), y = _b[1];
|
|
134
|
+
if (y < min) {
|
|
135
|
+
min = y;
|
|
136
|
+
}
|
|
137
|
+
if (y > max) {
|
|
138
|
+
max = y;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
return max - min;
|
|
142
|
+
},
|
|
143
|
+
enumerable: false,
|
|
144
|
+
configurable: true
|
|
145
|
+
});
|
|
146
|
+
PolygonNodeModel.prototype.getDefaultAnchor = function () {
|
|
147
|
+
var _this = this;
|
|
148
|
+
var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height, points = _a.points;
|
|
149
|
+
return points.map(function (_a, idx) {
|
|
150
|
+
var _b = __read(_a, 2), x1 = _b[0], y1 = _b[1];
|
|
151
|
+
return ({
|
|
152
|
+
x: x + x1 - width / 2,
|
|
153
|
+
y: y + y1 - height / 2,
|
|
154
|
+
id: "".concat(_this.id, "_").concat(idx),
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
PolygonNodeModel.prototype.resize = function (resizeInfo) {
|
|
159
|
+
var _this = this;
|
|
160
|
+
var width = resizeInfo.width, height = resizeInfo.height, deltaX = resizeInfo.deltaX, deltaY = resizeInfo.deltaY;
|
|
161
|
+
// 移动节点以及文本内容
|
|
162
|
+
this.move(deltaX / 2, deltaY / 2);
|
|
163
|
+
var nextPoints = map(this.points, function (_a) {
|
|
164
|
+
var _b = __read(_a, 2), x = _b[0], y = _b[1];
|
|
165
|
+
return [
|
|
166
|
+
(x * width) / _this.width,
|
|
167
|
+
(y * height) / _this.height,
|
|
168
|
+
];
|
|
169
|
+
});
|
|
170
|
+
this.points = nextPoints;
|
|
171
|
+
this.properties.points = nextPoints;
|
|
172
|
+
// this.setProperties({
|
|
173
|
+
// points: toJS(nextPoints),
|
|
174
|
+
// })
|
|
175
|
+
return this.getData();
|
|
176
|
+
};
|
|
177
|
+
__decorate([
|
|
178
|
+
observable
|
|
179
|
+
], PolygonNodeModel.prototype, "points", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
observable
|
|
182
|
+
], PolygonNodeModel.prototype, "properties", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
computed
|
|
185
|
+
], PolygonNodeModel.prototype, "pointsPosition", null);
|
|
186
|
+
__decorate([
|
|
187
|
+
computed
|
|
188
|
+
], PolygonNodeModel.prototype, "width", null);
|
|
189
|
+
__decorate([
|
|
190
|
+
computed
|
|
191
|
+
], PolygonNodeModel.prototype, "height", null);
|
|
192
|
+
return PolygonNodeModel;
|
|
193
|
+
}(BaseNodeModel));
|
|
194
|
+
export { PolygonNodeModel };
|
|
195
|
+
export default PolygonNodeModel;
|
|
196
|
+
//# sourceMappingURL=PolygonNodeModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolygonNodeModel.js","sourceRoot":"","sources":["../../../src/model/node/PolygonNodeModel.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import BaseNodeModel from './BaseNodeModel';
|
|
2
|
+
import GraphModel from '../GraphModel';
|
|
3
|
+
import LogicFlow from '../../LogicFlow';
|
|
4
|
+
import { ModelType } from '../../constant';
|
|
5
|
+
export type IRectNodeModel = {
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
style?: LogicFlow.CommonTheme;
|
|
9
|
+
textStyle?: LogicFlow.CommonTheme;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
export declare class RectNodeModel extends BaseNodeModel {
|
|
13
|
+
modelType: ModelType;
|
|
14
|
+
radius: number;
|
|
15
|
+
properties: IRectNodeModel;
|
|
16
|
+
constructor(data: LogicFlow.NodeConfig, graphModel: GraphModel);
|
|
17
|
+
setAttributes(): void;
|
|
18
|
+
getDefaultAnchor(): {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
id: string;
|
|
22
|
+
}[];
|
|
23
|
+
getNodeStyle(): {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
fill?: string | undefined;
|
|
26
|
+
stroke?: string | undefined;
|
|
27
|
+
strokeWidth?: number | undefined;
|
|
28
|
+
radius?: number | undefined;
|
|
29
|
+
rx?: number | undefined;
|
|
30
|
+
ry?: number | undefined;
|
|
31
|
+
path?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export default RectNodeModel;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
28
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
30
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32
|
+
};
|
|
33
|
+
import { cloneDeep } from 'lodash-es';
|
|
34
|
+
import { observable } from 'mobx';
|
|
35
|
+
import BaseNodeModel from './BaseNodeModel';
|
|
36
|
+
import { ModelType } from '../../constant';
|
|
37
|
+
var RectNodeModel = /** @class */ (function (_super) {
|
|
38
|
+
__extends(RectNodeModel, _super);
|
|
39
|
+
function RectNodeModel(data, graphModel) {
|
|
40
|
+
var _this = _super.call(this, data, graphModel) || this;
|
|
41
|
+
_this.modelType = ModelType.RECT_NODE;
|
|
42
|
+
_this.radius = 0;
|
|
43
|
+
_this.properties = {};
|
|
44
|
+
_this.properties = data.properties || {};
|
|
45
|
+
_this.setAttributes();
|
|
46
|
+
return _this;
|
|
47
|
+
}
|
|
48
|
+
RectNodeModel.prototype.setAttributes = function () {
|
|
49
|
+
_super.prototype.setAttributes.call(this);
|
|
50
|
+
var _a = this.properties, width = _a.width, height = _a.height;
|
|
51
|
+
if (width)
|
|
52
|
+
this.width = width;
|
|
53
|
+
if (height)
|
|
54
|
+
this.height = height;
|
|
55
|
+
};
|
|
56
|
+
RectNodeModel.prototype.getDefaultAnchor = function () {
|
|
57
|
+
var _a = this, x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
58
|
+
return [
|
|
59
|
+
{ x: x, y: y - height / 2, id: "".concat(this.id, "_0") },
|
|
60
|
+
{ x: x + width / 2, y: y, id: "".concat(this.id, "_1") },
|
|
61
|
+
{ x: x, y: y + height / 2, id: "".concat(this.id, "_2") },
|
|
62
|
+
{ x: x - width / 2, y: y, id: "".concat(this.id, "_3") },
|
|
63
|
+
];
|
|
64
|
+
};
|
|
65
|
+
RectNodeModel.prototype.getNodeStyle = function () {
|
|
66
|
+
var style = _super.prototype.getNodeStyle.call(this);
|
|
67
|
+
var rect = this.graphModel.theme.rect;
|
|
68
|
+
return __assign(__assign({}, style), cloneDeep(rect));
|
|
69
|
+
};
|
|
70
|
+
__decorate([
|
|
71
|
+
observable
|
|
72
|
+
], RectNodeModel.prototype, "radius", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
observable
|
|
75
|
+
], RectNodeModel.prototype, "properties", void 0);
|
|
76
|
+
return RectNodeModel;
|
|
77
|
+
}(BaseNodeModel));
|
|
78
|
+
export { RectNodeModel };
|
|
79
|
+
export default RectNodeModel;
|
|
80
|
+
//# sourceMappingURL=RectNodeModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RectNodeModel.js","sourceRoot":"","sources":["../../../src/model/node/RectNodeModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAW1C;IAAmC,iCAAa;IAK9C,uBAAY,IAA0B,EAAE,UAAsB;QAC5D,YAAA,MAAK,YAAC,IAAI,EAAE,UAAU,CAAC,SAAA;QALzB,eAAS,GAAG,SAAS,CAAC,SAAS,CAAA;QACnB,YAAM,GAAG,CAAC,CAAA;QACV,gBAAU,GAAmB,EAAE,CAAA;QAIzC,KAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAA;QAEvC,KAAI,CAAC,aAAa,EAAE,CAAA;;IACtB,CAAC;IAED,qCAAa,GAAb;QACE,gBAAK,CAAC,aAAa,WAAE,CAAA;QAEf,IAAA,KAAoB,IAAI,CAAC,UAAU,EAAjC,KAAK,WAAA,EAAE,MAAM,YAAoB,CAAA;QACzC,IAAI,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAC7B,IAAI,MAAM;YAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IAClC,CAAC;IAED,wCAAgB,GAAhB;QACQ,IAAA,KAA0B,IAAI,EAA5B,CAAC,OAAA,EAAE,CAAC,OAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAS,CAAA;QACpC,OAAO;YACL,EAAE,CAAC,GAAA,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;YAC5C,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAA,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;YAC3C,EAAE,CAAC,GAAA,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;YAC5C,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAA,EAAE,EAAE,EAAE,UAAG,IAAI,CAAC,EAAE,OAAI,EAAE;SAC5C,CAAA;IACH,CAAC;IAED,oCAAY,GAAZ;QACE,IAAM,KAAK,GAAG,gBAAK,CAAC,YAAY,WAAE,CAAA;QAC1B,IAAA,IAAI,GAAK,IAAI,CAAC,UAAU,CAAC,KAAK,KAA1B,CAA0B;QACtC,6BACK,KAAK,GACL,SAAS,CAAC,IAAI,CAAC,EACnB;IACH,CAAC;IAnCW;QAAX,UAAU;iDAAW;IACV;QAAX,UAAU;qDAAgC;IAmC7C,oBAAC;CAAA,AAtCD,CAAmC,aAAa,GAsC/C;SAtCY,aAAa;AAwC1B,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import BaseNodeModel from './BaseNodeModel';
|
|
2
|
+
import { ModelType } from '../../constant';
|
|
3
|
+
export declare class TextNodeModel extends BaseNodeModel {
|
|
4
|
+
modelType: ModelType;
|
|
5
|
+
getTextStyle(): {
|
|
6
|
+
[x: string]: unknown;
|
|
7
|
+
background?: import("../..").LogicFlow.CommonTheme | undefined;
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
fontSize: number;
|
|
10
|
+
textWidth?: number | undefined;
|
|
11
|
+
lineHeight?: number | undefined;
|
|
12
|
+
textAnchor?: "middle" | "start" | "end" | undefined;
|
|
13
|
+
dominantBaseline?: "middle" | "auto" | "text-bottom" | "alphabetic" | "ideographic" | "central" | "mathematical" | "hanging" | "text-top" | undefined;
|
|
14
|
+
fill?: string | undefined;
|
|
15
|
+
stroke?: string | undefined;
|
|
16
|
+
strokeWidth?: number | undefined;
|
|
17
|
+
radius?: number | undefined;
|
|
18
|
+
rx?: number | undefined;
|
|
19
|
+
ry?: number | undefined;
|
|
20
|
+
path?: string | undefined;
|
|
21
|
+
overflowMode?: "default" | "ellipsis" | "autoWrap" | undefined;
|
|
22
|
+
wrapPadding?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
get width(): number;
|
|
25
|
+
get height(): number;
|
|
26
|
+
}
|
|
27
|
+
export default TextNodeModel;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
28
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
29
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
30
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
32
|
+
};
|
|
33
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
34
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
35
|
+
if (!m) return o;
|
|
36
|
+
var i = m.call(o), r, ar = [], e;
|
|
37
|
+
try {
|
|
38
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
39
|
+
}
|
|
40
|
+
catch (error) { e = { error: error }; }
|
|
41
|
+
finally {
|
|
42
|
+
try {
|
|
43
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
44
|
+
}
|
|
45
|
+
finally { if (e) throw e.error; }
|
|
46
|
+
}
|
|
47
|
+
return ar;
|
|
48
|
+
};
|
|
49
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
+
if (ar || !(i in from)) {
|
|
52
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
+
ar[i] = from[i];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
+
};
|
|
58
|
+
import { cloneDeep } from 'lodash-es';
|
|
59
|
+
import { computed } from 'mobx';
|
|
60
|
+
import BaseNodeModel from './BaseNodeModel';
|
|
61
|
+
import { ModelType } from '../../constant';
|
|
62
|
+
import { getSvgTextWidthHeight } from '../../util';
|
|
63
|
+
var TextNodeModel = /** @class */ (function (_super) {
|
|
64
|
+
__extends(TextNodeModel, _super);
|
|
65
|
+
function TextNodeModel() {
|
|
66
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
|
|
67
|
+
_this.modelType = ModelType.TEXT_NODE;
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
TextNodeModel.prototype.getTextStyle = function () {
|
|
71
|
+
var style = _super.prototype.getTextStyle.call(this);
|
|
72
|
+
var text = this.graphModel.theme.text;
|
|
73
|
+
return __assign(__assign({}, style), cloneDeep(text));
|
|
74
|
+
};
|
|
75
|
+
Object.defineProperty(TextNodeModel.prototype, "width", {
|
|
76
|
+
get: function () {
|
|
77
|
+
var rows = String(this.text.value).split(/[\r\n]/g);
|
|
78
|
+
var fontSize = this.getTextStyle().fontSize;
|
|
79
|
+
var width = getSvgTextWidthHeight({
|
|
80
|
+
rows: rows,
|
|
81
|
+
fontSize: fontSize,
|
|
82
|
+
rowsLength: rows.length,
|
|
83
|
+
}).width;
|
|
84
|
+
return width;
|
|
85
|
+
},
|
|
86
|
+
enumerable: false,
|
|
87
|
+
configurable: true
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(TextNodeModel.prototype, "height", {
|
|
90
|
+
get: function () {
|
|
91
|
+
var rows = String(this.text.value).split(/[\r\n]/g);
|
|
92
|
+
var fontSize = this.getTextStyle().fontSize;
|
|
93
|
+
var height = getSvgTextWidthHeight({
|
|
94
|
+
rows: rows,
|
|
95
|
+
fontSize: fontSize,
|
|
96
|
+
rowsLength: rows.length,
|
|
97
|
+
}).height;
|
|
98
|
+
return height;
|
|
99
|
+
},
|
|
100
|
+
enumerable: false,
|
|
101
|
+
configurable: true
|
|
102
|
+
});
|
|
103
|
+
__decorate([
|
|
104
|
+
computed
|
|
105
|
+
], TextNodeModel.prototype, "width", null);
|
|
106
|
+
__decorate([
|
|
107
|
+
computed
|
|
108
|
+
], TextNodeModel.prototype, "height", null);
|
|
109
|
+
return TextNodeModel;
|
|
110
|
+
}(BaseNodeModel));
|
|
111
|
+
export { TextNodeModel };
|
|
112
|
+
export default TextNodeModel;
|
|
113
|
+
//# sourceMappingURL=TextNodeModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextNodeModel.js","sourceRoot":"","sources":["../../../src/model/node/TextNodeModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAElD;IAAmC,iCAAa;IAAhD;;QACE,eAAS,GAAG,SAAS,CAAC,SAAS,CAAA;;IA+BjC,CAAC;IA7BC,oCAAY,GAAZ;QACE,IAAM,KAAK,GAAG,gBAAK,CAAC,YAAY,WAAE,CAAA;QAC1B,IAAA,IAAI,GAAK,IAAI,CAAC,UAAU,CAAC,KAAK,KAA1B,CAA0B;QACtC,6BACK,KAAK,GACL,SAAS,CAAC,IAAI,CAAC,EACnB;IACH,CAAC;IACS,sBAAI,gCAAK;aAAT;YACR,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;YAC7C,IAAA,QAAQ,GAAK,IAAI,CAAC,YAAY,EAAE,SAAxB,CAAwB;YAChC,IAAA,KAAK,GAAK,qBAAqB,CAAC;gBACtC,IAAI,MAAA;gBACJ,QAAQ,UAAA;gBACR,UAAU,EAAE,IAAI,CAAC,MAAM;aACxB,CAAC,MAJW,CAIX;YACF,OAAO,KAAK,CAAA;QACd,CAAC;;;OAAA;IAES,sBAAI,iCAAM;aAAV;YACR,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;YAC7C,IAAA,QAAQ,GAAK,IAAI,CAAC,YAAY,EAAE,SAAxB,CAAwB;YAChC,IAAA,MAAM,GAAK,qBAAqB,CAAC;gBACvC,IAAI,MAAA;gBACJ,QAAQ,UAAA;gBACR,UAAU,EAAE,IAAI,CAAC,MAAM;aACxB,CAAC,OAJY,CAIZ;YACF,OAAO,MAAM,CAAA;QACf,CAAC;;;OAAA;IApBS;QAAT,QAAQ;8CASR;IAES;QAAT,QAAQ;+CASR;IACH,oBAAC;CAAA,AAhCD,CAAmC,aAAa,GAgC/C;SAhCY,aAAa;AAkC1B,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './BaseNodeModel';
|
|
2
|
+
export * from './CircleNodeModel';
|
|
3
|
+
export * from './DiamondNodeModel';
|
|
4
|
+
export * from './EllipseNodeModel';
|
|
5
|
+
export * from './PolygonNodeModel';
|
|
6
|
+
export * from './RectNodeModel';
|
|
7
|
+
export * from './TextNodeModel';
|
|
8
|
+
export * from './HtmlNodeModel';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/model/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|