dcim-topology2d 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/activity-diagram/index.d.ts +5 -0
- package/activity-diagram/index.js +6 -0
- package/activity-diagram/index.js.map +1 -0
- package/activity-diagram/src/final/final.d.ts +2 -0
- package/activity-diagram/src/final/final.js +10 -0
- package/activity-diagram/src/final/final.js.map +1 -0
- package/activity-diagram/src/final/final.rect.d.ts +3 -0
- package/activity-diagram/src/final/final.rect.js +11 -0
- package/activity-diagram/src/final/final.rect.js.map +1 -0
- package/activity-diagram/src/final/index.d.ts +2 -0
- package/activity-diagram/src/final/index.js +3 -0
- package/activity-diagram/src/final/index.js.map +1 -0
- package/activity-diagram/src/fork/fork.anchor.d.ts +3 -0
- package/activity-diagram/src/fork/fork.anchor.js +28 -0
- package/activity-diagram/src/fork/fork.anchor.js.map +1 -0
- package/activity-diagram/src/fork/fork.d.ts +2 -0
- package/activity-diagram/src/fork/fork.js +25 -0
- package/activity-diagram/src/fork/fork.js.map +1 -0
- package/activity-diagram/src/fork/fork.rect.d.ts +3 -0
- package/activity-diagram/src/fork/fork.rect.js +9 -0
- package/activity-diagram/src/fork/fork.rect.js.map +1 -0
- package/activity-diagram/src/fork/index.d.ts +3 -0
- package/activity-diagram/src/fork/index.js +4 -0
- package/activity-diagram/src/fork/index.js.map +1 -0
- package/activity-diagram/src/register.d.ts +1 -0
- package/activity-diagram/src/register.js +13 -0
- package/activity-diagram/src/register.js.map +1 -0
- package/activity-diagram/src/swimlaneH/index.d.ts +2 -0
- package/activity-diagram/src/swimlaneH/index.js +3 -0
- package/activity-diagram/src/swimlaneH/index.js.map +1 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +2 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.js +27 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.js.map +1 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +3 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +9 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.js.map +1 -0
- package/activity-diagram/src/swimlaneV/index.d.ts +2 -0
- package/activity-diagram/src/swimlaneV/index.js +3 -0
- package/activity-diagram/src/swimlaneV/index.js.map +1 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +2 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.js +27 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.js.map +1 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +3 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +9 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.js.map +1 -0
- package/chart-diagram/index.d.ts +3 -0
- package/chart-diagram/index.js +4 -0
- package/chart-diagram/index.js.map +1 -0
- package/chart-diagram/src/echarts/echarts.min.js +22 -0
- package/chart-diagram/src/echarts/index.d.ts +4 -0
- package/chart-diagram/src/echarts/index.js +104 -0
- package/chart-diagram/src/echarts/index.js.map +1 -0
- package/chart-diagram/src/register.d.ts +1 -0
- package/chart-diagram/src/register.js +12 -0
- package/chart-diagram/src/register.js.map +1 -0
- package/class-diagram/index.d.ts +2 -0
- package/class-diagram/index.js +3 -0
- package/class-diagram/index.js.map +1 -0
- package/class-diagram/src/class/class.d.ts +3 -0
- package/class-diagram/src/class/class.js +56 -0
- package/class-diagram/src/class/class.js.map +1 -0
- package/class-diagram/src/class/class.rect.d.ts +5 -0
- package/class-diagram/src/class/class.rect.js +16 -0
- package/class-diagram/src/class/class.rect.js.map +1 -0
- package/class-diagram/src/class/index.d.ts +2 -0
- package/class-diagram/src/class/index.js +3 -0
- package/class-diagram/src/class/index.js.map +1 -0
- package/class-diagram/src/register.d.ts +1 -0
- package/class-diagram/src/register.js +7 -0
- package/class-diagram/src/register.js.map +1 -0
- package/core/index.d.ts +8 -0
- package/core/index.js +26 -0
- package/core/index.js.map +1 -0
- package/core/src/activeLayer.d.ts +55 -0
- package/core/src/activeLayer.js +679 -0
- package/core/src/activeLayer.js.map +1 -0
- package/core/src/animateLayer.d.ts +23 -0
- package/core/src/animateLayer.js +227 -0
- package/core/src/animateLayer.js.map +1 -0
- package/core/src/calling.d.ts +37 -0
- package/core/src/calling.js +253 -0
- package/core/src/canvas.d.ts +19 -0
- package/core/src/canvas.js +81 -0
- package/core/src/canvas.js.map +1 -0
- package/core/src/common.d.ts +102 -0
- package/core/src/common.js +1254 -0
- package/core/src/core.d.ts +104 -0
- package/core/src/core.js +2281 -0
- package/core/src/core.js.map +1 -0
- package/core/src/divLayer.d.ts +61 -0
- package/core/src/divLayer.js +485 -0
- package/core/src/divLayer.js.map +1 -0
- package/core/src/healps/changeData.d.ts +8 -0
- package/core/src/healps/changeData.js +205 -0
- package/core/src/healps/index.d.ts +1 -0
- package/core/src/healps/index.js +1 -0
- package/core/src/hoverLayer.d.ts +32 -0
- package/core/src/hoverLayer.js +199 -0
- package/core/src/hoverLayer.js.map +1 -0
- package/core/src/layer.d.ts +5 -0
- package/core/src/layer.js +11 -0
- package/core/src/layer.js.map +1 -0
- package/core/src/middles/arrows/circle.d.ts +3 -0
- package/core/src/middles/arrows/circle.js +20 -0
- package/core/src/middles/arrows/circle.js.map +1 -0
- package/core/src/middles/arrows/diamond.d.ts +3 -0
- package/core/src/middles/arrows/diamond.js +28 -0
- package/core/src/middles/arrows/diamond.js.map +1 -0
- package/core/src/middles/arrows/line.d.ts +4 -0
- package/core/src/middles/arrows/line.js +42 -0
- package/core/src/middles/arrows/line.js.map +1 -0
- package/core/src/middles/arrows/triangle.d.ts +3 -0
- package/core/src/middles/arrows/triangle.js +25 -0
- package/core/src/middles/arrows/triangle.js.map +1 -0
- package/core/src/middles/default.anchor.d.ts +2 -0
- package/core/src/middles/default.anchor.js +9 -0
- package/core/src/middles/default.anchor.js.map +1 -0
- package/core/src/middles/default.d.ts +12 -0
- package/core/src/middles/default.js +257 -0
- package/core/src/middles/default.js.map +1 -0
- package/core/src/middles/default.rect.d.ts +3 -0
- package/core/src/middles/default.rect.js +19 -0
- package/core/src/middles/default.rect.js.map +1 -0
- package/core/src/middles/index.d.ts +3 -0
- package/core/src/middles/index.js +4 -0
- package/core/src/middles/index.js.map +1 -0
- package/core/src/middles/lines/curve.d.ts +10 -0
- package/core/src/middles/lines/curve.js +127 -0
- package/core/src/middles/lines/curve.js.map +1 -0
- package/core/src/middles/lines/line.d.ts +4 -0
- package/core/src/middles/lines/line.js +11 -0
- package/core/src/middles/lines/line.js.map +1 -0
- package/core/src/middles/lines/mind.d.ts +6 -0
- package/core/src/middles/lines/mind.js +90 -0
- package/core/src/middles/lines/mind.js.map +1 -0
- package/core/src/middles/lines/polyline.d.ts +7 -0
- package/core/src/middles/lines/polyline.js +309 -0
- package/core/src/middles/lines/polyline.js.map +1 -0
- package/core/src/middles/nodes/arbitrarygraph.anchor.d.ts +2 -0
- package/core/src/middles/nodes/arbitrarygraph.anchor.js +18 -0
- package/core/src/middles/nodes/arbitrarygraph.d.ts +2 -0
- package/core/src/middles/nodes/arbitrarygraph.js +17 -0
- package/core/src/middles/nodes/arrow.anchor.d.ts +2 -0
- package/core/src/middles/nodes/arrow.anchor.js +7 -0
- package/core/src/middles/nodes/arrow.anchor.js.map +1 -0
- package/core/src/middles/nodes/arrow.d.ts +4 -0
- package/core/src/middles/nodes/arrow.js +44 -0
- package/core/src/middles/nodes/arrow.js.map +1 -0
- package/core/src/middles/nodes/arrow.rect.d.ts +7 -0
- package/core/src/middles/nodes/arrow.rect.js +23 -0
- package/core/src/middles/nodes/arrow.rect.js.map +1 -0
- package/core/src/middles/nodes/circle.anchor.d.ts +2 -0
- package/core/src/middles/nodes/circle.anchor.js +18 -0
- package/core/src/middles/nodes/circle.anchor.js.map +1 -0
- package/core/src/middles/nodes/circle.d.ts +2 -0
- package/core/src/middles/nodes/circle.js +7 -0
- package/core/src/middles/nodes/circle.js.map +1 -0
- package/core/src/middles/nodes/circle.rect.d.ts +3 -0
- package/core/src/middles/nodes/circle.rect.js +27 -0
- package/core/src/middles/nodes/circle.rect.js.map +1 -0
- package/core/src/middles/nodes/cloud.anchor.d.ts +2 -0
- package/core/src/middles/nodes/cloud.anchor.js +9 -0
- package/core/src/middles/nodes/cloud.anchor.js.map +1 -0
- package/core/src/middles/nodes/cloud.d.ts +2 -0
- package/core/src/middles/nodes/cloud.js +11 -0
- package/core/src/middles/nodes/cloud.js.map +1 -0
- package/core/src/middles/nodes/cloud.rect.d.ts +3 -0
- package/core/src/middles/nodes/cloud.rect.js +9 -0
- package/core/src/middles/nodes/cloud.rect.js.map +1 -0
- package/core/src/middles/nodes/cube.anchor.d.ts +2 -0
- package/core/src/middles/nodes/cube.anchor.js +10 -0
- package/core/src/middles/nodes/cube.anchor.js.map +1 -0
- package/core/src/middles/nodes/cube.d.ts +2 -0
- package/core/src/middles/nodes/cube.js +5 -0
- package/core/src/middles/nodes/cube.js.map +1 -0
- package/core/src/middles/nodes/cube.model.d.ts +14 -0
- package/core/src/middles/nodes/cube.model.js +64 -0
- package/core/src/middles/nodes/cube.model.js.map +1 -0
- package/core/src/middles/nodes/cube.rect.d.ts +3 -0
- package/core/src/middles/nodes/cube.rect.js +11 -0
- package/core/src/middles/nodes/cube.rect.js.map +1 -0
- package/core/src/middles/nodes/diamond.d.ts +2 -0
- package/core/src/middles/nodes/diamond.js +11 -0
- package/core/src/middles/nodes/diamond.js.map +1 -0
- package/core/src/middles/nodes/diamond.rect.d.ts +3 -0
- package/core/src/middles/nodes/diamond.rect.js +27 -0
- package/core/src/middles/nodes/diamond.rect.js.map +1 -0
- package/core/src/middles/nodes/file.d.ts +2 -0
- package/core/src/middles/nodes/file.js +16 -0
- package/core/src/middles/nodes/file.js.map +1 -0
- package/core/src/middles/nodes/formtable.d.ts +2 -0
- package/core/src/middles/nodes/formtable.js +100 -0
- package/core/src/middles/nodes/hexagon.anchor.d.ts +2 -0
- package/core/src/middles/nodes/hexagon.anchor.js +21 -0
- package/core/src/middles/nodes/hexagon.anchor.js.map +1 -0
- package/core/src/middles/nodes/hexagon.d.ts +2 -0
- package/core/src/middles/nodes/hexagon.js +14 -0
- package/core/src/middles/nodes/hexagon.js.map +1 -0
- package/core/src/middles/nodes/hexagon.rect.d.ts +3 -0
- package/core/src/middles/nodes/hexagon.rect.js +14 -0
- package/core/src/middles/nodes/hexagon.rect.js.map +1 -0
- package/core/src/middles/nodes/image.anchor.d.ts +2 -0
- package/core/src/middles/nodes/image.anchor.js +12 -0
- package/core/src/middles/nodes/image.anchor.js.map +1 -0
- package/core/src/middles/nodes/image.rect.d.ts +3 -0
- package/core/src/middles/nodes/image.rect.js +65 -0
- package/core/src/middles/nodes/image.rect.js.map +1 -0
- package/core/src/middles/nodes/line.anchor.d.ts +2 -0
- package/core/src/middles/nodes/line.anchor.js +13 -0
- package/core/src/middles/nodes/line.anchor.js.map +1 -0
- package/core/src/middles/nodes/line.d.ts +2 -0
- package/core/src/middles/nodes/line.js +9 -0
- package/core/src/middles/nodes/line.js.map +1 -0
- package/core/src/middles/nodes/line.rect.d.ts +3 -0
- package/core/src/middles/nodes/line.rect.js +9 -0
- package/core/src/middles/nodes/line.rect.js.map +1 -0
- package/core/src/middles/nodes/message.anchor.d.ts +2 -0
- package/core/src/middles/nodes/message.anchor.js +9 -0
- package/core/src/middles/nodes/message.anchor.js.map +1 -0
- package/core/src/middles/nodes/message.d.ts +2 -0
- package/core/src/middles/nodes/message.js +14 -0
- package/core/src/middles/nodes/message.js.map +1 -0
- package/core/src/middles/nodes/message.rect.d.ts +3 -0
- package/core/src/middles/nodes/message.rect.js +10 -0
- package/core/src/middles/nodes/message.rect.js.map +1 -0
- package/core/src/middles/nodes/pentagon.anchor.d.ts +2 -0
- package/core/src/middles/nodes/pentagon.anchor.js +10 -0
- package/core/src/middles/nodes/pentagon.anchor.js.map +1 -0
- package/core/src/middles/nodes/pentagon.d.ts +2 -0
- package/core/src/middles/nodes/pentagon.js +12 -0
- package/core/src/middles/nodes/pentagon.js.map +1 -0
- package/core/src/middles/nodes/pentagon.rect.d.ts +3 -0
- package/core/src/middles/nodes/pentagon.rect.js +23 -0
- package/core/src/middles/nodes/pentagon.rect.js.map +1 -0
- package/core/src/middles/nodes/pentagram.anchor.d.ts +2 -0
- package/core/src/middles/nodes/pentagram.anchor.js +10 -0
- package/core/src/middles/nodes/pentagram.anchor.js.map +1 -0
- package/core/src/middles/nodes/pentagram.d.ts +2 -0
- package/core/src/middles/nodes/pentagram.js +11 -0
- package/core/src/middles/nodes/pentagram.js.map +1 -0
- package/core/src/middles/nodes/pentagram.rect.d.ts +3 -0
- package/core/src/middles/nodes/pentagram.rect.js +11 -0
- package/core/src/middles/nodes/pentagram.rect.js.map +1 -0
- package/core/src/middles/nodes/people.d.ts +2 -0
- package/core/src/middles/nodes/people.js +17 -0
- package/core/src/middles/nodes/people.js.map +1 -0
- package/core/src/middles/nodes/people.rect.d.ts +3 -0
- package/core/src/middles/nodes/people.rect.js +9 -0
- package/core/src/middles/nodes/people.rect.js.map +1 -0
- package/core/src/middles/nodes/rectangle.d.ts +2 -0
- package/core/src/middles/nodes/rectangle.js +25 -0
- package/core/src/middles/nodes/rectangle.js.map +1 -0
- package/core/src/middles/nodes/rectangle.rect.d.ts +3 -0
- package/core/src/middles/nodes/rectangle.rect.js +11 -0
- package/core/src/middles/nodes/rectangle.rect.js.map +1 -0
- package/core/src/middles/nodes/tablePagination.d.ts +2 -0
- package/core/src/middles/nodes/tablePagination.js +106 -0
- package/core/src/middles/nodes/text.d.ts +8 -0
- package/core/src/middles/nodes/text.js +295 -0
- package/core/src/middles/nodes/text.js.map +1 -0
- package/core/src/middles/nodes/triangle.anchor.d.ts +2 -0
- package/core/src/middles/nodes/triangle.anchor.js +9 -0
- package/core/src/middles/nodes/triangle.anchor.js.map +1 -0
- package/core/src/middles/nodes/triangle.d.ts +2 -0
- package/core/src/middles/nodes/triangle.js +10 -0
- package/core/src/middles/nodes/triangle.js.map +1 -0
- package/core/src/middles/nodes/triangle.rect.d.ts +3 -0
- package/core/src/middles/nodes/triangle.rect.js +23 -0
- package/core/src/middles/nodes/triangle.rect.js.map +1 -0
- package/core/src/models/data.d.ts +26 -0
- package/core/src/models/data.js +77 -0
- package/core/src/models/data.js.map +1 -0
- package/core/src/models/direction.d.ts +7 -0
- package/core/src/models/direction.js +9 -0
- package/core/src/models/direction.js.map +1 -0
- package/core/src/models/event.d.ts +13 -0
- package/core/src/models/event.js +16 -0
- package/core/src/models/event.js.map +1 -0
- package/core/src/models/index.d.ts +9 -0
- package/core/src/models/index.js +10 -0
- package/core/src/models/index.js.map +1 -0
- package/core/src/models/line.d.ts +53 -0
- package/core/src/models/line.js +442 -0
- package/core/src/models/line.js.map +1 -0
- package/core/src/models/node.d.ts +95 -0
- package/core/src/models/node.js +944 -0
- package/core/src/models/node.js.map +1 -0
- package/core/src/models/pen.d.ts +122 -0
- package/core/src/models/pen.js +362 -0
- package/core/src/models/pen.js.map +1 -0
- package/core/src/models/point.d.ts +25 -0
- package/core/src/models/point.js +59 -0
- package/core/src/models/point.js.map +1 -0
- package/core/src/models/rect.d.ts +22 -0
- package/core/src/models/rect.js +93 -0
- package/core/src/models/rect.js.map +1 -0
- package/core/src/models/status.d.ts +10 -0
- package/core/src/models/status.js +13 -0
- package/core/src/models/status.js.map +1 -0
- package/core/src/mqtt.d.ts +14 -0
- package/core/src/mqtt.js +82 -0
- package/core/src/mqtt.js.map +1 -0
- package/core/src/mqtt.min.d.ts +2 -0
- package/core/src/mqtt.min.js +2447 -0
- package/core/src/mqtt.min.js.map +1 -0
- package/core/src/offscreen.d.ts +16 -0
- package/core/src/offscreen.js +70 -0
- package/core/src/offscreen.js.map +1 -0
- package/core/src/options.d.ts +66 -0
- package/core/src/options.js +42 -0
- package/core/src/options.js.map +1 -0
- package/core/src/poll.js +39 -0
- package/core/src/preview.d.ts +29 -0
- package/core/src/preview.js +247 -0
- package/core/src/renderLayer.d.ts +36 -0
- package/core/src/renderLayer.js +187 -0
- package/core/src/renderLayer.js.map +1 -0
- package/core/src/socket.d.ts +10 -0
- package/core/src/socket.js +51 -0
- package/core/src/socket.js.map +1 -0
- package/core/src/utils/browser.d.ts +1 -0
- package/core/src/utils/browser.js +4 -0
- package/core/src/utils/browser.js.map +1 -0
- package/core/src/utils/canvas.d.ts +13 -0
- package/core/src/utils/canvas.js +84 -0
- package/core/src/utils/canvas.js.map +1 -0
- package/core/src/utils/construction.d.ts +41 -0
- package/core/src/utils/construction.js +36 -0
- package/core/src/utils/conversion.d.ts +0 -0
- package/core/src/utils/conversion.js +0 -0
- package/core/src/utils/dom.d.ts +8 -0
- package/core/src/utils/dom.js +67 -0
- package/core/src/utils/dom.js.map +1 -0
- package/core/src/utils/index.d.ts +9 -0
- package/core/src/utils/index.js +10 -0
- package/core/src/utils/index.js.map +1 -0
- package/core/src/utils/math.d.ts +3 -0
- package/core/src/utils/math.js +118 -0
- package/core/src/utils/math.js.map +1 -0
- package/core/src/utils/onmousevent.d.ts +5 -0
- package/core/src/utils/onmousevent.js +57 -0
- package/core/src/utils/padding.d.ts +7 -0
- package/core/src/utils/padding.js +47 -0
- package/core/src/utils/padding.js.map +1 -0
- package/core/src/utils/rect.d.ts +7 -0
- package/core/src/utils/rect.js +72 -0
- package/core/src/utils/rect.js.map +1 -0
- package/core/src/utils/uuid.d.ts +4 -0
- package/core/src/utils/uuid.js +13 -0
- package/core/src/utils/uuid.js.map +1 -0
- package/flow-diagram/index.d.ts +12 -0
- package/flow-diagram/index.js +13 -0
- package/flow-diagram/index.js.map +1 -0
- package/flow-diagram/src/comment/comment.anchor.d.ts +2 -0
- package/flow-diagram/src/comment/comment.anchor.js +5 -0
- package/flow-diagram/src/comment/comment.anchor.js.map +1 -0
- package/flow-diagram/src/comment/comment.d.ts +2 -0
- package/flow-diagram/src/comment/comment.js +10 -0
- package/flow-diagram/src/comment/comment.js.map +1 -0
- package/flow-diagram/src/comment/index.d.ts +2 -0
- package/flow-diagram/src/comment/index.js +3 -0
- package/flow-diagram/src/comment/index.js.map +1 -0
- package/flow-diagram/src/data/data.anchor.d.ts +2 -0
- package/flow-diagram/src/data/data.anchor.js +8 -0
- package/flow-diagram/src/data/data.anchor.js.map +1 -0
- package/flow-diagram/src/data/data.d.ts +2 -0
- package/flow-diagram/src/data/data.js +12 -0
- package/flow-diagram/src/data/data.js.map +1 -0
- package/flow-diagram/src/data/data.rect.d.ts +3 -0
- package/flow-diagram/src/data/data.rect.js +9 -0
- package/flow-diagram/src/data/data.rect.js.map +1 -0
- package/flow-diagram/src/data/index.d.ts +3 -0
- package/flow-diagram/src/data/index.js +4 -0
- package/flow-diagram/src/data/index.js.map +1 -0
- package/flow-diagram/src/db/db.d.ts +2 -0
- package/flow-diagram/src/db/db.js +14 -0
- package/flow-diagram/src/db/db.js.map +1 -0
- package/flow-diagram/src/db/db.rect.d.ts +4 -0
- package/flow-diagram/src/db/db.rect.js +9 -0
- package/flow-diagram/src/db/db.rect.js.map +1 -0
- package/flow-diagram/src/db/index.d.ts +2 -0
- package/flow-diagram/src/db/index.js +3 -0
- package/flow-diagram/src/db/index.js.map +1 -0
- package/flow-diagram/src/display/display.anchor.d.ts +2 -0
- package/flow-diagram/src/display/display.anchor.js +8 -0
- package/flow-diagram/src/display/display.anchor.js.map +1 -0
- package/flow-diagram/src/display/display.d.ts +2 -0
- package/flow-diagram/src/display/display.js +13 -0
- package/flow-diagram/src/display/display.js.map +1 -0
- package/flow-diagram/src/display/display.rect.d.ts +3 -0
- package/flow-diagram/src/display/display.rect.js +9 -0
- package/flow-diagram/src/display/display.rect.js.map +1 -0
- package/flow-diagram/src/display/index.d.ts +3 -0
- package/flow-diagram/src/display/index.js +4 -0
- package/flow-diagram/src/display/index.js.map +1 -0
- package/flow-diagram/src/document/document.anchor.d.ts +2 -0
- package/flow-diagram/src/document/document.anchor.js +8 -0
- package/flow-diagram/src/document/document.anchor.js.map +1 -0
- package/flow-diagram/src/document/document.d.ts +2 -0
- package/flow-diagram/src/document/document.js +15 -0
- package/flow-diagram/src/document/document.js.map +1 -0
- package/flow-diagram/src/document/document.rect.d.ts +3 -0
- package/flow-diagram/src/document/document.rect.js +9 -0
- package/flow-diagram/src/document/document.rect.js.map +1 -0
- package/flow-diagram/src/document/index.d.ts +3 -0
- package/flow-diagram/src/document/index.js +4 -0
- package/flow-diagram/src/document/index.js.map +1 -0
- package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +2 -0
- package/flow-diagram/src/externStorage/externStorage.anchor.js +8 -0
- package/flow-diagram/src/externStorage/externStorage.anchor.js.map +1 -0
- package/flow-diagram/src/externStorage/externStorage.d.ts +2 -0
- package/flow-diagram/src/externStorage/externStorage.js +12 -0
- package/flow-diagram/src/externStorage/externStorage.js.map +1 -0
- package/flow-diagram/src/externStorage/externStorage.rect.d.ts +3 -0
- package/flow-diagram/src/externStorage/externStorage.rect.js +9 -0
- package/flow-diagram/src/externStorage/externStorage.rect.js.map +1 -0
- package/flow-diagram/src/externStorage/index.d.ts +3 -0
- package/flow-diagram/src/externStorage/index.js +4 -0
- package/flow-diagram/src/externStorage/index.js.map +1 -0
- package/flow-diagram/src/internalStorage/index.d.ts +2 -0
- package/flow-diagram/src/internalStorage/index.js +3 -0
- package/flow-diagram/src/internalStorage/index.js.map +1 -0
- package/flow-diagram/src/internalStorage/internalStorage.d.ts +2 -0
- package/flow-diagram/src/internalStorage/internalStorage.js +16 -0
- package/flow-diagram/src/internalStorage/internalStorage.js.map +1 -0
- package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +3 -0
- package/flow-diagram/src/internalStorage/internalStorage.rect.js +10 -0
- package/flow-diagram/src/internalStorage/internalStorage.rect.js.map +1 -0
- package/flow-diagram/src/manually/index.d.ts +3 -0
- package/flow-diagram/src/manually/index.js +4 -0
- package/flow-diagram/src/manually/index.js.map +1 -0
- package/flow-diagram/src/manually/manually.anchor.d.ts +2 -0
- package/flow-diagram/src/manually/manually.anchor.js +8 -0
- package/flow-diagram/src/manually/manually.anchor.js.map +1 -0
- package/flow-diagram/src/manually/manually.d.ts +2 -0
- package/flow-diagram/src/manually/manually.js +12 -0
- package/flow-diagram/src/manually/manually.js.map +1 -0
- package/flow-diagram/src/manually/manually.rect.d.ts +3 -0
- package/flow-diagram/src/manually/manually.rect.js +9 -0
- package/flow-diagram/src/manually/manually.rect.js.map +1 -0
- package/flow-diagram/src/parallel/index.d.ts +2 -0
- package/flow-diagram/src/parallel/index.js +3 -0
- package/flow-diagram/src/parallel/index.js.map +1 -0
- package/flow-diagram/src/parallel/parallel.anchor.d.ts +2 -0
- package/flow-diagram/src/parallel/parallel.anchor.js +6 -0
- package/flow-diagram/src/parallel/parallel.anchor.js.map +1 -0
- package/flow-diagram/src/parallel/parallel.d.ts +2 -0
- package/flow-diagram/src/parallel/parallel.js +9 -0
- package/flow-diagram/src/parallel/parallel.js.map +1 -0
- package/flow-diagram/src/queue/index.d.ts +2 -0
- package/flow-diagram/src/queue/index.js +3 -0
- package/flow-diagram/src/queue/index.js.map +1 -0
- package/flow-diagram/src/queue/queue.d.ts +2 -0
- package/flow-diagram/src/queue/queue.js +9 -0
- package/flow-diagram/src/queue/queue.js.map +1 -0
- package/flow-diagram/src/queue/queue.rect.d.ts +3 -0
- package/flow-diagram/src/queue/queue.rect.js +11 -0
- package/flow-diagram/src/queue/queue.rect.js.map +1 -0
- package/flow-diagram/src/register.d.ts +1 -0
- package/flow-diagram/src/register.js +26 -0
- package/flow-diagram/src/register.js.map +1 -0
- package/flow-diagram/src/subprocess/index.d.ts +2 -0
- package/flow-diagram/src/subprocess/index.js +3 -0
- package/flow-diagram/src/subprocess/index.js.map +1 -0
- package/flow-diagram/src/subprocess/subprocess.d.ts +2 -0
- package/flow-diagram/src/subprocess/subprocess.js +16 -0
- package/flow-diagram/src/subprocess/subprocess.js.map +1 -0
- package/flow-diagram/src/subprocess/subprocess.rect.d.ts +3 -0
- package/flow-diagram/src/subprocess/subprocess.rect.js +9 -0
- package/flow-diagram/src/subprocess/subprocess.rect.js.map +1 -0
- package/layout/index.d.ts +2 -0
- package/layout/index.js +3 -0
- package/layout/index.js.map +1 -0
- package/layout/src/align.d.ts +3 -0
- package/layout/src/align.js +67 -0
- package/layout/src/align.js.map +1 -0
- package/layout/src/layout.d.ts +9 -0
- package/layout/src/layout.js +50 -0
- package/layout/src/layout.js.map +1 -0
- package/myShape-diagram/myShape.js +196 -0
- package/myShape-diagram/myShape.ts +1 -0
- package/package.json +15 -0
- package/sequence-diagram/index.d.ts +3 -0
- package/sequence-diagram/index.js +4 -0
- package/sequence-diagram/index.js.map +1 -0
- package/sequence-diagram/src/focus/focus.anchor.d.ts +2 -0
- package/sequence-diagram/src/focus/focus.anchor.js +15 -0
- package/sequence-diagram/src/focus/focus.anchor.js.map +1 -0
- package/sequence-diagram/src/focus/focus.d.ts +2 -0
- package/sequence-diagram/src/focus/focus.js +13 -0
- package/sequence-diagram/src/focus/focus.js.map +1 -0
- package/sequence-diagram/src/focus/focus.rect.d.ts +3 -0
- package/sequence-diagram/src/focus/focus.rect.js +9 -0
- package/sequence-diagram/src/focus/focus.rect.js.map +1 -0
- package/sequence-diagram/src/focus/index.d.ts +3 -0
- package/sequence-diagram/src/focus/index.js +4 -0
- package/sequence-diagram/src/focus/index.js.map +1 -0
- package/sequence-diagram/src/lifeline/index.d.ts +3 -0
- package/sequence-diagram/src/lifeline/index.js +4 -0
- package/sequence-diagram/src/lifeline/index.js.map +1 -0
- package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +2 -0
- package/sequence-diagram/src/lifeline/lifeline.anchor.js +9 -0
- package/sequence-diagram/src/lifeline/lifeline.anchor.js.map +1 -0
- package/sequence-diagram/src/lifeline/lifeline.d.ts +2 -0
- package/sequence-diagram/src/lifeline/lifeline.js +35 -0
- package/sequence-diagram/src/lifeline/lifeline.js.map +1 -0
- package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +3 -0
- package/sequence-diagram/src/lifeline/lifeline.rect.js +9 -0
- package/sequence-diagram/src/lifeline/lifeline.rect.js.map +1 -0
- package/sequence-diagram/src/register.d.ts +1 -0
- package/sequence-diagram/src/register.js +8 -0
- package/sequence-diagram/src/register.js.map +1 -0
@@ -0,0 +1,295 @@
|
|
1
|
+
// getWords: Get the word array from text. A single Chinese character is a word.
|
2
|
+
export function getWords(txt) {
|
3
|
+
var words = [];
|
4
|
+
var word = '';
|
5
|
+
if (!txt) {
|
6
|
+
txt = '';
|
7
|
+
}
|
8
|
+
for (var i = 0; i < txt.length; ++i) {
|
9
|
+
var ch = txt.charCodeAt(i);
|
10
|
+
if (ch < 33 || ch > 126) {
|
11
|
+
if (word) {
|
12
|
+
words.push(word);
|
13
|
+
word = '';
|
14
|
+
}
|
15
|
+
words.push(txt[i]);
|
16
|
+
continue;
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
word += txt[i];
|
20
|
+
}
|
21
|
+
}
|
22
|
+
if (word) {
|
23
|
+
words.push(word);
|
24
|
+
}
|
25
|
+
return words;
|
26
|
+
}
|
27
|
+
// getLines:Get lines of drawing text.
|
28
|
+
// words - the word array of text, to avoid spliting a word.
|
29
|
+
// maxWidth - the max width of the rect.
|
30
|
+
export function getLines(ctx, words, maxWidth, fontSize) {
|
31
|
+
var lines = [];
|
32
|
+
var currentLine = words[0] || '';
|
33
|
+
for (var i = 1; i < words.length; ++i) {
|
34
|
+
var word = words[i] || '';
|
35
|
+
var text_1 = currentLine + word;
|
36
|
+
var chinese = text_1.match(/[\u4e00-\u9fa5]/g) || '';
|
37
|
+
var chineseLen = chinese.length;
|
38
|
+
if ((text_1.length - chineseLen) * fontSize * 0.5 + chineseLen * fontSize < maxWidth) {
|
39
|
+
currentLine += word;
|
40
|
+
}
|
41
|
+
else {
|
42
|
+
lines.push(currentLine);
|
43
|
+
currentLine = word;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
lines.push(currentLine);
|
47
|
+
return lines;
|
48
|
+
}
|
49
|
+
function textBk(ctx, str, x, y, height, color) {
|
50
|
+
if (!str || !color) {
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
var w = ctx.measureText(str).width;
|
54
|
+
ctx.save();
|
55
|
+
ctx.fillStyle = color;
|
56
|
+
var l = x - w / 2;
|
57
|
+
var t = y - height / 2;
|
58
|
+
switch (ctx.textAlign) {
|
59
|
+
case 'left':
|
60
|
+
l = x;
|
61
|
+
break;
|
62
|
+
case 'right':
|
63
|
+
l = x - w;
|
64
|
+
break;
|
65
|
+
}
|
66
|
+
switch (ctx.textBaseline) {
|
67
|
+
case 'top':
|
68
|
+
t = y;
|
69
|
+
break;
|
70
|
+
case 'bottom':
|
71
|
+
t = y - height;
|
72
|
+
break;
|
73
|
+
}
|
74
|
+
ctx.fillRect(l, t, w, height);
|
75
|
+
ctx.restore();
|
76
|
+
}
|
77
|
+
export function defaultText(ctx, node, type) {
|
78
|
+
const fontNode = type === 'head' ? node.font.thFont : node.font;
|
79
|
+
const lineHeight = fontNode.lineHeight ? `/${fontNode.lineHeight}` : '';
|
80
|
+
ctx.font = `${fontNode.fontStyle || 'normal'} ${fontNode.fontWeight || 'normal'} ${fontNode.fontSize}px ${lineHeight} ${fontNode.fontFamily}`;
|
81
|
+
if (fontNode.color) {
|
82
|
+
ctx.fillStyle = fontNode.activeColor && !node.activeImgeIndex ? fontNode.activeColor : fontNode.color;
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
ctx.fillStyle = node.name === 'formTable' ? '#fff' : '#222';
|
86
|
+
}
|
87
|
+
if(node.name === 'tablePagination') return;
|
88
|
+
if (fontNode.textAlign) {
|
89
|
+
ctx.textAlign = fontNode.textAlign;
|
90
|
+
}
|
91
|
+
if (fontNode.textBaseline) {
|
92
|
+
ctx.textBaseline = fontNode.textBaseline;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
function tableBaseText(ctx, node, type) {
|
97
|
+
defaultText(ctx, node, type)
|
98
|
+
switch (ctx.textAlign) {
|
99
|
+
case 'left':
|
100
|
+
ctx.textAlign = 'right'
|
101
|
+
break;
|
102
|
+
case 'right':
|
103
|
+
ctx.textAlign = 'left'
|
104
|
+
break;
|
105
|
+
}
|
106
|
+
switch (ctx.textBaseline) {
|
107
|
+
case 'top':
|
108
|
+
ctx.textBaseline = 'bottom'
|
109
|
+
break;
|
110
|
+
case 'bottom':
|
111
|
+
ctx.textBaseline = 'top'
|
112
|
+
break;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
export function fillText(ctx, lines, x, y, width, height, lineHeight, maxLineLen, bk) {
|
117
|
+
if (!maxLineLen || maxLineLen > lines.length) {
|
118
|
+
maxLineLen = lines.length;
|
119
|
+
}
|
120
|
+
else {
|
121
|
+
maxLineLen = Math.ceil(maxLineLen);
|
122
|
+
}
|
123
|
+
for (var i = 0; i < maxLineLen - 1; ++i) {
|
124
|
+
if (bk) {
|
125
|
+
textBk(ctx, lines[i], x, y + i * lineHeight, lineHeight, bk);
|
126
|
+
}
|
127
|
+
ctx.fillText(lines[i], x, y + i * lineHeight);
|
128
|
+
}
|
129
|
+
if (maxLineLen < lines.length) {
|
130
|
+
var str = (lines[maxLineLen - 1] || '') + '...';
|
131
|
+
if (lines[maxLineLen - 1] && ctx.measureText(str).width > width) {
|
132
|
+
str = lines[maxLineLen - 1].substr(0, lines[maxLineLen - 1].length - 2) + '...';
|
133
|
+
}
|
134
|
+
if (bk) {
|
135
|
+
textBk(ctx, str, x, y + (maxLineLen - 1) * lineHeight, lineHeight, bk);
|
136
|
+
}
|
137
|
+
ctx.fillText(str, x, y + (maxLineLen - 1) * lineHeight);
|
138
|
+
}
|
139
|
+
else {
|
140
|
+
if (bk) {
|
141
|
+
textBk(ctx, lines[maxLineLen - 1], x, y + (maxLineLen - 1) * lineHeight, lineHeight, bk);
|
142
|
+
}
|
143
|
+
ctx.fillText(lines[maxLineLen - 1], x, y + (maxLineLen - 1) * lineHeight);
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
147
|
+
export function tableText(ctx, node) {
|
148
|
+
const { tableHeader, tableBody, styleNode } = node.formData;
|
149
|
+
const boxWidth = node.rect.width / tableHeader.length;
|
150
|
+
// 表头文字内容
|
151
|
+
tableBaseText(ctx, node, 'head');
|
152
|
+
tableHeader.forEach((item, i) => {
|
153
|
+
ctx.fillText(item.name, node.rect.x + boxWidth * i + boxWidth/2, node.rect.y + node.formStyle.thHeight/2);
|
154
|
+
});
|
155
|
+
|
156
|
+
if(!tableBody) return;
|
157
|
+
// 表格主体文字
|
158
|
+
const boxHeight = tableBody.length > 0 ? (node.rect.height - node.formStyle.thHeight) / tableBody.length : 44;
|
159
|
+
tableBaseText(ctx, node);
|
160
|
+
tableBody.forEach((item, index) => {
|
161
|
+
const state = item['state'] || item['status'];
|
162
|
+
let fontColor = '';
|
163
|
+
// 0:发生告警;1:离线告警;2,3:无告警;4:故障告警
|
164
|
+
if(parseInt(state) === 0) fontColor = '#FF0000';
|
165
|
+
if(parseInt(state) === 1) fontColor = '#6d6d6d';
|
166
|
+
if(parseInt(state) === 4) fontColor = '#D38C00';
|
167
|
+
tableHeader.forEach((hnode, i) => {
|
168
|
+
const styleData = styleNode ? styleNode[`${index}-${i}`] || styleNode[`row-${i}`] || styleNode[`${index}-col`] : '';
|
169
|
+
if(fontColor) {
|
170
|
+
ctx.fillStyle = fontColor;
|
171
|
+
}else {
|
172
|
+
ctx.fillStyle = styleData ? styleData.color : node.font.color;
|
173
|
+
}
|
174
|
+
const textLength = item[hnode.key].length * node.font.fontSize + 10;
|
175
|
+
let textStr = item[hnode.key];
|
176
|
+
if(textLength >= boxWidth) textStr = textStr.substring(0, boxWidth/node.font.fontSize- 2) + '...';
|
177
|
+
ctx.fillText(textStr, node.rect.x + boxWidth * i + boxWidth/2, node.rect.y + boxHeight * index + node.formStyle.thHeight + boxHeight/2);
|
178
|
+
})
|
179
|
+
})
|
180
|
+
}
|
181
|
+
|
182
|
+
export function text(ctx, node) {
|
183
|
+
if (!node.text) {
|
184
|
+
return;
|
185
|
+
}
|
186
|
+
if (!node.text.split) {
|
187
|
+
node.text += '';
|
188
|
+
}
|
189
|
+
ctx.save();
|
190
|
+
ctx.beginPath();
|
191
|
+
delete ctx.shadowColor;
|
192
|
+
delete ctx.shadowBlur;
|
193
|
+
defaultText(ctx, node)
|
194
|
+
var textRect = node.getTextRect();
|
195
|
+
var lines = [];
|
196
|
+
var paragraphs = node.text.split(/[\n]/g);
|
197
|
+
for (var i = 0; i < paragraphs.length; ++i) {
|
198
|
+
var l = getLines(ctx, getWords(paragraphs[i]), textRect.width, node.font.fontSize);
|
199
|
+
lines.push.apply(lines, l);
|
200
|
+
}
|
201
|
+
var lineHeight = node.font.fontSize * node.font.lineHeight;
|
202
|
+
var maxLineLen = node.textMaxLine || lines.length;
|
203
|
+
// const rectLines = textRect.height / lineHeight;
|
204
|
+
// if (!maxLineLen) {
|
205
|
+
// maxLineLen = lines.length > rectLines ? rectLines : lines.length;
|
206
|
+
// }
|
207
|
+
// By default, the text is center aligned.
|
208
|
+
var x = textRect.x + textRect.width / 2;
|
209
|
+
var y = textRect.y + (textRect.height - lineHeight * maxLineLen) / 2 + (lineHeight * 4) / 7;
|
210
|
+
switch (ctx.textAlign) {
|
211
|
+
case 'left':
|
212
|
+
x = textRect.x;
|
213
|
+
break;
|
214
|
+
case 'right':
|
215
|
+
x = textRect.x + textRect.width;
|
216
|
+
break;
|
217
|
+
}
|
218
|
+
switch (ctx.textBaseline) {
|
219
|
+
case 'top':
|
220
|
+
y = textRect.y + (lineHeight - node.font.fontSize) / 2;
|
221
|
+
break;
|
222
|
+
case 'bottom':
|
223
|
+
y = textRect.ey - lineHeight * lines.length + lineHeight;
|
224
|
+
break;
|
225
|
+
}
|
226
|
+
fillText(ctx, lines, x + node.textOffsetX, y + node.textOffsetY, textRect.width, textRect.height, lineHeight, maxLineLen, node.font.background);
|
227
|
+
ctx.restore();
|
228
|
+
}
|
229
|
+
export function iconfont(ctx, node) {
|
230
|
+
ctx.save();
|
231
|
+
ctx.textAlign = 'center';
|
232
|
+
ctx.textBaseline = 'middle';
|
233
|
+
var iconRect = node.getIconRect();
|
234
|
+
var x = iconRect.x + iconRect.width / 2;
|
235
|
+
var y = iconRect.y + iconRect.height / 2;
|
236
|
+
switch (node.imageAlign) {
|
237
|
+
case 'top':
|
238
|
+
y = iconRect.y;
|
239
|
+
ctx.textBaseline = 'top';
|
240
|
+
break;
|
241
|
+
case 'bottom':
|
242
|
+
y = iconRect.ey;
|
243
|
+
ctx.textBaseline = 'bottom';
|
244
|
+
break;
|
245
|
+
case 'left':
|
246
|
+
x = iconRect.x;
|
247
|
+
ctx.textAlign = 'left';
|
248
|
+
break;
|
249
|
+
case 'right':
|
250
|
+
x = iconRect.ex;
|
251
|
+
ctx.textAlign = 'right';
|
252
|
+
break;
|
253
|
+
case 'left-top':
|
254
|
+
x = iconRect.x;
|
255
|
+
y = iconRect.y;
|
256
|
+
ctx.textAlign = 'left';
|
257
|
+
ctx.textBaseline = 'top';
|
258
|
+
break;
|
259
|
+
case 'right-top':
|
260
|
+
x = iconRect.ex;
|
261
|
+
y = iconRect.y;
|
262
|
+
ctx.textAlign = 'right';
|
263
|
+
ctx.textBaseline = 'top';
|
264
|
+
break;
|
265
|
+
case 'left-bottom':
|
266
|
+
x = iconRect.x;
|
267
|
+
y = iconRect.ey;
|
268
|
+
ctx.textAlign = 'left';
|
269
|
+
ctx.textBaseline = 'bottom';
|
270
|
+
break;
|
271
|
+
case 'right-bottom':
|
272
|
+
x = iconRect.ex;
|
273
|
+
y = iconRect.ey;
|
274
|
+
ctx.textAlign = 'right';
|
275
|
+
ctx.textBaseline = 'bottom';
|
276
|
+
break;
|
277
|
+
}
|
278
|
+
if (node.iconSize > 0) {
|
279
|
+
ctx.font = node.iconSize + "px " + node.iconFamily;
|
280
|
+
}
|
281
|
+
else if (iconRect.width > iconRect.height) {
|
282
|
+
ctx.font = iconRect.height + "px " + node.iconFamily;
|
283
|
+
}
|
284
|
+
else {
|
285
|
+
ctx.font = iconRect.width + "px " + node.iconFamily;
|
286
|
+
}
|
287
|
+
if (!node.iconColor) {
|
288
|
+
node.iconColor = '#2f54eb';
|
289
|
+
}
|
290
|
+
ctx.fillStyle = node.iconColor;
|
291
|
+
ctx.beginPath();
|
292
|
+
ctx.fillText(node.icon, x, y);
|
293
|
+
ctx.restore();
|
294
|
+
}
|
295
|
+
//# sourceMappingURL=text.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/text.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAChF,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,IAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,CAAC,GAAG,EAAE;QACR,GAAG,GAAG,EAAE,CAAC;KACV;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACnC,IAAM,EAAE,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,EAAE;YACvB,IAAI,IAAI,EAAE;gBACR,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACjB,IAAI,GAAG,EAAE,CAAC;aACX;YACD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACnB,SAAS;SACV;aAAM;YACL,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;SAChB;KACF;IAED,IAAI,IAAI,EAAE;QACR,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAClB;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,sCAAsC;AACtC,4DAA4D;AAC5D,wCAAwC;AACxC,MAAM,UAAU,QAAQ,CAAC,GAA6B,EAAE,KAAe,EAAE,QAAgB,EAAE,QAAgB;IACzG,IAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,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direction';
|
3
|
+
export function triangleAnchors(node) {
|
4
|
+
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
|
5
|
+
node.anchors.push(new Point(node.rect.x + (node.rect.width * 3) / 4, node.rect.y + node.rect.height / 2, Direction.Right));
|
6
|
+
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
|
7
|
+
node.anchors.push(new Point(node.rect.x + node.rect.width / 4, node.rect.y + node.rect.height / 2, Direction.Left));
|
8
|
+
}
|
9
|
+
//# sourceMappingURL=triangle.anchor.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"triangle.anchor.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/triangle.anchor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,UAAU,eAAe,CAAC,IAAU;IACxC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3F,IAAI,CAAC,OAAO,CAAC,IAAI,CACf,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CACxG,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAClH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AACtH,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export function triangle(ctx, node) {
|
2
|
+
ctx.beginPath();
|
3
|
+
ctx.moveTo(node.rect.x + node.rect.width / 2, node.rect.y);
|
4
|
+
ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height);
|
5
|
+
ctx.lineTo(node.rect.x, node.rect.y + node.rect.height);
|
6
|
+
ctx.closePath();
|
7
|
+
(node.fillStyle || node.bkType) && ctx.fill();
|
8
|
+
ctx.stroke();
|
9
|
+
}
|
10
|
+
//# sourceMappingURL=triangle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"triangle.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/triangle.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,CAAC,GAA6B,EAAE,IAAU;IAChE,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3D,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1E,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxD,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9C,GAAG,CAAC,MAAM,EAAE,CAAC;AACf,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Rect } from '../../models/rect';
|
2
|
+
export function triangleIconRect(node) {
|
3
|
+
var w = (node.rect.width * 2) / 7;
|
4
|
+
var h = (node.rect.height * 2) / 7;
|
5
|
+
if (w > h) {
|
6
|
+
w = h;
|
7
|
+
}
|
8
|
+
else {
|
9
|
+
h = w;
|
10
|
+
}
|
11
|
+
var top = w;
|
12
|
+
if (top < 10) {
|
13
|
+
top = 10;
|
14
|
+
}
|
15
|
+
node.iconRect = new Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + top, w, h);
|
16
|
+
}
|
17
|
+
export function triangleTextRect(node) {
|
18
|
+
node.textRect = new Rect(node.rect.x + node.rect.width / 4, node.rect.y + (node.rect.height * 2) / 3, node.rect.width / 2, node.rect.height / 3 - 5);
|
19
|
+
var w = node.rect.width / 2;
|
20
|
+
var h = (node.rect.height * 3) / 7;
|
21
|
+
node.fullTextRect = new Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + node.rect.height / 2 - 5, w, h);
|
22
|
+
}
|
23
|
+
//# sourceMappingURL=triangle.rect.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"triangle.rect.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/triangle.rect.ts"],"names":[],"mappings":"AAC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,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACtH,CAAC"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { Pen } from './pen';
|
2
|
+
import { Lock } from './status';
|
3
|
+
export declare class TopologyData {
|
4
|
+
pens: Pen[];
|
5
|
+
lineName: string;
|
6
|
+
fromArrowType: string;
|
7
|
+
toArrowType: string;
|
8
|
+
scale: number;
|
9
|
+
locked: Lock;
|
10
|
+
bkImage: string;
|
11
|
+
bkColor: string;
|
12
|
+
grid?: boolean;
|
13
|
+
websocket?: string;
|
14
|
+
mqttUrl?: string;
|
15
|
+
mqttOptions?: {
|
16
|
+
clientId?: string;
|
17
|
+
username?: string;
|
18
|
+
password?: string;
|
19
|
+
};
|
20
|
+
mqttTopics?: string;
|
21
|
+
manualCps?: boolean;
|
22
|
+
dataConstruct?: any;
|
23
|
+
data?: any;
|
24
|
+
bkImageRect?: any;
|
25
|
+
constructor(json?: any);
|
26
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { Node } from './node';
|
2
|
+
import { Line } from './line';
|
3
|
+
import { Lock } from './status';
|
4
|
+
import { s8 } from '../utils';
|
5
|
+
var TopologyData = /** @class */ (function () {
|
6
|
+
function TopologyData(json) {
|
7
|
+
this.pens = [];
|
8
|
+
this.lineName = 'curve';
|
9
|
+
this.fromArrowType = '';
|
10
|
+
this.toArrowType = 'triangleSolid';
|
11
|
+
this.scale = 1;
|
12
|
+
this.locked = Lock.None;
|
13
|
+
this.bkImageRect = null;
|
14
|
+
this.mqttOptions = {
|
15
|
+
clientId: s8()
|
16
|
+
};
|
17
|
+
this.dataConstruct = {};
|
18
|
+
if (json) {
|
19
|
+
this.pens = [];
|
20
|
+
json.dataConstruct = {};
|
21
|
+
for (var _i = 0, _a = json.pens; _i < _a.length; _i++) {
|
22
|
+
var item = _a[_i];
|
23
|
+
if (item.from) {
|
24
|
+
this.pens.push(new Line(item));
|
25
|
+
}
|
26
|
+
else {
|
27
|
+
if(item.name === 'formTable') {
|
28
|
+
json.dataConstruct[item.id] = {
|
29
|
+
id: item.id,
|
30
|
+
name: 'table'
|
31
|
+
}
|
32
|
+
}
|
33
|
+
this.pens.push(new Node(item));
|
34
|
+
}
|
35
|
+
}
|
36
|
+
this.lineName = json.lineName || 'curve';
|
37
|
+
this.fromArrowType = json.fromArrowType || '';
|
38
|
+
this.toArrowType = json.toArrowType || 'triangleSolid';
|
39
|
+
this.scale = json.scale || 1;
|
40
|
+
this.locked = json.locked || Lock.None;
|
41
|
+
this.bkImage = json.bkImage;
|
42
|
+
this.bkColor = json.bkColor;
|
43
|
+
this.grid = json.grid;
|
44
|
+
this.manualCps = json.manualCps;
|
45
|
+
this.websocket = json.websocket;
|
46
|
+
this.mqttUrl = json.mqttUrl;
|
47
|
+
this.bkImageRect = json.bkImageRect;
|
48
|
+
if (json.mqttOptions) {
|
49
|
+
var opts = '';
|
50
|
+
if (typeof json.mqttOptions === 'object') {
|
51
|
+
opts = JSON.stringify(json.mqttOptions);
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
opts = json.mqttOptions + '';
|
55
|
+
}
|
56
|
+
this.mqttOptions = JSON.parse(opts);
|
57
|
+
}
|
58
|
+
else {
|
59
|
+
this.mqttOptions = { clientId: s8() };
|
60
|
+
}
|
61
|
+
this.dataConstruct = json.dataConstruct ? json.dataConstruct : {};
|
62
|
+
this.mqttTopics = json.mqttTopics;
|
63
|
+
if (typeof json.data === 'object') {
|
64
|
+
this.data = JSON.parse(JSON.stringify(json.data));
|
65
|
+
}
|
66
|
+
else {
|
67
|
+
this.data = json.data || '';
|
68
|
+
}
|
69
|
+
}
|
70
|
+
if (!this.mqttOptions) {
|
71
|
+
this.mqttOptions = { clientId: s8() };
|
72
|
+
}
|
73
|
+
}
|
74
|
+
return TopologyData;
|
75
|
+
}());
|
76
|
+
export { TopologyData };
|
77
|
+
//# sourceMappingURL=data.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../packages/core/src/models/data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B;IAsBE,sBAAY,IAAU;QArBtB,SAAI,GAAU,EAAE,CAAC;QACjB,aAAQ,GAAG,OAAO,CAAC;QACnB,kBAAa,GAAG,EAAE,CAAC;QACnB,gBAAW,GAAG,eAAe,CAAC;QAC9B,UAAK,GAAG,CAAC,CAAC;QACV,WAAM,GAAG,IAAI,CAAC,IAAI,CAAC;QAMnB,gBAAW,GAIP;YACA,QAAQ,EAAE,EAAE,EAAE;SACf,CAAC;QAKF,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;YACf,KAAmB,UAAS,EAAT,KAAA,IAAI,CAAC,IAAI,EAAT,cAAS,EAAT,IAAS,EAAE;gBAAzB,IAAM,IAAI,SAAA;gBACb,IAAI,IAAI,CAAC,IAAI,EAAE;oBACb,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;iBAChC;qBAAM;oBACL,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;iBAChC;aAC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BACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aACnD;iBAAM;gBACL,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;aAC7B;SACF;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;SACvC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AAnED,IAmEC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export var Direction;
|
2
|
+
(function (Direction) {
|
3
|
+
Direction[Direction["None"] = 0] = "None";
|
4
|
+
Direction[Direction["Up"] = 1] = "Up";
|
5
|
+
Direction[Direction["Right"] = 2] = "Right";
|
6
|
+
Direction[Direction["Bottom"] = 3] = "Bottom";
|
7
|
+
Direction[Direction["Left"] = 4] = "Left";
|
8
|
+
})(Direction || (Direction = {}));
|
9
|
+
//# sourceMappingURL=direction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"direction.js","sourceRoot":"","sources":["../../../../packages/core/src/models/direction.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,yCAAI,CAAA;IACJ,qCAAE,CAAA;IACF,2CAAK,CAAA;IACL,6CAAM,CAAA;IACN,yCAAI,CAAA;AACN,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export var EventType;
|
2
|
+
(function (EventType) {
|
3
|
+
EventType[EventType["Click"] = 0] = "Click";
|
4
|
+
EventType[EventType["DblClick"] = 1] = "DblClick";
|
5
|
+
EventType[EventType["WebSocket"] = 2] = "WebSocket";
|
6
|
+
EventType[EventType["Mqtt"] = 3] = "Mqtt";
|
7
|
+
})(EventType || (EventType = {}));
|
8
|
+
export var EventAction;
|
9
|
+
(function (EventAction) {
|
10
|
+
EventAction[EventAction["Link"] = 0] = "Link";
|
11
|
+
EventAction[EventAction["Animate"] = 1] = "Animate";
|
12
|
+
EventAction[EventAction["Function"] = 2] = "Function";
|
13
|
+
EventAction[EventAction["WindowFn"] = 3] = "WindowFn";
|
14
|
+
EventAction[EventAction["SetProps"] = 4] = "SetProps";
|
15
|
+
})(EventAction || (EventAction = {}));
|
16
|
+
//# sourceMappingURL=event.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../../packages/core/src/models/event.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,2CAAK,CAAA;IACL,iDAAQ,CAAA;IACR,mDAAS,CAAA;IACT,yCAAI,CAAA;AACN,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,mDAAO,CAAA;IACP,qDAAQ,CAAA;IACR,qDAAQ,CAAA;IACR,qDAAQ,CAAA;AACV,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from './data';
|
2
|
+
export * from './pen';
|
3
|
+
export * from './node';
|
4
|
+
export * from './line';
|
5
|
+
export * from './direction';
|
6
|
+
export * from './point';
|
7
|
+
export * from './rect';
|
8
|
+
export * from './status';
|
9
|
+
export * from './event';
|
10
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/core/src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { Pen } from './pen';
|
2
|
+
import { Point } from './point';
|
3
|
+
import { Rect } from './rect';
|
4
|
+
export declare class Line extends Pen {
|
5
|
+
from: Point;
|
6
|
+
to: Point;
|
7
|
+
controlPoints: Point[];
|
8
|
+
fromArrow: string;
|
9
|
+
toArrow: string;
|
10
|
+
fromArrowSize: number;
|
11
|
+
toArrowSize: number;
|
12
|
+
fromArrowColor: string;
|
13
|
+
toArrowColor: string;
|
14
|
+
length: number;
|
15
|
+
borderWidth: number;
|
16
|
+
borderColor: string;
|
17
|
+
animateColor: string;
|
18
|
+
animateSpan: number;
|
19
|
+
animatePos: number;
|
20
|
+
animateLineDash: number[];
|
21
|
+
isAnimate: boolean;
|
22
|
+
animateFromSize: number;
|
23
|
+
animateToSize: number;
|
24
|
+
animateDot: {
|
25
|
+
x: number;
|
26
|
+
y: number;
|
27
|
+
};
|
28
|
+
animateDotSize: number;
|
29
|
+
lineJoin: CanvasLineJoin;
|
30
|
+
manualCps: boolean;
|
31
|
+
disableEmptyLine: boolean;
|
32
|
+
constructor(json?: any);
|
33
|
+
setFrom(from: Point, fromArrow?: string): void;
|
34
|
+
setTo(to: Point, toArrow?: string): void;
|
35
|
+
calcControlPoints(force?: boolean): void;
|
36
|
+
draw(ctx: CanvasRenderingContext2D): void;
|
37
|
+
pointIn(pt: Point): any;
|
38
|
+
getLen(): number;
|
39
|
+
calcTextRect(): void;
|
40
|
+
getTextRect(): Rect;
|
41
|
+
getCenter(): Point;
|
42
|
+
getLineCenter(from: Point, to: Point): Point;
|
43
|
+
getPointByPos(pos: number): Point;
|
44
|
+
getLinePtByPos(from: Point, to: Point, pos: number): Point;
|
45
|
+
calcRectInParent(parent: Pen): void;
|
46
|
+
calcRectByParent(parent: Pen): void;
|
47
|
+
animate(now: number): void;
|
48
|
+
getBubbles(): any[];
|
49
|
+
round(): void;
|
50
|
+
translate(x: number, y: number): void;
|
51
|
+
scale(scale: number, center: Point): void;
|
52
|
+
clone(): Line;
|
53
|
+
}
|