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,16 @@
|
|
1
|
+
import { Options } from './options';
|
2
|
+
import { Canvas } from './canvas';
|
3
|
+
import { ActiveLayer } from './activeLayer';
|
4
|
+
import { HoverLayer } from './hoverLayer';
|
5
|
+
import { AnimateLayer } from './animateLayer';
|
6
|
+
export declare class Offscreen extends Canvas {
|
7
|
+
parentElem: HTMLElement;
|
8
|
+
options: Options;
|
9
|
+
activeLayer: ActiveLayer;
|
10
|
+
hoverLayer: HoverLayer;
|
11
|
+
animateLayer: AnimateLayer;
|
12
|
+
constructor(parentElem: HTMLElement, options: Options, TID: String);
|
13
|
+
getRoutineLayer(auto?:[]): void;
|
14
|
+
render(): void;
|
15
|
+
destroy(): void;
|
16
|
+
}
|
@@ -0,0 +1,70 @@
|
|
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
extendStatics(d, b);
|
10
|
+
function __() { this.constructor = d; }
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
12
|
+
};
|
13
|
+
})();
|
14
|
+
import { Store } from 'le5le-store';
|
15
|
+
import { Canvas } from './canvas';
|
16
|
+
var Offscreen = /** @class */ (function (_super) {
|
17
|
+
__extends(Offscreen, _super);
|
18
|
+
function Offscreen(parentElem, options, TID) {
|
19
|
+
if (options === void 0) { options = {}; }
|
20
|
+
var _this = _super.call(this, parentElem, options, TID) || this;
|
21
|
+
_this.parentElem = parentElem;
|
22
|
+
_this.options = options;
|
23
|
+
_this.activeLayer = null;
|
24
|
+
_this.hoverLayer = null;
|
25
|
+
_this.animateLayer = null;
|
26
|
+
Store.set(_this.generateStoreKey('LT:offscreen'), _this.canvas);
|
27
|
+
return _this;
|
28
|
+
}
|
29
|
+
Offscreen.prototype.getRoutineLayer = function(auto) {
|
30
|
+
if(!auto || auto.includes('ActiveLayer')) {
|
31
|
+
this.activeLayer = Store.get(this.generateStoreKey('LT:ActiveLayer'));
|
32
|
+
}
|
33
|
+
if(!auto || auto.includes('HoverLayer')) {
|
34
|
+
this.hoverLayer = Store.get(this.generateStoreKey('LT:HoverLayer'));
|
35
|
+
}
|
36
|
+
if(!auto || auto.includes('AnimateLayer')) {
|
37
|
+
this.animateLayer = Store.get(this.generateStoreKey('LT:AnimateLayer'));
|
38
|
+
}
|
39
|
+
};
|
40
|
+
Offscreen.prototype.render = function () {
|
41
|
+
_super.prototype.render.call(this);
|
42
|
+
var ctx = this.canvas.getContext('2d');
|
43
|
+
ctx.strokeStyle = this.options.color;
|
44
|
+
for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
|
45
|
+
var item = _a[_i];
|
46
|
+
if (!item.getTID()) {
|
47
|
+
item.setTID(this.TID);
|
48
|
+
}
|
49
|
+
item.render(ctx);
|
50
|
+
}
|
51
|
+
if(this.activeLayer) {
|
52
|
+
this.activeLayer.render(ctx);
|
53
|
+
}
|
54
|
+
if(this.hoverLayer) {
|
55
|
+
this.hoverLayer.render(ctx);
|
56
|
+
}
|
57
|
+
if(this.animateLayer) {
|
58
|
+
this.animateLayer.render(ctx);
|
59
|
+
}
|
60
|
+
};
|
61
|
+
Offscreen.prototype.destroy = function () {
|
62
|
+
this.options = null;
|
63
|
+
this.activeLayer = null;
|
64
|
+
this.hoverLayer = null;
|
65
|
+
this.animateLayer = null;
|
66
|
+
};
|
67
|
+
return Offscreen;
|
68
|
+
}(Canvas));
|
69
|
+
export { Offscreen };
|
70
|
+
//# sourceMappingURL=offscreen.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"offscreen.js","sourceRoot":"","sources":["../../../packages/core/src/offscreen.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKlC;IAA+B,6BAAM;IAInC,mBAAmB,UAAuB,EAAS,OAAqB,EAAE,GAAW;QAAlC,wBAAA,EAAA,YAAqB;QAAxE,YACE,kBAAM,UAAU,EAAE,OAAO,EAAE,GAAG,CAAC,SAKhC;QANkB,gBAAU,GAAV,UAAU,CAAa;QAAS,aAAO,GAAP,OAAO,CAAc;QAEtE,KAAI,CAAC,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,KAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACtE,KAAI,CAAC,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,KAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;QACpE,KAAI,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,KAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACxE,KAAK,CAAC,GAAG,CAAC,KAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE,KAAI,CAAC,MAAM,CAAC,CAAC;;IAChE,CAAC;IAED,0BAAM,GAAN;QACE,iBAAM,MAAM,WAAE,CAAC;QAEf,IAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;QAErC,KAAmB,UAAc,EAAd,KAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAd,cAAc,EAAd,IAAc,EAAE;YAA9B,IAAM,IAAI,SAAA;YACb,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;gBAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACvB;YACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAClB;QAED,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAGH,gBAAC;AAAD,CAAC,AA/BD,CAA+B,MAAM,GA+BpC"}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
export declare enum KeyType {
|
2
|
+
None = -1,
|
3
|
+
CtrlOrAlt = 0,
|
4
|
+
Ctrl = 1,
|
5
|
+
Shift = 2,
|
6
|
+
Alt = 3
|
7
|
+
}
|
8
|
+
export declare enum KeydownType {
|
9
|
+
None = -1,
|
10
|
+
Document = 0,
|
11
|
+
Canvas = 1
|
12
|
+
}
|
13
|
+
export interface Options {
|
14
|
+
cacheLen?: number;
|
15
|
+
extDpiRatio?: number;
|
16
|
+
width?: string | number;
|
17
|
+
height?: string | number;
|
18
|
+
color?: string;
|
19
|
+
activeColor?: string;
|
20
|
+
hoverColor?: string;
|
21
|
+
anchorRadius?: number;
|
22
|
+
anchorFillStyle?: string;
|
23
|
+
dockStrokeStyle?: string;
|
24
|
+
dockFillStyle?: string;
|
25
|
+
dragColor?: string;
|
26
|
+
animateColor?: string;
|
27
|
+
font?: {
|
28
|
+
color?: string;
|
29
|
+
fontFamily?: string;
|
30
|
+
fontSize?: number;
|
31
|
+
lineHeight?: number;
|
32
|
+
textAlign?: string;
|
33
|
+
textBaseline?: string;
|
34
|
+
};
|
35
|
+
rotateCursor?: string;
|
36
|
+
hoverCursor?: string;
|
37
|
+
hideInput?: boolean;
|
38
|
+
hideRotateCP?: boolean;
|
39
|
+
hideSizeCP?: boolean;
|
40
|
+
hideAnchor?: boolean;
|
41
|
+
onlySizeX?: boolean;
|
42
|
+
onlySizeY?: boolean;
|
43
|
+
anchorSize?: number;
|
44
|
+
alwaysAnchor?: boolean;
|
45
|
+
disableEmptyLine?: boolean;
|
46
|
+
disableRepeatLine?: boolean;
|
47
|
+
disableScale?: boolean;
|
48
|
+
disableMoveOutParent?: boolean;
|
49
|
+
disableDockLine?: boolean;
|
50
|
+
playIcon?: string;
|
51
|
+
pauseIcon?: string;
|
52
|
+
fullScreenIcon?: string;
|
53
|
+
loopIcon?: string;
|
54
|
+
translateKey?: KeyType;
|
55
|
+
scaleKey?: KeyType;
|
56
|
+
minScale?: number;
|
57
|
+
maxScale?: number;
|
58
|
+
autoExpandDistance?: number;
|
59
|
+
keydown?: KeydownType;
|
60
|
+
viewPadding?: Padding;
|
61
|
+
on?: (event: string, data: any) => void;
|
62
|
+
}
|
63
|
+
export declare const DefalutOptions: Options;
|
64
|
+
|
65
|
+
export class Padding {
|
66
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
export var KeyType;
|
2
|
+
(function (KeyType) {
|
3
|
+
KeyType[KeyType["None"] = -1] = "None";
|
4
|
+
KeyType[KeyType["CtrlOrAlt"] = 0] = "CtrlOrAlt";
|
5
|
+
KeyType[KeyType["Ctrl"] = 1] = "Ctrl";
|
6
|
+
KeyType[KeyType["Shift"] = 2] = "Shift";
|
7
|
+
KeyType[KeyType["Alt"] = 3] = "Alt";
|
8
|
+
})(KeyType || (KeyType = {}));
|
9
|
+
export var KeydownType;
|
10
|
+
(function (KeydownType) {
|
11
|
+
KeydownType[KeydownType["None"] = -1] = "None";
|
12
|
+
KeydownType[KeydownType["Document"] = 0] = "Document";
|
13
|
+
KeydownType[KeydownType["Canvas"] = 1] = "Canvas";
|
14
|
+
})(KeydownType || (KeydownType = {}));
|
15
|
+
export var DefalutOptions = {
|
16
|
+
cacheLen: 30,
|
17
|
+
font: {
|
18
|
+
color: '#fff',
|
19
|
+
fontFamily: '"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial',
|
20
|
+
fontSize: 12,
|
21
|
+
lineHeight: 1.5,
|
22
|
+
textAlign: 'center',
|
23
|
+
textBaseline: 'middle',
|
24
|
+
},
|
25
|
+
color: '#222',
|
26
|
+
hoverColor: '#fa541c',
|
27
|
+
anchorRadius: 4,
|
28
|
+
anchorFillStyle: '#fff',
|
29
|
+
dockStrokeStyle: '#fa541c',
|
30
|
+
dockFillStyle: '#fa541c',
|
31
|
+
dragColor: '#1890ff',
|
32
|
+
activeColor: '#1890ff',
|
33
|
+
rotateCursor: '/assets/img/rotate.cur',
|
34
|
+
hoverCursor: 'pointer',
|
35
|
+
minScale: 0.1,
|
36
|
+
maxScale: 5,
|
37
|
+
anchorSize: 5,
|
38
|
+
autoExpandDistance: 200,
|
39
|
+
keydown: KeydownType.Document,
|
40
|
+
viewPadding: 0,
|
41
|
+
};
|
42
|
+
//# sourceMappingURL=options.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../packages/core/src/options.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,sCAAS,CAAA;IACT,+CAAS,CAAA;IACT,qCAAI,CAAA;IACJ,uCAAK,CAAA;IACL,mCAAG,CAAA;AACL,CAAC,EANW,OAAO,KAAP,OAAO,QAMlB;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8CAAS,CAAA;IACT,qDAAQ,CAAA;IACR,iDAAM,CAAA;AACR,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAoDD,MAAM,CAAC,IAAM,cAAc,GAAY;IACrC,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,2EAA2E;QACvF,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,GAAG;QACf,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,QAAQ;KACvB;IACD,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,CAAC;IACf,eAAe,EAAE,MAAM;IACvB,eAAe,EAAE,SAAS;IAC1B,aAAa,EAAE,SAAS;IACxB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,wBAAwB;IACtC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,CAAC;IACb,kBAAkB,EAAE,GAAG;IACvB,OAAO,EAAE,WAAW,CAAC,QAAQ;CAC9B,CAAC"}
|
package/core/src/poll.js
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
import { EventType } from 'dcim-topology/core/src/models';
|
2
|
+
|
3
|
+
// 轮询
|
4
|
+
var POLL = /** @class */ (function () {
|
5
|
+
function POLL(data, message, val) {
|
6
|
+
this.data = data;
|
7
|
+
this.client = message;
|
8
|
+
this.val = val;
|
9
|
+
this.init();
|
10
|
+
};
|
11
|
+
POLL.prototype.init = function () {
|
12
|
+
let topics = ''
|
13
|
+
this.getPen(this.data.pens, topics, JSON.stringify(this.client))
|
14
|
+
};
|
15
|
+
POLL.prototype.getPen = function (pens, topics, message) {
|
16
|
+
const _this = this;
|
17
|
+
pens.forEach((pen)=>{
|
18
|
+
if(pen.children != undefined){
|
19
|
+
_this.getPen(pen.children, topics, message)
|
20
|
+
}else{
|
21
|
+
var item = pen;
|
22
|
+
for (var _b = 0, _c = item.events; _b < _c.length; _b++) {
|
23
|
+
var event_1 = _c[_b];
|
24
|
+
// if (event_1.type === EventType.Poll) {
|
25
|
+
if ((event_1.type ===3 && this.val === 'Mqtt') || (event_1.type ===4 && this.val === 'Poll')
|
26
|
+
|| (event_1.type ===5 && this.val === 'Poll1') || (event_1.type ===6 && this.val === 'Poll2')) {
|
27
|
+
event_1.name = topics;
|
28
|
+
if(message){
|
29
|
+
item.doSocketMqtt(event_1, message.toString());
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
})
|
35
|
+
};
|
36
|
+
return POLL;
|
37
|
+
}());
|
38
|
+
export { POLL };
|
39
|
+
//# sourceMappingURL=mqtt.js.map
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// @ts-ignore
|
2
|
+
import {Options, Padding} from './options';
|
3
|
+
import { Pen } from './models';
|
4
|
+
import { Node } from './models';
|
5
|
+
import { Point } from './models';
|
6
|
+
import { Line } from './models';
|
7
|
+
import { TopologyData } from './models';
|
8
|
+
import { Lock } from './models';
|
9
|
+
import { Offscreen } from './offscreen';
|
10
|
+
import { RenderLayer } from './renderLayer';
|
11
|
+
import { AnimateLayer } from './animateLayer';
|
12
|
+
import { DivLayer } from './divLayer';
|
13
|
+
import { Rect } from './models';
|
14
|
+
import { Socket } from './socket';
|
15
|
+
import { MQTT } from './mqtt';
|
16
|
+
import {Common} from './common';
|
17
|
+
export declare class Preview extends Common{
|
18
|
+
constructor(parent: string | HTMLElement, options?: Options);
|
19
|
+
private scheduledAnimationFrame;
|
20
|
+
private onMouseMove;
|
21
|
+
private onmousedown;
|
22
|
+
private onmouseup;
|
23
|
+
open(data?: any): void;
|
24
|
+
scale(scale: number, center?: Point): void;
|
25
|
+
scaleTo(scale: number): void;
|
26
|
+
fitView(viewPadding?: Padding): void;
|
27
|
+
destroy(): void;
|
28
|
+
}
|
29
|
+
export {};
|
@@ -0,0 +1,247 @@
|
|
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
extendStatics(d, b);
|
10
|
+
function __() { this.constructor = d; }
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
12
|
+
};
|
13
|
+
})();
|
14
|
+
import {KeyType} from './options';
|
15
|
+
import {Point} from './models';
|
16
|
+
import { Common } from './common'
|
17
|
+
import {downDataType, formatPadding, mousMoveFun, mousDownFun, omouseEventPrototDoWindowFn} from './utils';
|
18
|
+
|
19
|
+
var Preview = (function (_super) {
|
20
|
+
__extends(Preview, _super);
|
21
|
+
function Preview(parent, options) {
|
22
|
+
var _this = _super.call(this, parent, options) || this;
|
23
|
+
_this.offscreen.getRoutineLayer(['AnimateLayer']);
|
24
|
+
_this.scheduledAnimationFrame = false;
|
25
|
+
_this.onMouseMove = function (e) {
|
26
|
+
// https://caniuse.com/#feat=mdn-api_mouseevent_buttons
|
27
|
+
if (_this.mouseDown && !_this.mouseDown.restore && e.buttons !== 1) {
|
28
|
+
// 防止异常情况导致mouseup事件没有触发
|
29
|
+
_this.onmouseup(e);
|
30
|
+
return;
|
31
|
+
}
|
32
|
+
if (_this.data.locked && _this.mouseDown) {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
_this.scheduledAnimationFrame = true;
|
36
|
+
var canvasPos = _this.divLayer.canvas.getBoundingClientRect();
|
37
|
+
var pos = new Point(e.x - canvasPos.x, e.y - canvasPos.y);
|
38
|
+
if (_this.raf)
|
39
|
+
cancelAnimationFrame(_this.raf);
|
40
|
+
_this.raf = requestAnimationFrame(function () {
|
41
|
+
_this.raf = null;
|
42
|
+
if (!_this.mouseDown) {
|
43
|
+
// dcim 中的鼠标悬浮处理
|
44
|
+
const {
|
45
|
+
hoverNode,
|
46
|
+
moveType,
|
47
|
+
eventNode
|
48
|
+
} = mousMoveFun(_this.options.type, pos, _this.data.pens);
|
49
|
+
_this.moveIn.type = _this.moveInType.None;
|
50
|
+
_this.scheduledAnimationFrame = false;
|
51
|
+
_this.hideTip();
|
52
|
+
_this.divLayer.canvas.style.cursor = 'default';
|
53
|
+
if (hoverNode) {
|
54
|
+
if(eventNode) _this.divLayer.canvas.style.cursor = 'pointer';
|
55
|
+
if(hoverNode.visible) _this.showTip(hoverNode, pos);
|
56
|
+
_this.moveIn.type = moveType;
|
57
|
+
}
|
58
|
+
_this.moveIn.eventNode = eventNode;
|
59
|
+
_this.moveIn.hoverNode = hoverNode;
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
_this.scheduledAnimationFrame = false;
|
63
|
+
});
|
64
|
+
};
|
65
|
+
_this.onmousedown = function (e) {
|
66
|
+
if (e.button !== 0)
|
67
|
+
return;
|
68
|
+
var canvasPos = _this.divLayer.canvas.getBoundingClientRect();
|
69
|
+
_this.mouseDown = {x: e.x - canvasPos.x, y: e.y - canvasPos.y};
|
70
|
+
if (e.altKey) {
|
71
|
+
_this.divLayer.canvas.style.cursor = 'pointer';
|
72
|
+
}
|
73
|
+
if (_this.inputObj) {
|
74
|
+
_this.setNodeText();
|
75
|
+
}
|
76
|
+
const {eventType, value} = mousDownFun(_this.options.type, _this.moveIn.eventNode);
|
77
|
+
if (_this.moveIn.type == _this.moveInType.Nodes) {
|
78
|
+
_this.divLayer.canvas.style.cursor = 'pointer';
|
79
|
+
switch (eventType) {
|
80
|
+
case downDataType.Window:
|
81
|
+
omouseEventPrototDoWindowFn(_this.moveIn.eventNode, _this.moveIn.hoverNode);
|
82
|
+
break;
|
83
|
+
case downDataType.Target:
|
84
|
+
_this.dispatch('node', _this.moveIn.hoverNode);
|
85
|
+
break;
|
86
|
+
case downDataType.Showhide:
|
87
|
+
_this.hidePenByTag(_this.data.pens, value);
|
88
|
+
const obj = value ? JSON.parse(value) : {}
|
89
|
+
const visibleRange = obj.visibleRange
|
90
|
+
if (visibleRange == '1') {
|
91
|
+
_this.openCount++
|
92
|
+
}
|
93
|
+
break;
|
94
|
+
case downDataType.Tabswitch:
|
95
|
+
_this.switchStaticsCheckType(_this.moveIn.hoverNode, _this.moveIn.eventNode);
|
96
|
+
break;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
};
|
100
|
+
_this.onmouseup = function (e) {
|
101
|
+
if (!_this.mouseDown)
|
102
|
+
return;
|
103
|
+
_this.mouseDown = null;
|
104
|
+
_this.lastTranlated.x = 0;
|
105
|
+
_this.lastTranlated.y = 0;
|
106
|
+
_this.divLayer.canvas.style.cursor = _this.moveIn.eventNode ? 'pointer' : 'default';
|
107
|
+
};
|
108
|
+
_this.divLayer.canvas.onmousemove = this.onMouseMove;
|
109
|
+
_this.divLayer.canvas.onmousedown = this.onmousedown;
|
110
|
+
_this.divLayer.canvas.onmouseup = this.onmouseup;
|
111
|
+
_this.divLayer.canvas.onwheel = function (event) {
|
112
|
+
if (_this.options.disableScale) {
|
113
|
+
return;
|
114
|
+
}
|
115
|
+
switch (_this.options.scaleKey) {
|
116
|
+
case KeyType.None:
|
117
|
+
break;
|
118
|
+
case KeyType.Ctrl:
|
119
|
+
if (!event.ctrlKey) {
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
break;
|
123
|
+
case KeyType.Shift:
|
124
|
+
if (!event.shiftKey) {
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
break;
|
128
|
+
case KeyType.Alt:
|
129
|
+
if (!event.altKey) {
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
break;
|
133
|
+
default:
|
134
|
+
if (!event.ctrlKey && !event.altKey) {
|
135
|
+
return;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
event.preventDefault();
|
139
|
+
if (event.deltaY < 0) {
|
140
|
+
if (event.layerX && event.layerY) {
|
141
|
+
_this.scale(1.1, {x: event.layerX, y: event.layerY});
|
142
|
+
_this.canvas.scale(1.1, {x: event.layerX, y: event.layerY});
|
143
|
+
} else {
|
144
|
+
_this.scale(1.1);
|
145
|
+
_this.canvas.scale(1.1);
|
146
|
+
}
|
147
|
+
} else {
|
148
|
+
if (event.layerX && event.layerY) {
|
149
|
+
_this.scale(0.9, {x: event.layerX, y: event.layerY});
|
150
|
+
_this.canvas.scale(0.9, {x: event.layerX, y: event.layerY});
|
151
|
+
} else {
|
152
|
+
_this.scale(0.9);
|
153
|
+
_this.canvas.scale(0.9);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
_this.render();
|
157
|
+
_this.divLayer.canvas.focus();
|
158
|
+
return false;
|
159
|
+
};
|
160
|
+
return _this;
|
161
|
+
};
|
162
|
+
Preview.prototype.fitViewPreview = function (restore){
|
163
|
+
this.fitView(null, restore);
|
164
|
+
this.render();
|
165
|
+
};
|
166
|
+
// open - redraw by the data
|
167
|
+
Preview.prototype.open = function (topoJSon) {
|
168
|
+
this.conversionData(topoJSon);
|
169
|
+
this.parentElem.scrollLeft = 0;
|
170
|
+
this.parentElem.scrollTop = 0;
|
171
|
+
this.divLayer.clear();
|
172
|
+
this.fitView();
|
173
|
+
this.render(true);
|
174
|
+
this.animate(true);
|
175
|
+
};
|
176
|
+
Preview.prototype.scale = function (scale, center, w, h) {
|
177
|
+
if (this.data.scale * scale < this.options.minScale ||
|
178
|
+
this.data.scale * scale > this.options.maxScale) {
|
179
|
+
return;
|
180
|
+
}
|
181
|
+
const scaleX = w ? w : scale;
|
182
|
+
const scaleY = h ? h : scale;
|
183
|
+
this.data.scale *= scale;
|
184
|
+
if(this.isFullScreen) {
|
185
|
+
this.ratioCord.ratio *= scale;
|
186
|
+
this.ratioCord.scaleX *= scaleX;
|
187
|
+
this.ratioCord.scaleY *= scaleY;
|
188
|
+
}else {
|
189
|
+
this.ratioCord.ratio = 1;
|
190
|
+
this.ratioCord.scaleX = 1;
|
191
|
+
this.ratioCord.scaleY = 1;
|
192
|
+
}
|
193
|
+
!center && (center = this.getRect().center);
|
194
|
+
for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
|
195
|
+
var item = _a[_i];
|
196
|
+
item.scale(scale, center, w, h);
|
197
|
+
}
|
198
|
+
};
|
199
|
+
Preview.prototype.scaleTo = function (scale) {
|
200
|
+
this.scale(scale / this.data.scale);
|
201
|
+
this.data.scale = scale;
|
202
|
+
};
|
203
|
+
// scale for origin canvas:
|
204
|
+
Preview.prototype.fitView = function (viewPadding, restore) {
|
205
|
+
if (!this.hasView())
|
206
|
+
return;
|
207
|
+
// 1. 重置画布尺寸为容器尺寸
|
208
|
+
var parentElem = this.canvas.parentElem;
|
209
|
+
var width = parentElem.offsetWidth, height = parentElem.offsetHeight;
|
210
|
+
this.canvasResize({
|
211
|
+
width: width,
|
212
|
+
height: height,
|
213
|
+
});
|
214
|
+
// 2. 图形居中
|
215
|
+
this.centerView(viewPadding);
|
216
|
+
// 3. 获取设置的留白值
|
217
|
+
var padding = formatPadding(viewPadding || this.options.viewPadding);
|
218
|
+
// 4. 获取图形尺寸
|
219
|
+
var rect = this.getRect();
|
220
|
+
// 6. 计算缩放比
|
221
|
+
var w = (width - padding[1] - padding[3]) / rect.width;
|
222
|
+
var h = (height - padding[0] - padding[2]) / rect.height;
|
223
|
+
var ratio = w;
|
224
|
+
if (w > h) {
|
225
|
+
ratio = h;
|
226
|
+
}
|
227
|
+
if(typeof restore === 'boolean' && restore) {
|
228
|
+
ratio = 1 / this.ratioCord.ratio;
|
229
|
+
w = 1 / this.ratioCord.scaleX;
|
230
|
+
h = 1 / this.ratioCord.scaleY;
|
231
|
+
}
|
232
|
+
this.scale(ratio, undefined, w, h);
|
233
|
+
this.canvas.scale(ratio, undefined, w, h);
|
234
|
+
// 7. X抽滚动条隐藏
|
235
|
+
this.parentElem.style.overflow = 'hidden auto';
|
236
|
+
};
|
237
|
+
Preview.prototype.destroy = function () {
|
238
|
+
this.destroyStatic();
|
239
|
+
this.onMouseMove = null;
|
240
|
+
this.onmousedown = null;
|
241
|
+
this.onmouseup = null;
|
242
|
+
};
|
243
|
+
return Preview;
|
244
|
+
}(Common));
|
245
|
+
|
246
|
+
export {Preview};
|
247
|
+
//# sourceMappingURL=core.js.map
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { Options } from './options';
|
2
|
+
import { Canvas } from './canvas';
|
3
|
+
import {Point} from './models';
|
4
|
+
export declare class RenderLayer extends Canvas {
|
5
|
+
parentElem: HTMLElement;
|
6
|
+
options: Options;
|
7
|
+
offscreen: any;
|
8
|
+
bkImg: HTMLImageElement;
|
9
|
+
bkImgRect: {
|
10
|
+
x: number;
|
11
|
+
y: number;
|
12
|
+
width: number;
|
13
|
+
height: number;
|
14
|
+
};
|
15
|
+
bgRect: {
|
16
|
+
center: {
|
17
|
+
x: number;
|
18
|
+
y: number;
|
19
|
+
},
|
20
|
+
x: number;
|
21
|
+
y: number;
|
22
|
+
width: number;
|
23
|
+
height: number;
|
24
|
+
};
|
25
|
+
constructor(parentElem: HTMLElement, options: Options, TID: String);
|
26
|
+
loadBkImg(cb?: any): void;
|
27
|
+
clearBkImg(): void;
|
28
|
+
render: () => void;
|
29
|
+
scale(scale: number, center?: Point, w?: number, h?: number): void;
|
30
|
+
coverRect(canvasWidth: number, canvasHeight: number, imgWidth: number, imgHeight: number): {
|
31
|
+
x: number;
|
32
|
+
y: number;
|
33
|
+
width: number;
|
34
|
+
height: number;
|
35
|
+
};
|
36
|
+
}
|