@relation-graph/react 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/relation-graph.js +6 -6
- package/relation-graph.mjs +1004 -943
- package/relation-graph.umd.js +6 -6
- package/types/packages/platforms/react/src/index.d.ts +4 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4CreatingLine.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4FakeLines.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4Lines.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePath.d.ts +1 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineText.d.ts +3 -1
- package/types/packages/platforms/vue2/src/core4vue/RGLineContent.vue.d.ts +5 -4
- package/types/packages/platforms/vue2/src/core4vue/RGLinePath.vue.d.ts +1 -2
- package/types/packages/platforms/vue2/src/index.d.ts +1 -2
- package/types/packages/relation-graph-models/data/RGNodeDataUtils.d.ts +5 -2
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data1Getter.d.ts +13 -6
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data2Analysis.d.ts +6 -1
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data3Update.d.ts +2 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith4Line.d.ts +5 -2
- package/types/packages/relation-graph-models/models/RelationGraphWith7Event.d.ts +2 -3
- package/types/packages/types.ts +11 -8
package/relation-graph.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("@charset \"UTF-8\";.relation-graph{box-sizing:border-box;position:relative;min-width:300px;min-height:300px;--editor-main-color: rgb(64, 165, 248);--editor-light-color: rgb(125, 192, 248);--editor-light2-color: rgb(168, 212, 248);--editor-light-opacity: rgba(57, 144, 216, .1);--rg-node-opacity: 1;--rg-node-font-size: 1rem;--rg-node-font-color: #000000;--rg-node-color: #eeeeee;--rg-node-border-color: #333333;--rg-node-border-width: 1px;--rg-node-border-radius: 3px;--rg-node-width: fit-content;--rg-node-height: fit-content;--rg-node-text-px: 10px;--rg-node-text-py: 3px;--rg-background-color: transparent;--rg-line-color: #888888;--rg-line-width: 1px;--rg-line-fontcolor: #666;--rg-line-fontsize: 12px;--rg-line-opacity: 1;--rg-checked-item-bg-color: rgba(150, 150, 150, .2);--rg-checked-line-text-bg-color: rgb(234, 232, 232)}.relation-graph:focus{outline:none}.relation-graph .rg-graph-plugs{position:absolute;left:0px;top:0px;z-index:90;width:100%;height:100%;pointer-events:none;user-select:none}.relation-graph .rg-graph-plugs .rg-view-slot{position:relative;width:100%;height:100%}.relation-graph .rg-watermark{position:absolute;--watermark-width: 200px;--watermark-height: 100px;z-index:1200;overflow:visible;min-height:100px;min-width:100px;width:var(--watermark-width);height:var(--watermark-height);box-sizing:border-box}.relation-graph .rg-watermark div{box-sizing:border-box}.relation-graph .rg-watermark.rg-watermark-top{left:calc((100% - var(--watermark-width)) / 2);top:10px}.relation-graph .rg-watermark.rg-watermark-bottom{left:calc((100% - var(--watermark-width)) / 2);bottom:10px}.relation-graph .rg-watermark.rg-watermark-left{left:10px;top:calc((100% - var(--watermark-height)) / 2)}.relation-graph .rg-watermark.rg-watermark-right{right:10px;top:calc((100% - var(--watermark-height)) / 2)}.relation-graph .rg-watermark.rg-watermark-tl{left:10px;top:10px}.relation-graph .rg-watermark.rg-watermark-tr{right:10px;top:10px}.relation-graph .rg-watermark.rg-watermark-bl{left:10px;bottom:10px}.relation-graph .rg-watermark.rg-watermark-br{right:10px;bottom:10px}.relation-graph .rg-lines-container svg{overflow:visible}.relation-graph .rg-lines-svg{overflow:visible;width:10px;height:10px;position:absolute;left:0px;top:0px}.relation-graph .rg-lines-container{overflow:visible;position:absolute;z-index:40;width:100%;top:0px;left:0px;pointer-events:none}.relation-graph .rg-lines-container-el-lines{z-index:80;pointer-events:none}.relation-graph .rg-lines-container-el-lines .rg-line-bg{pointer-events:stroke}.relation-graph .rg-lines-container-el-lines .rg-line-text{pointer-events:all}.relation-graph .rg-lines-svg-el-lines{overflow:visible;width:10px;height:10px;position:absolute;left:0px;top:0px}.relation-graph .rg-nodes-container-wrapper{position:absolute;width:100%;top:0px;left:0px;z-index:50}.relation-graph .rg-nodes-container{position:relative;overflow:visible}.relation-graph .rg-map{background-color:var(--rg-background-color);overflow:hidden;cursor:default;user-select:none;opacity:.01;transition:none;width:100%;height:100%;position:relative}.relation-graph.rg-move-mode .rg-map{cursor:grab}.relation-graph .rg-map-ready{opacity:1;transition:opacity .5s ease;will-change:opacity}.relation-graph .rg-map-background-norepeat{background-repeat:no-repeat;background-position:right bottom}.relation-graph .rg-map-canvas{position:relative;user-select:none;pointer-events:none;top:0;left:0;border:none;z-index:3;overflow:visible;white-space:nowrap;transform-origin:0 0;will-change:transform}.relation-graph .rg-map-canvas .rg-events-all{pointer-events:all}.relation-graph.rg-enable-node-xy-animation .rg-node-peel{transition:transform .3s ease}.relation-graph.rg-enable-node-xy-animation .rg-line-peel{opacity:0;transition:none}.relation-graph.rg-enable-node-xy-animation .rg-map-canvas{transition:transform .4s ease-in-out}.relation-graph.rg-enable-canvas-animation .rg-map-canvas{transition:transform .5s ease}.relation-graph.rg-enable-canvas-animation .rg-editing-ctrl,.relation-graph.rg-enable-canvas-animation .rg-editing-line-ctrl,.relation-graph.rg-enable-canvas-animation .rg-editing-connect-ctrl{opacity:0}.relation-graph .rg-canvas-behind{z-index:2;position:absolute}.relation-graph .rg-canvas-above{z-index:5;position:absolute}.relation-graph .rg-canvas-slot{overflow:visible;position:absolute;margin-top:0;margin-left:0}.relation-graph .rg-canvas-slot-behind{z-index:30;overflow:visible}.relation-graph .rg-canvas-slot-above{z-index:70;overflow:visible}.relation-graph .rg-single-graph{position:relative;overflow:visible}.relation-graph .rg-map img{-webkit-user-drag:none;-webkit-user-select:none}.relation-graph .rg-line-text{fill:var(--rg-line-fontcolor, #888888);font-size:var(--rg-line-fontsize);paint-order:stroke;pointer-events:all}.relation-graph .rg-linetext-container{position:absolute;pointer-events:none;user-select:none;overflow:visible;left:0;top:0;z-index:45;display:block}.relation-graph .rg-linetext-container .rg-line-peel{width:fit-content}.relation-graph .rg-linetext-container .rg-line-peel .rg-line-label{display:block;color:var(--rg-line-fontcolor, #888888);font-size:var(--rg-line-fontsize);transform-origin:0 0;position:absolute;user-select:none;pointer-events:all;box-sizing:border-box;padding:2px 6px;border-radius:5px}.relation-graph .rg-linetext-container .rg-line-peel-checked .rg-line-label{background-color:var(--rg-checked-line-text-bg-color)}.relation-graph .rg-line-peel{pointer-events:none;cursor:default;transition:opacity .2s ease-in;opacity:var(--rg-line-opacity, 1)}.relation-graph .rg-line{fill-rule:nonzero;stroke-linecap:round;stroke:var(--rg-line-color);stroke-width:var(--rg-line-width);pointer-events:none;fill:none;marker-end:var(--rg-line-marker-end);marker-start:var(--rg-line-marker-start)}.relation-graph .rg-line-bg{stroke:#fff;opacity:.01;fill:none;fill-rule:nonzero;stroke-linecap:round;pointer-events:stroke;stroke-width:calc(var(--rg-line-width) + 6px)}.relation-graph .rg-line-bg:hover{opacity:.1;stroke:var(--rg-line-color)}.relation-graph .rg-line-peel-checked .rg-line-bg{stroke:var(--rg-checked-item-bg-color);opacity:1}.relation-graph .rg-line-peel-checked .rg-line{z-index:100}.relation-graph .rg-line-peel-checked .rg-line-text{stroke:var(--rg-checked-item-bg-color);stroke-width:2}.relation-graph .rg-line-peel-disable-events{pointer-events:none!important}.relation-graph .rg-line-peel-disable-events .rg-line-bg,.relation-graph .rg-line-peel-disable-events .rg-line-text,.relation-graph .rg-linetext-container .rg-line-peel-disable-events .rg-line-bg,.relation-graph .rg-linetext-container .rg-line-peel-disable-events .rg-line-label{pointer-events:none}.relation-graph .rg-line-dashtype-1{stroke-dasharray:2,2,2;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}.relation-graph .rg-line-dashtype-2{stroke-dasharray:5,5,5;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}.relation-graph .rg-line-dashtype-3{stroke-dasharray:9,9,9;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}.relation-graph .rg-line-dashtype-4{stroke-dasharray:5,5,15;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}@keyframes ACTRGLineChecked{0%{stroke-dashoffset:352px;stroke-dasharray:5,5,5}50%{stroke-dasharray:5,5,5;stroke-dashoffset:3px}to{stroke-dashoffset:352px;stroke-dasharray:5,5,5}}@keyframes rg-line-anm1{0%{stroke-dashoffset:100px;stroke-dasharray:5,5,5}to{stroke-dasharray:5,5,5;stroke-dashoffset:3px}}@keyframes rg-line-anm2{0%{stroke-dashoffset:0;stroke-dasharray:4,4,4}to{stroke-dashoffset:10px;stroke-dasharray:20,20,20}}@keyframes rg-line-anm3{0%{stroke-opacity:1}50%{stroke-opacity:.2}to{stroke-opacity:1}}@keyframes rg-line-anm4{0%{stroke-dasharray:0,100%}to{stroke-dasharray:100%,0}}.relation-graph .rg-line-anm-1{animation:rg-line-anm1 10s infinite;animation-fill-mode:forwards;animation-timing-function:linear}.relation-graph .rg-line-anm-2{animation:rg-line-anm2 3s infinite}.relation-graph .rg-line-anm-3{animation:rg-line-anm3 1s infinite}.relation-graph .rg-line-anm-4{animation:rg-line-anm4 3s infinite}@keyframes deform1{0%{stroke-dashoffset:0}to{stroke-dashoffset:100%}}.relation-graph .rg-icon{width:19px;height:19px;vertical-align:0px;fill:currentColor;overflow:hidden}.relation-graph .rg-node-peel{padding:0;position:absolute;pointer-events:none;box-sizing:border-box;opacity:var(--rg-node-opacity);z-index:var(--rg-node-z-index);will-change:transform;transform-origin:0 0;cursor:default}.relation-graph .rg-node-peel .rg-node{pointer-events:all;text-align:center;border-style:solid;box-sizing:border-box;overflow:visible;transform-origin:0 0;font-size:var(--rg-node-font-size);color:var(--rg-node-font-color);background-color:var(--rg-node-color);border-color:var(--rg-node-border-color);border-width:var(--rg-node-border-width);width:var(--rg-node-width);height:var(--rg-node-height)}.relation-graph .rg-node-disable-events{pointer-events:none}.relation-graph .rg-node-shape-0>.rg-node{border-radius:50%}.relation-graph .rg-node-shape-1>.rg-node{border-radius:var(--rg-node-border-radius)}.relation-graph .rg-node-checked{z-index:800}.relation-graph .rg-node-checked>.rg-node{box-shadow:0 0 0 4px var(--rg-checked-item-bg-color)}.relation-graph .rg-node-selected>.rg-node{box-shadow:0 0 0 2px var(--editor-main-color)}.relation-graph img,.relation-graph svg,.relation-graph video,.relation-graph canvas,.relation-graph audio,.relation-graph iframe,.relation-graph embed,.relation-graph object{display:unset;vertical-align:unset}.relation-graph .rg-node-text{color:var(--rg-node-font-color);font-size:var(--rg-node-font-size);padding:var(--rg-node-text-py) var(--rg-node-text-px);height:100%;width:100%;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.relation-graph .rg-node-type-button{border-radius:25px;color:#00f;cursor:pointer}.relation-graph .rg-editing-referline{user-select:none;position:absolute;z-index:999;pointer-events:none;width:100%;height:100%;left:0px;top:0px}.relation-graph .rg-editing-referline .rg-referline{position:absolute;display:flex;place-items:center;justify-content:center;overflow:visible;transform-origin:0 0;--rg-refer-offset: -3px}.relation-graph .rg-editing-referline .rg-referline .referline{display:flex;place-items:center;justify-content:center}.relation-graph .rg-editing-referline .rg-referline .referline>div{background-color:var(--editor-main-color);font-size:8px;border-radius:3px;color:#fff;width:fit-content;height:fit-content;padding:2px 5px}.relation-graph .rg-editing-referline .rg-referline-v{top:0px;width:6px;height:100%}.relation-graph .rg-editing-referline .rg-referline-v .referline{width:1px;height:100%;background-color:var(--editor-main-color)}.relation-graph .rg-editing-referline .rg-referline-v:before{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;top:0;transform:translateY(-50%)}.relation-graph .rg-editing-referline .rg-referline-v:after{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;bottom:0;transform:translateY(50%)}.relation-graph .rg-editing-referline .rg-referline-h{left:0px;width:100%;height:6px}.relation-graph .rg-editing-referline .rg-referline-h .referline{width:100%;height:1px;background-color:var(--editor-main-color)}.relation-graph .rg-editing-referline .rg-referline-h:before{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;left:0;transform:translate(-50%)}.relation-graph .rg-editing-referline .rg-referline-h:after{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;right:0;transform:translate(50%)}.relation-graph .rg-editing-line-ctrl{position:absolute;left:0px;top:0px;z-index:500;pointer-events:none;user-select:none;width:100%;height:100%}.relation-graph .rg-editing-line-ctrl .rg-edt-ctrl-svg{position:absolute;pointer-events:none;left:0px;top:0px;overflow:visible}.relation-graph .rg-editing-line-ctrl .rg-edt-ctrl-svg path{stroke:var(--editor-main-color);stroke-width:1px}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-dot{--rg-ctl-x: 0px;--rg-ctl-y: 0px;pointer-events:auto;user-select:none;width:10px;height:10px;background-color:#fff;box-shadow:0 0 0 1px var(--editor-main-color);position:absolute;border-radius:50%;cursor:move;z-index:1;transform-origin:0 0}.relation-graph .rg-editing-line-ctrl .start-dot,.relation-graph .rg-editing-line-ctrl .end-dot,.relation-graph .rg-editing-line-ctrl .ctrl-dot{transform-origin:0 0;transform:translate(-50%,-50%) translate(var(--rg-ctl-x),var(--rg-ctl-y))}.relation-graph .rg-editing-line-ctrl .ctrl-split,.relation-graph .rg-editing-line-ctrl .ctrl-split-core{background-color:#fff}.relation-graph .rg-editing-line-ctrl .ctrl-split-h{width:12px;height:5px;border-radius:3px;cursor:row-resize;transform:translate(-50%,-50%) translate(var(--rg-ctl-x),var(--rg-ctl-y))}.relation-graph .rg-editing-line-ctrl .ctrl-split-v{width:5px;height:12px;border-radius:3px;cursor:col-resize;transform:translate(-50%,-50%) translate(var(--rg-ctl-x),var(--rg-ctl-y))}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text{--rg-ctl-x: 0px;--rg-ctl-y: 0px;--font-size: .8rem;pointer-events:auto;background-color:#fffc;box-shadow:0 0 0 1px var(--editor-main-color);position:absolute;border-radius:3px;cursor:move;z-index:1;white-space:nowrap;color:#000;padding:3px 10px;display:flex;place-items:center;justify-content:center;box-sizing:border-box;text-shadow:none;font-size:var(--font-size, 12px);min-height:20px;max-height:30px;transform-origin:0 0;transform:translate(-50%,-50%) translate(10px,3px) translate(var(--rg-ctl-x),var(--rg-ctl-y));min-width:50px;max-width:220px}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text p{font-size:var(--font-size, 12px);color:#333}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text p.empty-text{font-size:10px;color:#888}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text .rg-line-text-input{white-space:nowrap;pointer-events:auto;user-select:auto;background-color:transparent;color:#000;border-radius:3px;height:100%;padding:3px 0;width:100px;text-shadow:none;font-size:var(--font-size, 12px);text-align:center;box-sizing:border-box;border:none;outline:none}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text-editing{background-color:#faf191}.relation-graph .rg-editing-ctrl,.relation-graph .rg-editing-connect-ctrl{user-select:none;position:absolute;z-index:500;box-shadow:0 0 0 1px var(--editor-main-color);border-radius:0;pointer-events:none;transform-origin:0 0}.relation-graph .rg-editing-bar{user-select:none;pointer-events:none;position:absolute;border-radius:5px;padding:3px;box-sizing:border-box;display:flex;place-items:center;justify-content:center;flex-wrap:wrap;gap:5px}.relation-graph .rg-editing-bar .rg-gee-icon{background-color:#d603f680;pointer-events:auto;min-width:20px;min-height:20px;border-radius:5px;box-sizing:border-box;display:flex;place-items:center;justify-content:center;cursor:pointer}.relation-graph .rg-editing-bar .rg-gee-icon:hover{background-color:#d603f6;color:#fff}.relation-graph .rg-connect-source-handle{pointer-events:auto;width:fit-content;height:fit-content}.relation-graph .rg-editing-bar-top{width:fit-content;height:fit-content;left:50%;transform:translate(-50%) translateY(-100%);top:-15px}.relation-graph .rg-editing-bar-bottom{width:fit-content;height:fit-content;left:50%;transform:translate(-50%) translateY(100%);bottom:-15px}.relation-graph .rg-editing-bar-left{width:fit-content;height:fit-content;left:-15px;top:50%;transform:translate(-100%) translateY(-50%)}.relation-graph .rg-editing-bar-right{width:fit-content;height:fit-content;right:-15px;top:50%;transform:translate(100%) translateY(-50%)}.relation-graph .rg-editing-bar-tl{width:30px;height:30px;right:calc(100% + 10px);top:-40px}.relation-graph .rg-editing-bar-tr{width:30px;height:30px;left:calc(100% + 10px);top:-40px}.relation-graph .rg-editing-bar-bl{width:30px;height:30px;right:calc(100% + 10px);bottom:-40px}.relation-graph .rg-editing-bar-br{width:30px;height:30px;left:calc(100% + 10px);bottom:-40px}.relation-graph .rg-resize-ctl{user-select:none;position:relative;height:100%;width:100%;--resize-handler-size: 10px;--resize-handler-offset: -5px}.relation-graph .rg-resize-ctl .rg-resize-ctl-handler{pointer-events:auto;width:var(--resize-handler-size);height:var(--resize-handler-size);background-color:#fff;position:absolute;border-radius:2px;box-shadow:inset 0 0 0 1px var(--editor-main-color)}.relation-graph .rg-resize-ctl .rg-resize-ctl-tl{cursor:nwse-resize;left:var(--resize-handler-offset);top:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-tr{cursor:nesw-resize;right:var(--resize-handler-offset);top:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-bl{cursor:nesw-resize;left:var(--resize-handler-offset);bottom:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-br{cursor:nwse-resize;right:var(--resize-handler-offset);bottom:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-t{cursor:n-resize;top:var(--resize-handler-offset);left:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-resize-ctl .rg-resize-ctl-b{cursor:s-resize;bottom:var(--resize-handler-offset);left:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-resize-ctl .rg-resize-ctl-l{cursor:w-resize;left:var(--resize-handler-offset);top:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-resize-ctl .rg-resize-ctl-r{cursor:e-resize;right:var(--resize-handler-offset);top:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-editing-connect-ctrl{position:absolute;user-select:none;pointer-events:none;left:0;top:0;z-index:1400;--hander-border-radius: 5px;border-radius:var(--hander-border-radius);--border-handler-width: 8px;--hv-handler-width: 10px;--center-handler-width: 10px;--border-point-width: 10px;--border-point-height: 10px;--hander-color: var(--editor-light2-color);--hander-border-color: var(--editor-main-color);--hander-shadow-color: rgba(57, 144, 216, .1);box-shadow:0 0 0 var(--border-handler-width) var(--hander-shadow-color)}.relation-graph .rg-connect-ctl{width:100%;height:100%;pointer-events:none;user-select:none;border:none;position:relative}.relation-graph .rg-connect-ctl-handler{pointer-events:auto;user-select:none;z-index:20;cursor:crosshair}.relation-graph .rg-connect-target{width:fit-content;height:fit-content;pointer-events:auto;display:flex;place-items:center;justify-content:center}.relation-graph .rg-connect-ctl-handler-style{background-color:var(--hander-color);border:var(--hander-border-color) solid 1px;position:absolute;border-radius:3px}.relation-graph .rg-connect-ctl-handler-style:hover{background-color:#fbe691}.relation-graph .rg-connect-ctl-center{width:var(--center-handler-width);height:var(--center-handler-width);border-radius:50%;top:calc((100% - var(--center-handler-width)) / 2);left:calc((100% - var(--center-handler-width)) / 2)}.relation-graph .rg-connect-ctl-t{width:var(--border-point-width);height:var(--border-point-height);top:calc(var(--border-point-height) / -2);left:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-b{width:var(--border-point-width);height:var(--border-point-height);bottom:calc(var(--border-point-height) / -2);left:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-l{width:var(--border-point-height);height:var(--border-point-width);left:calc(var(--border-point-height) / -2);top:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-r{width:var(--border-point-height);height:var(--border-point-width);right:calc(var(--border-point-height) / -2);top:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-lr{width:100%;height:var(--hv-handler-width);right:0px;top:calc((100% - var(--hv-handler-width)) / 2);z-index:11;opacity:.01}.relation-graph .rg-connect-ctl-lr:hover{opacity:1}.relation-graph .rg-connect-ctl-tb{width:var(--hv-handler-width);height:100%;top:0px;left:calc((100% - var(--hv-handler-width)) / 2);z-index:10;opacity:.01}.relation-graph .rg-connect-ctl-tb:hover{opacity:1}.relation-graph .rg-connect-ctl-bottom-bar{border:0px;border:none;width:100%;height:var(--border-handler-width);right:0px;top:100%;z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-top-left-radius:0;border-top-right-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-bottom-bar:hover{opacity:1}.relation-graph .rg-connect-ctl-top-bar{border:0px;border:none;width:100%;height:var(--border-handler-width);right:0px;top:calc(var(--border-handler-width) * -1);z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-top-bar:hover{opacity:1}.relation-graph .rg-connect-ctl-left-bar{border:0px;border:none;width:var(--border-handler-width);height:100%;left:calc(var(--border-handler-width) * -1);top:0;z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-bottom-right-radius:0;border-top-right-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-left-bar:hover{opacity:1}.relation-graph .rg-connect-ctl-right-bar{border:0px;width:var(--border-handler-width);height:100%;right:calc(var(--border-handler-width) * -1);top:0px;z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-bottom-left-radius:0;border-top-left-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-right-bar:hover{opacity:1}.relation-graph .rg-miniview{pointer-events:all;position:absolute;user-select:none;overflow:hidden;z-index:1100;min-height:100px;min-width:100px;--miniview-width: 200px;--miniview-height: 120px;height:var(--miniview-height);width:var(--miniview-width);border-radius:3px;display:flex;place-items:center;justify-content:center;background-color:#fff;box-shadow:0 0 0 1px #ccc;border:none}.relation-graph .rg-miniview .rg-miniview-container{position:relative;width:100%;height:100%;display:flex;place-items:center;justify-content:center}.relation-graph .rg-miniview canvas{opacity:1}.relation-graph .rg-miniview .rg-mv-canvas-reset{cursor:pointer}.relation-graph .rg-miniview .rg-mv-canvas-reset:hover{background-color:#bbf54794}.relation-graph .rg-miniview .rg-mv-visible-area{z-index:2;position:absolute;left:0;top:0;cursor:move;transform-origin:0 0;box-shadow:0 0 0 9999px #0003;border:#888 solid 1px;border-radius:3px;display:grid;place-items:center;color:#fff;font-weight:700;text-shadow:0 1px 2px rgba(0,0,0,.5)}.relation-graph .rg-miniview.rg-miniview-top{left:calc((100% - var(--miniview-width)) / 2);top:10px}.relation-graph .rg-miniview.rg-miniview-bottom{left:calc((100% - var(--miniview-width)) / 2);bottom:10px}.relation-graph .rg-miniview.rg-miniview-left{left:10px;top:calc((100% - var(--miniview-height)) / 2)}.relation-graph .rg-miniview.rg-miniview-right{right:10px;top:calc((100% - var(--miniview-height)) / 2)}.relation-graph .rg-miniview.rg-miniview-tl{left:10px;top:10px}.relation-graph .rg-miniview.rg-miniview-tr{right:10px;top:10px}.relation-graph .rg-miniview.rg-miniview-bl{left:10px;bottom:10px}.relation-graph .rg-miniview.rg-miniview-br{right:10px;bottom:10px}.relation-graph .rg-node-flashing{animation:ACTRGNodeFlashing 2s infinite}.relation-graph .rg-node-vtree-2{transform-origin:0 0;transform:rotate(30deg) translate(0)}.relation-graph .rg-node-vtree{width:130px;height:45px;text-align:left}.relation-graph .rg-node-expand-holder{position:absolute;height:fit-content;width:fit-content;display:flex;align-items:center;justify-content:center;user-select:none;pointer-events:none;cursor:pointer}.relation-graph .rg-node-expand-holder>span{width:16px;height:16px;display:block;text-align:center;border-radius:15px;cursor:pointer;background-size:100% 100%;pointer-events:all;border:#aaaaaa solid .5px;background-color:#fff}.relation-graph .c-expanded{background-image:url(data:image/svg+xml;%20charset=utf8,%3Csvg%20t=%221606310217820%22%20viewBox=%220%200%201024%201024%22%20version=%221.1%22%20xmlns=%22http://www.w3.org/2000/svg%22%20p-id=%223373%22%20width=%2232%22%20height=%2232%22%3E%3Cpath%20d=%22M853.333333%20480H544V170.666667c0-17.066667-14.933333-32-32-32s-32%2014.933333-32%2032v309.333333H170.666667c-17.066667%200-32%2014.933333-32%2032s14.933333%2032%2032%2032h309.333333V853.333333c0%2017.066667%2014.933333%2032%2032%2032s32-14.933333%2032-32V544H853.333333c17.066667%200%2032-14.933333%2032-32s-14.933333-32-32-32z%22%20p-id=%223374%22%20fill=%22%23666666%22%3E%3C/path%3E%3C/svg%3E)}.relation-graph .c-collapsed{background-image:url(data:image/svg+xml;%20charset=utf8,%3Csvg%20t=%221606310454619%22%20class=%22icon%22%20viewBox=%220%200%201024%201024%22%20version=%221.1%22%20xmlns=%22http://www.w3.org/2000/svg%22%20p-id=%223662%22%20width=%22128%22%20height=%22128%22%3E%3Cpath%20d=%22M853.333333%20554.666667H170.666667c-23.466667%200-42.666667-19.2-42.666667-42.666667s19.2-42.666667%2042.666667-42.666667h682.666666c23.466667%200%2042.666667%2019.2%2042.666667%2042.666667s-19.2%2042.666667-42.666667%2042.666667z%22%20p-id=%223663%22%20fill=%22%23666666%22%3E%3C/path%3E%3C/svg%3E)}.relation-graph .c-expand-positon-left{transform:translate(-100%) translateY(-50%);left:-5px;top:50%}.relation-graph .c-expand-positon-right{transform:translate(5px) translateY(-50%);left:100%;top:50%}.relation-graph .c-expand-positon-bottom{transform:translate(-50%);left:50%;top:calc(100% + 5px)}.relation-graph .c-expand-positon-top{transform:translate(-50%) translateY(-100%);left:50%;top:-5px}.relation-graph .rg-setting-panel{--height: 300px;--width: 200px;width:300px;height:200px;position:absolute;left:10px;top:5px;font-size:12px;color:#3a5bb2;padding:60px 10px 10px;overflow:hidden;box-shadow:0 0 5px #999;border-radius:5px;z-index:1000;background-color:#fff;border:#999999 solid 1px}.relation-graph .rg-setting-panel-button{height:35px;width:35px;font-size:8px;line-height:35px;text-align:center;border-radius:50%;position:absolute;margin-left:25px;margin-top:20px;background-color:#3a5bb2;color:#fff;cursor:pointer;z-index:1001;box-shadow:0 0 8px #999}.relation-graph .rg-setting-panel-button:hover{box-shadow:0 0 20px #ffa20a;border:#ffffff solid 1px;color:#ffa20a;-moz-transform:rotate(-89deg) translateX(-190px);animation-timing-function:linear;animation:flashButton 2s infinite}@keyframes flashButton{0%{box-shadow:0 0 8px #2e4e8f}30%{box-shadow:0 0 20px #ffa20a}to{box-shadow:0 0 8px #2e4e8f}}.relation-graph .c-debug-tools-row{text-align:left}.relation-graph .rg-operate{pointer-events:none;user-select:none;position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:180}.relation-graph .rg-operate .rg-node{cursor:move}.relation-graph .rg-operate .rg-creating-container{pointer-events:none;position:relative}.relation-graph .rg-operate .rg-creating-container *{pointer-events:none!important}.relation-graph .rg-selection{pointer-events:none;position:absolute;user-select:none;background-color:var(--editor-light-opacity);border:var(--editor-main-color) solid 1px;transform-origin:0 0}.relation-graph .rg-graph-loading{position:absolute;z-index:1600;left:0px;top:0px;height:100%;width:100%;background-color:#fff}.relation-graph .rg-graph-loading .rg-graph-loading-icon{width:16px;height:16px;vertical-align:-3px;fill:currentColor;overflow:hidden;animation:turn 1s linear infinite}.relation-graph .rg-graph-loading .rg-graph-loading-message{position:absolute;width:200px;height:30px;line-height:30px;text-align:center;left:calc((100% - 200px)/2);top:calc((100% - 30px)/2);border-radius:5px;background-color:#00000080;color:#fff;display:flex;place-items:center;justify-content:center;gap:8px}.relation-graph .rg-graph-loading-hide{display:none}@keyframes slowHide{0%{opacity:1}to{opacity:0;display:none}}.relation-graph .rg-easy-view{overflow:visible;height:100%;width:100%;background-color:transparent;position:absolute;left:0px;top:0px;z-index:3;pointer-events:none}.relation-graph .rg-easy-view canvas{opacity:0;width:100%;height:100%}.relation-graph .rg-easy-view-active{pointer-events:all}.relation-graph .rg-easy-view-active canvas{opacity:1}.relation-graph .rg-move-operator{position:absolute;width:100%;height:100%;pointer-events:none;user-select:none;left:0px;top:0px;z-index:6666}.relation-graph .rg-move-operator .rg-move-touchpad{display:none;background-color:var(--edit-ctl-light2-color);height:100%;width:100%;pointer-events:all}.relation-graph .rg-move-operator.rg-move-operator-active{pointer-events:all;cursor:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4Ij48aW1hZ2UgeGxpbms6aHJlZj0iZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFFQUFBQUJBQ0FZQUFBQ3FhWEhlQUFBQUFYTlNSMElBcnM0YzZRQUFDWlpKUkVGVWVGN3RXZ3RNVk5rWi9xYThabkZ4QkVIQWlCV3lFa0drUEcwRW1paWdGVVZzcFZxTmlsSmZRVEV4c2k2eDFqZHRMVnVEeGpoTlJDc0JzeHBOZktEV0J4Q05QTFFpaUNoRzBTQkxKZHBTYUFWNXlHaW4rOTNjdzQ2enVEc0Rkd1lUT01uSm5XRXU5NTcvKy8vLyt4L25xRERJaDJxUXk0OGhBSVlzWUpBak1PUUNnOXdBaGtod3lBV0dYR0NRSXpEa0FnTmtBQUo0UXdYbzViV0lxMVdXWm0wTDRQdCtCTUJHdnZJN0o0WG0vQitBZC9MVktrQllBd0FocEJEY3RyS3lNc3pYMTNlcG5aMWRvTDI5ZlhoM2QzZTVUcWVycnEydHpRc0pDYmtENEswUkVCWUR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S4RBU31E8I44Tmf8f4ZAmPrMPt9nCRLs82IG4h+HABgI1D+mdw5ZwMekjYFYy5AFDATqH9M7B70F/B8BkQp9YNbG2QAAAABJRU5ErkJggg==) 1x) 16 16,auto!important}.relation-graph .rg-move-operator.rg-move-operator-active .rg-move-touchpad{display:flex}.relation-graph.rg-creating-line .rg-connect-source-handle{pointer-events:none;opacity:.5}.rg-background{position:absolute;left:0px;top:0px;width:100%;height:100%;z-index:0;pointer-events:none}.rg-toolbar{user-select:none;pointer-events:all;display:flex;position:absolute;z-index:300;background-color:#fff;color:#333;--rg-toolbar-hover-bg-color: rgba(220, 220, 220, .5);box-shadow:0 1px 3px #0003,0 0 1px #0006;box-sizing:border-box;border-radius:5px;width:fit-content;height:fit-content;place-items:center;justify-content:center;gap:3px;backdrop-filter:blur(5px)}.rg-toolbar .rg-icon{flex-grow:1;width:16px;height:16px;fill:currentColor;overflow:hidden}.rg-toolbar .rg-mb-button svg{margin:auto}.rg-toolbar .rg-mb-button:hover{background-color:var(--rg-toolbar-hover-bg-color)}.rg-toolbar .rg-loading-icon{animation:turn 1s linear infinite}@keyframes turn{0%{-webkit-transform:rotate(0deg)}25%{-webkit-transform:rotate(90deg)}50%{-webkit-transform:rotate(180deg)}75%{-webkit-transform:rotate(270deg)}to{-webkit-transform:rotate(360deg)}}.rg-toolbar .rg-current-zoom{margin-top:0;font-size:10px;text-align:center;border-radius:3px;cursor:pointer}.rg-toolbar .rg-current-zoom:hover{background-color:var(--rg-toolbar-hover-bg-color)}.rg-toolbar .rg-mb-button{width:35px;height:35px;margin-top:0;opacity:1;cursor:pointer;font-size:18px;box-sizing:border-box;display:flex;align-items:center;justify-items:center;border-radius:3px}.rg-toolbar.rg-toolbar-v{flex-flow:column;padding:10px 3px}.rg-toolbar.rg-toolbar-v .rg-current-zoom{width:35px;height:25px;line-height:25px}.rg-toolbar.rg-toolbar-h{padding:3px 10px}.rg-toolbar.rg-toolbar-h .rg-current-zoom{width:fit-content;padding:0 5px;height:35px;line-height:35px}.rg-toolbar.rg-toolbar-h-right{right:15px}.rg-toolbar.rg-toolbar-h-left{left:15px}.rg-toolbar.rg-toolbar-h-center{left:50%;transform:translate(-50%)}.rg-toolbar.rg-toolbar-v-top{top:15px}.rg-toolbar.rg-toolbar-v-bottom{bottom:15px}.rg-toolbar.rg-toolbar-v-center{top:50%;transform:translateY(-50%)}.rg-toolbar.rg-xs-toolbar .rg-mb-button{width:25px;height:25px}.rg-toolbar.rg-xs-toolbar .rg-icon{width:14px;height:14px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v{padding:3px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v .rg-current-zoom{width:30px;height:25px;line-height:25px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h{padding:3px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h .rg-current-zoom{width:35px;height:25px;line-height:25px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h .rg-mb-button{width:25px;height:25px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h-right{right:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h-left{left:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h-center{top:50%;transform:translate(-50%)}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v-top{top:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v-bottom{bottom:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v-center{top:50%;transform:translateY(-50%)}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();var Vt = Object.defineProperty;
|
|
1
|
+
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("@charset \"UTF-8\";.relation-graph{box-sizing:border-box;position:relative;min-width:300px;min-height:300px;--editor-main-color: rgb(64, 165, 248);--editor-light-color: rgb(125, 192, 248);--editor-light2-color: rgb(168, 212, 248);--editor-light-opacity: rgba(57, 144, 216, .1);--rg-node-opacity: 1;--rg-node-font-size: 1rem;--rg-node-font-color: #000000;--rg-node-color: #eeeeee;--rg-node-border-color: #333333;--rg-node-border-width: 1px;--rg-node-border-radius: 3px;--rg-node-width: fit-content;--rg-node-height: fit-content;--rg-node-text-px: 10px;--rg-node-text-py: 3px;--rg-background-color: transparent;--rg-line-color: #888888;--rg-line-width: 1px;--rg-line-fontcolor: var(--rg-line-color, #666666);--rg-line-fontsize: 12px;--rg-line-opacity: 1;--rg-checked-item-bg-color: rgba(150, 150, 150, .2);--rg-checked-line-text-bg-color: rgb(234, 232, 232)}.relation-graph:focus{outline:none}.relation-graph .rg-graph-plugs{position:absolute;left:0px;top:0px;z-index:90;width:100%;height:100%;pointer-events:none;user-select:none}.relation-graph .rg-graph-plugs .rg-view-slot{position:relative;width:100%;height:100%}.relation-graph .rg-watermark{position:absolute;--watermark-width: 200px;--watermark-height: 100px;z-index:1200;overflow:visible;min-height:100px;min-width:100px;width:var(--watermark-width);height:var(--watermark-height);box-sizing:border-box}.relation-graph .rg-watermark div{box-sizing:border-box}.relation-graph .rg-watermark.rg-watermark-top{left:calc((100% - var(--watermark-width)) / 2);top:10px}.relation-graph .rg-watermark.rg-watermark-bottom{left:calc((100% - var(--watermark-width)) / 2);bottom:10px}.relation-graph .rg-watermark.rg-watermark-left{left:10px;top:calc((100% - var(--watermark-height)) / 2)}.relation-graph .rg-watermark.rg-watermark-right{right:10px;top:calc((100% - var(--watermark-height)) / 2)}.relation-graph .rg-watermark.rg-watermark-tl{left:10px;top:10px}.relation-graph .rg-watermark.rg-watermark-tr{right:10px;top:10px}.relation-graph .rg-watermark.rg-watermark-bl{left:10px;bottom:10px}.relation-graph .rg-watermark.rg-watermark-br{right:10px;bottom:10px}.relation-graph .rg-lines-container svg{overflow:visible}.relation-graph .rg-lines-svg{overflow:visible;width:10px;height:10px;position:absolute;left:0px;top:0px}.relation-graph .rg-lines-container{overflow:visible;position:absolute;z-index:40;width:100%;top:0px;left:0px;pointer-events:none}.relation-graph .rg-lines-container-el-lines{z-index:80;pointer-events:none}.relation-graph .rg-lines-container-el-lines .rg-line-bg{pointer-events:stroke}.relation-graph .rg-lines-container-el-lines .rg-line-text{pointer-events:all}.relation-graph .rg-lines-svg-el-lines{overflow:visible;width:10px;height:10px;position:absolute;left:0px;top:0px}.relation-graph .rg-nodes-container-wrapper{position:absolute;width:100%;top:0px;left:0px;z-index:50}.relation-graph .rg-nodes-container{position:relative;overflow:visible}.relation-graph .rg-map{background-color:var(--rg-background-color);overflow:hidden;cursor:default;user-select:none;opacity:.01;transition:none;width:100%;height:100%;position:relative}.relation-graph.rg-move-mode .rg-map{cursor:grab}.relation-graph .rg-map-ready{opacity:1;transition:opacity .5s ease;will-change:opacity}.relation-graph .rg-map-background-norepeat{background-repeat:no-repeat;background-position:right bottom}.relation-graph .rg-map-canvas{position:relative;user-select:none;pointer-events:none;top:0;left:0;border:none;z-index:3;overflow:visible;white-space:nowrap;transform-origin:0 0;will-change:transform}.relation-graph .rg-map-canvas .rg-events-all{pointer-events:all}.relation-graph.rg-enable-node-xy-animation .rg-node-peel{transition:transform .3s ease}.relation-graph.rg-enable-node-xy-animation .rg-line-peel{opacity:0;transition:none}.relation-graph.rg-enable-node-xy-animation .rg-map-canvas{transition:transform .4s ease-in-out}.relation-graph.rg-enable-canvas-animation .rg-map-canvas{transition:transform .5s ease}.relation-graph.rg-enable-canvas-animation .rg-editing-ctrl,.relation-graph.rg-enable-canvas-animation .rg-editing-line-ctrl,.relation-graph.rg-enable-canvas-animation .rg-editing-connect-ctrl{opacity:0}.relation-graph .rg-canvas-behind{z-index:2;position:absolute}.relation-graph .rg-canvas-above{z-index:5;position:absolute}.relation-graph .rg-canvas-slot{overflow:visible;position:absolute;margin-top:0;margin-left:0}.relation-graph .rg-canvas-slot-behind{z-index:30;overflow:visible}.relation-graph .rg-canvas-slot-above{z-index:70;overflow:visible}.relation-graph .rg-single-graph{position:relative;overflow:visible}.relation-graph .rg-map img{-webkit-user-drag:none;-webkit-user-select:none}.relation-graph .rg-line-text{fill:var(--rg-line-fontcolor, #888888);font-size:var(--rg-line-fontsize);paint-order:stroke;pointer-events:all}.relation-graph .rg-linetext-container{position:absolute;pointer-events:none;user-select:none;overflow:visible;left:0;top:0;z-index:45;display:block}.relation-graph .rg-linetext-container .rg-line-peel{width:fit-content}.relation-graph .rg-linetext-container .rg-line-peel .rg-line-label{display:block;color:var(--rg-line-fontcolor, #888888);font-size:var(--rg-line-fontsize);transform-origin:0 0;position:absolute;user-select:none;pointer-events:all;box-sizing:border-box;padding:2px 6px;border-radius:5px}.relation-graph .rg-linetext-container .rg-line-peel .rg-line-label-on-path{background-color:#fff}.relation-graph .rg-linetext-container .rg-line-checked .rg-line-label{background-color:var(--rg-checked-line-text-bg-color)}.relation-graph .rg-linetext-container .rg-line-checked .rg-line-label-on-path{background-color:var(--rg-line-color, #ffffff)}.relation-graph .rg-line-peel{pointer-events:none;cursor:default;transition:opacity .2s ease-in;opacity:var(--rg-line-opacity, 1)}.relation-graph .rg-line{fill-rule:nonzero;stroke-linecap:round;stroke:var(--rg-line-color);stroke-width:var(--rg-line-width);pointer-events:none;fill:none;marker-end:var(--rg-line-marker-end);marker-start:var(--rg-line-marker-start)}.relation-graph .rg-line-bg{stroke:#fff;opacity:.01;fill:none;fill-rule:nonzero;stroke-linecap:round;pointer-events:stroke;stroke-width:calc(var(--rg-line-width) + 6px)}.relation-graph .rg-line-bg:hover{opacity:.7;stroke:var(--rg-checked-item-bg-color)}.relation-graph .rg-line-checked .rg-line-bg{stroke:var(--rg-checked-item-bg-color);opacity:1}.relation-graph .rg-line-checked .rg-line{z-index:100}.relation-graph .rg-line-checked .rg-line-text{stroke:var(--rg-checked-item-bg-color);stroke-width:2}.relation-graph .rg-line-disable-events{pointer-events:none!important}.relation-graph .rg-line-disable-events .rg-line-bg,.relation-graph .rg-line-disable-events .rg-line-text,.relation-graph .rg-linetext-container .rg-line-disable-events .rg-line-bg,.relation-graph .rg-linetext-container .rg-line-disable-events .rg-line-label{pointer-events:none}.relation-graph .rg-line-dashtype-1{stroke-dasharray:2,2,2;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}.relation-graph .rg-line-dashtype-2{stroke-dasharray:5,5,5;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}.relation-graph .rg-line-dashtype-3{stroke-dasharray:9,9,9;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}.relation-graph .rg-line-dashtype-4{stroke-dasharray:5,5,15;stroke-dashoffset:3px;stroke-linecap:butt;stroke-linejoin:bevel}@keyframes ACTRGLineChecked{0%{stroke-dashoffset:352px;stroke-dasharray:5,5,5}50%{stroke-dasharray:5,5,5;stroke-dashoffset:3px}to{stroke-dashoffset:352px;stroke-dasharray:5,5,5}}@keyframes rg-line-anm1{0%{stroke-dashoffset:100px;stroke-dasharray:5,5,5}to{stroke-dasharray:5,5,5;stroke-dashoffset:3px}}@keyframes rg-line-anm2{0%{stroke-dashoffset:0;stroke-dasharray:4,4,4}to{stroke-dashoffset:10px;stroke-dasharray:20,20,20}}@keyframes rg-line-anm3{0%{stroke-opacity:1}50%{stroke-opacity:.2}to{stroke-opacity:1}}@keyframes rg-line-anm4{0%{stroke-dasharray:0,100%}to{stroke-dasharray:100%,0}}.relation-graph .rg-line-anm-1{animation:rg-line-anm1 10s infinite;animation-fill-mode:forwards;animation-timing-function:linear}.relation-graph .rg-line-anm-2{animation:rg-line-anm2 3s infinite}.relation-graph .rg-line-anm-3{animation:rg-line-anm3 1s infinite}.relation-graph .rg-line-anm-4{animation:rg-line-anm4 3s infinite}@keyframes deform1{0%{stroke-dashoffset:0}to{stroke-dashoffset:100%}}.relation-graph .rg-icon{width:19px;height:19px;vertical-align:0px;fill:currentColor;overflow:hidden}.relation-graph .rg-node-peel{padding:0;position:absolute;pointer-events:none;box-sizing:border-box;opacity:var(--rg-node-opacity);z-index:var(--rg-node-z-index);will-change:transform;transform-origin:0 0;cursor:default}.relation-graph .rg-node-peel .rg-node{pointer-events:all;text-align:center;border-style:solid;box-sizing:border-box;overflow:visible;transform-origin:0 0;font-size:var(--rg-node-font-size);color:var(--rg-node-font-color);background-color:var(--rg-node-color);border-color:var(--rg-node-border-color);border-width:var(--rg-node-border-width);width:var(--rg-node-width);height:var(--rg-node-height)}.relation-graph .rg-node-disable-events{pointer-events:none}.relation-graph .rg-node-shape-0>.rg-node{border-radius:50%}.relation-graph .rg-node-shape-1>.rg-node{border-radius:var(--rg-node-border-radius)}.relation-graph .rg-node-checked{z-index:800}.relation-graph .rg-node-checked>.rg-node{box-shadow:0 0 0 4px var(--rg-checked-item-bg-color)}.relation-graph .rg-node-selected>.rg-node{box-shadow:0 0 0 2px var(--editor-main-color)}.relation-graph img,.relation-graph svg,.relation-graph video,.relation-graph canvas,.relation-graph audio,.relation-graph iframe,.relation-graph embed,.relation-graph object{display:unset;vertical-align:unset}.relation-graph .rg-node-text{color:var(--rg-node-font-color);font-size:var(--rg-node-font-size);padding:var(--rg-node-text-py) var(--rg-node-text-px);height:100%;width:100%;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.relation-graph .rg-node-type-button{border-radius:25px;color:#00f;cursor:pointer}.relation-graph .rg-editing-referline{user-select:none;position:absolute;z-index:999;pointer-events:none;width:100%;height:100%;left:0px;top:0px}.relation-graph .rg-editing-referline .rg-referline{position:absolute;display:flex;place-items:center;justify-content:center;overflow:visible;transform-origin:0 0;--rg-refer-offset: -3px}.relation-graph .rg-editing-referline .rg-referline .referline{display:flex;place-items:center;justify-content:center}.relation-graph .rg-editing-referline .rg-referline .referline>div{background-color:var(--editor-main-color);font-size:8px;border-radius:3px;color:#fff;width:fit-content;height:fit-content;padding:2px 5px}.relation-graph .rg-editing-referline .rg-referline-v{top:0px;width:6px;height:100%}.relation-graph .rg-editing-referline .rg-referline-v .referline{width:1px;height:100%;background-color:var(--editor-main-color)}.relation-graph .rg-editing-referline .rg-referline-v:before{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;top:0;transform:translateY(-50%)}.relation-graph .rg-editing-referline .rg-referline-v:after{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;bottom:0;transform:translateY(50%)}.relation-graph .rg-editing-referline .rg-referline-h{left:0px;width:100%;height:6px}.relation-graph .rg-editing-referline .rg-referline-h .referline{width:100%;height:1px;background-color:var(--editor-main-color)}.relation-graph .rg-editing-referline .rg-referline-h:before{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;left:0;transform:translate(-50%)}.relation-graph .rg-editing-referline .rg-referline-h:after{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--editor-main-color);border-radius:50%;right:0;transform:translate(50%)}.relation-graph .rg-editing-line-ctrl{position:absolute;left:0px;top:0px;z-index:500;pointer-events:none;user-select:none;width:100%;height:100%}.relation-graph .rg-editing-line-ctrl .rg-edt-ctrl-svg{position:absolute;pointer-events:none;left:0px;top:0px;overflow:visible}.relation-graph .rg-editing-line-ctrl .rg-edt-ctrl-svg path{stroke:var(--editor-main-color);stroke-width:1px}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-dot{--rg-ctl-x: 0px;--rg-ctl-y: 0px;pointer-events:auto;user-select:none;width:10px;height:10px;background-color:#fff;box-shadow:0 0 0 1px var(--editor-main-color);position:absolute;border-radius:50%;cursor:move;z-index:1;transform-origin:0 0}.relation-graph .rg-editing-line-ctrl .start-dot,.relation-graph .rg-editing-line-ctrl .end-dot,.relation-graph .rg-editing-line-ctrl .ctrl-dot{transform-origin:0 0;transform:translate(-50%,-50%) translate(var(--rg-ctl-x),var(--rg-ctl-y))}.relation-graph .rg-editing-line-ctrl .ctrl-split,.relation-graph .rg-editing-line-ctrl .ctrl-split-core{background-color:#fff}.relation-graph .rg-editing-line-ctrl .ctrl-split-h{width:12px;height:5px;border-radius:3px;cursor:row-resize;transform:translate(-50%,-50%) translate(var(--rg-ctl-x),var(--rg-ctl-y))}.relation-graph .rg-editing-line-ctrl .ctrl-split-v{width:5px;height:12px;border-radius:3px;cursor:col-resize;transform:translate(-50%,-50%) translate(var(--rg-ctl-x),var(--rg-ctl-y))}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text{--rg-ctl-x: 0px;--rg-ctl-y: 0px;--font-size: .8rem;pointer-events:auto;background-color:#fffc;box-shadow:0 0 0 1px var(--editor-main-color);position:absolute;border-radius:3px;cursor:move;z-index:1;white-space:nowrap;color:#000;padding:3px 10px;display:flex;place-items:center;justify-content:center;box-sizing:border-box;text-shadow:none;font-size:var(--font-size, 12px);min-height:20px;max-height:30px;transform-origin:0 0;transform:translate(-50%,-50%) translate(10px,3px) translate(var(--rg-ctl-x),var(--rg-ctl-y));min-width:50px;max-width:220px}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text p{font-size:var(--font-size, 12px);color:#333}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text p.empty-text{font-size:10px;color:#888}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text .rg-line-text-input{white-space:nowrap;pointer-events:auto;user-select:auto;background-color:transparent;color:#000;border-radius:3px;height:100%;padding:3px 0;width:100px;text-shadow:none;font-size:var(--font-size, 12px);text-align:center;box-sizing:border-box;border:none;outline:none}.relation-graph .rg-editing-line-ctrl .rg-line-ctrl-text-editing{background-color:#faf191}.relation-graph .rg-editing-ctrl,.relation-graph .rg-editing-connect-ctrl{user-select:none;position:absolute;z-index:500;box-shadow:0 0 0 1px var(--editor-main-color);border-radius:0;pointer-events:none;transform-origin:0 0}.relation-graph .rg-editing-bar{user-select:none;pointer-events:none;position:absolute;border-radius:5px;padding:3px;box-sizing:border-box;display:flex;place-items:center;justify-content:center;flex-wrap:wrap;gap:5px}.relation-graph .rg-editing-bar .rg-gee-icon{background-color:#d603f680;pointer-events:auto;min-width:20px;min-height:20px;border-radius:5px;box-sizing:border-box;display:flex;place-items:center;justify-content:center;cursor:pointer}.relation-graph .rg-editing-bar .rg-gee-icon:hover{background-color:#d603f6;color:#fff}.relation-graph .rg-connect-source-handle{pointer-events:auto;width:fit-content;height:fit-content}.relation-graph .rg-editing-bar-top{width:fit-content;height:fit-content;left:50%;transform:translate(-50%) translateY(-100%);top:-15px}.relation-graph .rg-editing-bar-bottom{width:fit-content;height:fit-content;left:50%;transform:translate(-50%) translateY(100%);bottom:-15px}.relation-graph .rg-editing-bar-left{width:fit-content;height:fit-content;left:-15px;top:50%;transform:translate(-100%) translateY(-50%)}.relation-graph .rg-editing-bar-right{width:fit-content;height:fit-content;right:-15px;top:50%;transform:translate(100%) translateY(-50%)}.relation-graph .rg-editing-bar-tl{width:30px;height:30px;right:calc(100% + 10px);top:-40px}.relation-graph .rg-editing-bar-tr{width:30px;height:30px;left:calc(100% + 10px);top:-40px}.relation-graph .rg-editing-bar-bl{width:30px;height:30px;right:calc(100% + 10px);bottom:-40px}.relation-graph .rg-editing-bar-br{width:30px;height:30px;left:calc(100% + 10px);bottom:-40px}.relation-graph .rg-resize-ctl{user-select:none;position:relative;height:100%;width:100%;--resize-handler-size: 10px;--resize-handler-offset: -5px}.relation-graph .rg-resize-ctl .rg-resize-ctl-handler{pointer-events:auto;width:var(--resize-handler-size);height:var(--resize-handler-size);background-color:#fff;position:absolute;border-radius:2px;box-shadow:inset 0 0 0 1px var(--editor-main-color)}.relation-graph .rg-resize-ctl .rg-resize-ctl-tl{cursor:nwse-resize;left:var(--resize-handler-offset);top:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-tr{cursor:nesw-resize;right:var(--resize-handler-offset);top:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-bl{cursor:nesw-resize;left:var(--resize-handler-offset);bottom:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-br{cursor:nwse-resize;right:var(--resize-handler-offset);bottom:var(--resize-handler-offset)}.relation-graph .rg-resize-ctl .rg-resize-ctl-t{cursor:n-resize;top:var(--resize-handler-offset);left:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-resize-ctl .rg-resize-ctl-b{cursor:s-resize;bottom:var(--resize-handler-offset);left:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-resize-ctl .rg-resize-ctl-l{cursor:w-resize;left:var(--resize-handler-offset);top:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-resize-ctl .rg-resize-ctl-r{cursor:e-resize;right:var(--resize-handler-offset);top:calc((100% - var(--resize-handler-size)) / 2)}.relation-graph .rg-editing-connect-ctrl{position:absolute;user-select:none;pointer-events:none;left:0;top:0;z-index:1400;--hander-border-radius: 5px;border-radius:var(--hander-border-radius);--border-handler-width: 8px;--hv-handler-width: 10px;--center-handler-width: 10px;--border-point-width: 10px;--border-point-height: 10px;--hander-color: var(--editor-light2-color);--hander-border-color: var(--editor-main-color);--hander-shadow-color: rgba(57, 144, 216, .1);box-shadow:0 0 0 var(--border-handler-width) var(--hander-shadow-color)}.relation-graph .rg-connect-ctl{width:100%;height:100%;pointer-events:none;user-select:none;border:none;position:relative}.relation-graph .rg-connect-ctl-handler{pointer-events:auto;user-select:none;z-index:20;cursor:crosshair}.relation-graph .rg-connect-target{width:fit-content;height:fit-content;pointer-events:auto;display:flex;place-items:center;justify-content:center}.relation-graph .rg-connect-ctl-handler-style{background-color:var(--hander-color);border:var(--hander-border-color) solid 1px;position:absolute;border-radius:3px}.relation-graph .rg-connect-ctl-handler-style:hover{background-color:#fbe691}.relation-graph .rg-connect-ctl-center{width:var(--center-handler-width);height:var(--center-handler-width);border-radius:50%;top:calc((100% - var(--center-handler-width)) / 2);left:calc((100% - var(--center-handler-width)) / 2)}.relation-graph .rg-connect-ctl-t{width:var(--border-point-width);height:var(--border-point-height);top:calc(var(--border-point-height) / -2);left:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-b{width:var(--border-point-width);height:var(--border-point-height);bottom:calc(var(--border-point-height) / -2);left:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-l{width:var(--border-point-height);height:var(--border-point-width);left:calc(var(--border-point-height) / -2);top:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-r{width:var(--border-point-height);height:var(--border-point-width);right:calc(var(--border-point-height) / -2);top:calc((100% - var(--border-point-width)) / 2)}.relation-graph .rg-connect-ctl-lr{width:100%;height:var(--hv-handler-width);right:0px;top:calc((100% - var(--hv-handler-width)) / 2);z-index:11;opacity:.01}.relation-graph .rg-connect-ctl-lr:hover{opacity:1}.relation-graph .rg-connect-ctl-tb{width:var(--hv-handler-width);height:100%;top:0px;left:calc((100% - var(--hv-handler-width)) / 2);z-index:10;opacity:.01}.relation-graph .rg-connect-ctl-tb:hover{opacity:1}.relation-graph .rg-connect-ctl-bottom-bar{border:0px;border:none;width:100%;height:var(--border-handler-width);right:0px;top:100%;z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-top-left-radius:0;border-top-right-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-bottom-bar:hover{opacity:1}.relation-graph .rg-connect-ctl-top-bar{border:0px;border:none;width:100%;height:var(--border-handler-width);right:0px;top:calc(var(--border-handler-width) * -1);z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-top-bar:hover{opacity:1}.relation-graph .rg-connect-ctl-left-bar{border:0px;border:none;width:var(--border-handler-width);height:100%;left:calc(var(--border-handler-width) * -1);top:0;z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-bottom-right-radius:0;border-top-right-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-left-bar:hover{opacity:1}.relation-graph .rg-connect-ctl-right-bar{border:0px;width:var(--border-handler-width);height:100%;right:calc(var(--border-handler-width) * -1);top:0px;z-index:5;opacity:.1;box-shadow:none;background-color:var(--edit-ctl-light-color);border-radius:var(--hander-border-radius);border-bottom-left-radius:0;border-top-left-radius:0;overflow:hidden}.relation-graph .rg-connect-ctl-right-bar:hover{opacity:1}.relation-graph .rg-miniview{pointer-events:all;position:absolute;user-select:none;overflow:hidden;z-index:1100;min-height:100px;min-width:100px;--miniview-width: 200px;--miniview-height: 120px;height:var(--miniview-height);width:var(--miniview-width);border-radius:3px;display:flex;place-items:center;justify-content:center;background-color:#fff;box-shadow:0 0 0 1px #ccc;border:none}.relation-graph .rg-miniview .rg-miniview-container{position:relative;width:100%;height:100%;display:flex;place-items:center;justify-content:center}.relation-graph .rg-miniview canvas{opacity:1}.relation-graph .rg-miniview .rg-mv-canvas-reset{cursor:pointer}.relation-graph .rg-miniview .rg-mv-canvas-reset:hover{background-color:#bbf54794}.relation-graph .rg-miniview .rg-mv-visible-area{z-index:2;position:absolute;left:0;top:0;cursor:move;transform-origin:0 0;box-shadow:0 0 0 9999px #0003;border:#888 solid 1px;border-radius:3px;display:grid;place-items:center;color:#fff;font-weight:700;text-shadow:0 1px 2px rgba(0,0,0,.5)}.relation-graph .rg-miniview.rg-miniview-top{left:calc((100% - var(--miniview-width)) / 2);top:10px}.relation-graph .rg-miniview.rg-miniview-bottom{left:calc((100% - var(--miniview-width)) / 2);bottom:10px}.relation-graph .rg-miniview.rg-miniview-left{left:10px;top:calc((100% - var(--miniview-height)) / 2)}.relation-graph .rg-miniview.rg-miniview-right{right:10px;top:calc((100% - var(--miniview-height)) / 2)}.relation-graph .rg-miniview.rg-miniview-tl{left:10px;top:10px}.relation-graph .rg-miniview.rg-miniview-tr{right:10px;top:10px}.relation-graph .rg-miniview.rg-miniview-bl{left:10px;bottom:10px}.relation-graph .rg-miniview.rg-miniview-br{right:10px;bottom:10px}.relation-graph .rg-node-flashing{animation:ACTRGNodeFlashing 2s infinite}.relation-graph .rg-node-vtree-2{transform-origin:0 0;transform:rotate(30deg) translate(0)}.relation-graph .rg-node-vtree{width:130px;height:45px;text-align:left}.relation-graph .rg-node-expand-holder{position:absolute;height:fit-content;width:fit-content;display:flex;align-items:center;justify-content:center;user-select:none;pointer-events:none;cursor:pointer}.relation-graph .rg-node-expand-holder>span{width:16px;height:16px;display:block;text-align:center;border-radius:15px;cursor:pointer;background-size:100% 100%;pointer-events:all;border:#aaaaaa solid .5px;background-color:#fff}.relation-graph .c-expanded{background-image:url(data:image/svg+xml;%20charset=utf8,%3Csvg%20t=%221606310217820%22%20viewBox=%220%200%201024%201024%22%20version=%221.1%22%20xmlns=%22http://www.w3.org/2000/svg%22%20p-id=%223373%22%20width=%2232%22%20height=%2232%22%3E%3Cpath%20d=%22M853.333333%20480H544V170.666667c0-17.066667-14.933333-32-32-32s-32%2014.933333-32%2032v309.333333H170.666667c-17.066667%200-32%2014.933333-32%2032s14.933333%2032%2032%2032h309.333333V853.333333c0%2017.066667%2014.933333%2032%2032%2032s32-14.933333%2032-32V544H853.333333c17.066667%200%2032-14.933333%2032-32s-14.933333-32-32-32z%22%20p-id=%223374%22%20fill=%22%23666666%22%3E%3C/path%3E%3C/svg%3E)}.relation-graph .c-collapsed{background-image:url(data:image/svg+xml;%20charset=utf8,%3Csvg%20t=%221606310454619%22%20class=%22icon%22%20viewBox=%220%200%201024%201024%22%20version=%221.1%22%20xmlns=%22http://www.w3.org/2000/svg%22%20p-id=%223662%22%20width=%22128%22%20height=%22128%22%3E%3Cpath%20d=%22M853.333333%20554.666667H170.666667c-23.466667%200-42.666667-19.2-42.666667-42.666667s19.2-42.666667%2042.666667-42.666667h682.666666c23.466667%200%2042.666667%2019.2%2042.666667%2042.666667s-19.2%2042.666667-42.666667%2042.666667z%22%20p-id=%223663%22%20fill=%22%23666666%22%3E%3C/path%3E%3C/svg%3E)}.relation-graph .c-expand-positon-left{transform:translate(-100%) translateY(-50%);left:-5px;top:50%}.relation-graph .c-expand-positon-right{transform:translate(5px) translateY(-50%);left:100%;top:50%}.relation-graph .c-expand-positon-bottom{transform:translate(-50%);left:50%;top:calc(100% + 5px)}.relation-graph .c-expand-positon-top{transform:translate(-50%) translateY(-100%);left:50%;top:-5px}.relation-graph .rg-setting-panel{--height: 300px;--width: 200px;width:300px;height:200px;position:absolute;left:10px;top:5px;font-size:12px;color:#3a5bb2;padding:60px 10px 10px;overflow:hidden;box-shadow:0 0 5px #999;border-radius:5px;z-index:1000;background-color:#fff;border:#999999 solid 1px}.relation-graph .rg-setting-panel-button{height:35px;width:35px;font-size:8px;line-height:35px;text-align:center;border-radius:50%;position:absolute;margin-left:25px;margin-top:20px;background-color:#3a5bb2;color:#fff;cursor:pointer;z-index:1001;box-shadow:0 0 8px #999}.relation-graph .rg-setting-panel-button:hover{box-shadow:0 0 20px #ffa20a;border:#ffffff solid 1px;color:#ffa20a;-moz-transform:rotate(-89deg) translateX(-190px);animation-timing-function:linear;animation:flashButton 2s infinite}@keyframes flashButton{0%{box-shadow:0 0 8px #2e4e8f}30%{box-shadow:0 0 20px #ffa20a}to{box-shadow:0 0 8px #2e4e8f}}.relation-graph .c-debug-tools-row{text-align:left}.relation-graph .rg-operate{pointer-events:none;user-select:none;position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:180}.relation-graph .rg-operate .rg-node{cursor:move}.relation-graph .rg-operate .rg-creating-container{pointer-events:none;position:relative}.relation-graph .rg-operate .rg-creating-container *{pointer-events:none!important}.relation-graph .rg-selection{pointer-events:none;position:absolute;user-select:none;background-color:var(--editor-light-opacity);border:var(--editor-main-color) solid 1px;transform-origin:0 0}.relation-graph .rg-graph-loading{position:absolute;z-index:1600;left:0px;top:0px;height:100%;width:100%;background-color:#fff}.relation-graph .rg-graph-loading .rg-graph-loading-icon{width:16px;height:16px;vertical-align:-3px;fill:currentColor;overflow:hidden;animation:turn 1s linear infinite}.relation-graph .rg-graph-loading .rg-graph-loading-message{position:absolute;width:200px;height:30px;line-height:30px;text-align:center;left:calc((100% - 200px)/2);top:calc((100% - 30px)/2);border-radius:5px;background-color:#00000080;color:#fff;display:flex;place-items:center;justify-content:center;gap:8px}.relation-graph .rg-graph-loading-hide{display:none}@keyframes slowHide{0%{opacity:1}to{opacity:0;display:none}}.relation-graph .rg-easy-view{overflow:visible;height:100%;width:100%;background-color:transparent;position:absolute;left:0px;top:0px;z-index:3;pointer-events:none}.relation-graph .rg-easy-view canvas{opacity:0;width:100%;height:100%}.relation-graph .rg-easy-view-active{pointer-events:all}.relation-graph .rg-easy-view-active canvas{opacity:1}.relation-graph .rg-move-operator{position:absolute;width:100%;height:100%;pointer-events:none;user-select:none;left:0px;top:0px;z-index:6666}.relation-graph .rg-move-operator .rg-move-touchpad{display:none;background-color:var(--edit-ctl-light2-color);height:100%;width:100%;pointer-events:all}.relation-graph .rg-move-operator.rg-move-operator-active{pointer-events:all;cursor:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4Ij48aW1hZ2UgeGxpbms6aHJlZj0iZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFFQUFBQUJBQ0FZQUFBQ3FhWEhlQUFBQUFYTlNSMElBcnM0YzZRQUFDWlpKUkVGVWVGN3RXZ3RNVk5rWi9xYThabkZ4QkVIQWlCV3lFa0drUEcwRW1paWdGVVZzcFZxTmlsSmZRVEV4c2k2eDFqZHRMVnVEeGpoTlJDc0JzeHBOZktEV0J4Q05QTFFpaUNoRzBTQkxKZHBTYUFWNXlHaW4rOTNjdzQ2enVEc0Rkd1lUT01uSm5XRXU5NTcvKy8vLyt4L25xRERJaDJxUXk0OGhBSVlzWUpBak1PUUNnOXdBaGtod3lBV0dYR0NRSXpEa0FnTmtBQUo0UXdYbzViV0lxMVdXWm0wTDRQdCtCTUJHdnZJN0o0WG0vQitBZC9MVktrQllBd0FocEJEY3RyS3lNc3pYMTNlcG5aMWRvTDI5ZlhoM2QzZTVUcWVycnEydHpRc0pDYmtENEswUkVCWUR3NU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BU31E8I44Tmf8f4ZAmPrMPt9nCRLs82IG4h+HABgI1D+mdw5ZwMekjYFYy5AFDATqH9M7B70F/B8BkQp9YNbG2QAAAABJRU5ErkJggg==) 1x) 16 16,auto!important}.relation-graph .rg-move-operator.rg-move-operator-active .rg-move-touchpad{display:flex}.relation-graph.rg-creating-line .rg-connect-source-handle{pointer-events:none;opacity:.5}.rg-background{position:absolute;left:0px;top:0px;width:100%;height:100%;z-index:0;pointer-events:none}.rg-toolbar{user-select:none;pointer-events:all;display:flex;position:absolute;z-index:300;background-color:#fff;color:#333;--rg-toolbar-hover-bg-color: rgba(220, 220, 220, .5);box-shadow:0 1px 3px #0003,0 0 1px #0006;box-sizing:border-box;border-radius:5px;width:fit-content;height:fit-content;place-items:center;justify-content:center;gap:3px;backdrop-filter:blur(5px)}.rg-toolbar .rg-icon{flex-grow:1;width:16px;height:16px;fill:currentColor;overflow:hidden}.rg-toolbar .rg-mb-button svg{margin:auto}.rg-toolbar .rg-mb-button:hover{background-color:var(--rg-toolbar-hover-bg-color)}.rg-toolbar .rg-loading-icon{animation:turn 1s linear infinite}@keyframes turn{0%{-webkit-transform:rotate(0deg)}25%{-webkit-transform:rotate(90deg)}50%{-webkit-transform:rotate(180deg)}75%{-webkit-transform:rotate(270deg)}to{-webkit-transform:rotate(360deg)}}.rg-toolbar .rg-current-zoom{margin-top:0;font-size:10px;text-align:center;border-radius:3px;cursor:pointer}.rg-toolbar .rg-current-zoom:hover{background-color:var(--rg-toolbar-hover-bg-color)}.rg-toolbar .rg-mb-button{width:35px;height:35px;margin-top:0;opacity:1;cursor:pointer;font-size:18px;box-sizing:border-box;display:flex;align-items:center;justify-items:center;border-radius:3px}.rg-toolbar.rg-toolbar-v{flex-flow:column;padding:10px 3px}.rg-toolbar.rg-toolbar-v .rg-current-zoom{width:35px;height:25px;line-height:25px}.rg-toolbar.rg-toolbar-h{padding:3px 10px}.rg-toolbar.rg-toolbar-h .rg-current-zoom{width:fit-content;padding:0 5px;height:35px;line-height:35px}.rg-toolbar.rg-toolbar-h-right{right:15px}.rg-toolbar.rg-toolbar-h-left{left:15px}.rg-toolbar.rg-toolbar-h-center{left:50%;transform:translate(-50%)}.rg-toolbar.rg-toolbar-v-top{top:15px}.rg-toolbar.rg-toolbar-v-bottom{bottom:15px}.rg-toolbar.rg-toolbar-v-center{top:50%;transform:translateY(-50%)}.rg-toolbar.rg-xs-toolbar .rg-mb-button{width:25px;height:25px}.rg-toolbar.rg-xs-toolbar .rg-icon{width:14px;height:14px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v{padding:3px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v .rg-current-zoom{width:30px;height:25px;line-height:25px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h{padding:3px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h .rg-current-zoom{width:35px;height:25px;line-height:25px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h .rg-mb-button{width:25px;height:25px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h-right{right:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h-left{left:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-h-center{top:50%;transform:translate(-50%)}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v-top{top:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v-bottom{bottom:10px}.rg-toolbar.rg-xs-toolbar.rg-toolbar-v-center{top:50%;transform:translateY(-50%)}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();var Vt = Object.defineProperty;
|
|
2
2
|
var Xt = (s, o, e) => o in s ? Vt(s, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[o] = e;
|
|
3
3
|
var _ = (s, o, e) => (Xt(s, typeof o != "symbol" ? o + "" : o, e), e);
|
|
4
|
-
import { jsxs as H, jsx as
|
|
5
|
-
import
|
|
4
|
+
import { jsxs as H, jsx as w, Fragment as le } from "react/jsx-runtime";
|
|
5
|
+
import Ce, { createContext as Xe, useContext as se, useMemo as K, useRef as ee, useEffect as q, useState as pe, useCallback as zt, useImperativeHandle as Bt } from "react";
|
|
6
6
|
import { createPortal as Gt } from "react-dom";
|
|
7
7
|
/*!
|
|
8
|
-
* relation-graph v3.0.
|
|
9
|
-
* (c)
|
|
8
|
+
* relation-graph v3.0.2
|
|
9
|
+
* (c) 2026 WanLian <seeksdream@qq.com>
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
* Repository: https://github.com/seeksdream/relation-graph
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const rt = "3.0.2", ye = (s) => {
|
|
14
14
|
try {
|
|
15
15
|
if ("touches" in s && s.touches || "targetTouches" in s && s.targetTouches)
|
|
16
16
|
return !0;
|
|
@@ -54,10 +54,10 @@ const at = "3.0.1", ye = (s) => {
|
|
|
54
54
|
}, Yt = () => {
|
|
55
55
|
const s = "c", o = "o", e = "n", t = "s", n = "o", i = "l", a = "e", r = new Date().getFullYear(), l = [];
|
|
56
56
|
return r > 1 && l.push(s), r > 21 && l.push(o), r > 35 && l.push(e), r > 55 && l.push(t), r > 189 && l.push(n), r > 231 && l.push(i), r > 1234 && l.push(a), l.join("");
|
|
57
|
-
},
|
|
57
|
+
}, tt = (s) => s.replace(/-/g, "").replace(/\*/g, "-"), lt = (s) => {
|
|
58
58
|
const o = Yt(), e = Ft(), t = "r-e-l-a-t-i-o-n*g-r-a-p-h", n = "h-t-t-p-s-:-/-/-g-i-t-h-u-b-.-c-o-m-/-s-e-e-k-s-d-r-e-a-m-/-r-e-l-a-t-i-o-n-*-g-r-a-p-h";
|
|
59
59
|
window && window[o] && window[o][e](
|
|
60
|
-
`%c ${
|
|
60
|
+
`%c ${tt(t)} %c Version v${rt}(${s}) %c More info: ${tt(n)} %c`,
|
|
61
61
|
"background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff",
|
|
62
62
|
"background:#41b883 ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff",
|
|
63
63
|
"background:#fff ; padding: 1px; border-radius: 0 3px 3px 0; color: #41b883",
|
|
@@ -76,7 +76,7 @@ const at = "3.0.1", ye = (s) => {
|
|
|
76
76
|
e = e.parentElement;
|
|
77
77
|
}
|
|
78
78
|
return !1;
|
|
79
|
-
},
|
|
79
|
+
}, Te = (s) => {
|
|
80
80
|
const o = s.target;
|
|
81
81
|
return Ht(o, "rel-text-editing") ? !0 : ["input", "textarea"].includes(document.activeElement.tagName.toLowerCase());
|
|
82
82
|
}, $e = (s = 5) => {
|
|
@@ -86,7 +86,7 @@ const at = "3.0.1", ye = (s) => {
|
|
|
86
86
|
for (let n = 0; n < t; n++)
|
|
87
87
|
e += o[Math.floor(Math.random() * o.length)];
|
|
88
88
|
return e;
|
|
89
|
-
},
|
|
89
|
+
}, Ue = (s) => ({
|
|
90
90
|
onReady: s.onReady,
|
|
91
91
|
onNodeClick: s.onNodeClick,
|
|
92
92
|
onNodeExpand: s.onNodeExpand,
|
|
@@ -118,7 +118,7 @@ const at = "3.0.1", ye = (s) => {
|
|
|
118
118
|
onForceLayoutFinish: s.onForceLayoutFinish,
|
|
119
119
|
beforeScrollStart: s.beforeScrollStart
|
|
120
120
|
});
|
|
121
|
-
var
|
|
121
|
+
var A = /* @__PURE__ */ ((s) => (s.Node = "node", s.NodePoint = "NodePoint", s.HTMLElementId = "HTMLElementId", s.CanvasPoint = "CanvasPoint", s.ViewPoint = "ViewPoint", s))(A || {}), j = /* @__PURE__ */ ((s) => (s.border = "border", s.ltrb = "ltrb", s.tb = "tb", s.lr = "lr", s.left = "left", s.right = "right", s.top = "top", s.bottom = "bottom", s))(j || {}), ze = /* @__PURE__ */ ((s) => (s[s.circle = 0] = "circle", s[s.rect = 1] = "rect", s))(ze || {}), F = /* @__PURE__ */ ((s) => (s[s.StandardStraight = 1] = "StandardStraight", s[s.StandardCurve = 6] = "StandardCurve", s[s.Curve2 = 2] = "Curve2", s[s.Curve3 = 3] = "Curve3", s[s.Curve5 = 5] = "Curve5", s[s.Curve7 = 7] = "Curve7", s[s.Curve8 = 8] = "Curve8", s[s.SimpleOrthogonal = 4] = "SimpleOrthogonal", s[s.StandardOrthogonal = 44] = "StandardOrthogonal", s[s.HardOrthogonal = 49] = "HardOrthogonal", s))(F || {}), Wt = /* @__PURE__ */ ((s) => (s.Left = "left", s.Top = "top", s.Right = "right", s.Bottom = "bottom", s))(Wt || {}), D = /* @__PURE__ */ ((s) => (s.onReady = "onReady", s.onNodeClick = "onNodeClick", s.onNodeExpand = "onNodeExpand", s.onNodeCollapse = "onNodeCollapse", s.onLineClick = "onLineClick", s.onNodeDragStart = "onNodeDragStart", s.onNodeDragEnd = "onNodeDragEnd", s.onNodeDragging = "onNodeDragging", s.onCanvasDragEnd = "onCanvasDragEnd", s.onCanvasDragging = "onCanvasDragging", s.onContextmenu = "onContextmenu", s.onFullscreen = "onFullscreen", s.onCanvasClick = "onCanvasClick", s.onCanvasSelectionEnd = "onCanvasSelectionEnd", s.beforeZoomStart = "beforeZoomStart", s.onZoomEnd = "onZoomEnd", s.onViewResize = "onViewResize", s.onResizeStart = "onResizeStart", s.beforeNodeResize = "beforeNodeResize", s.onResizeEnd = "onResizeEnd", s.onLineVertexDropped = "onLineVertexDropped", s.beforeCreateLine = "beforeCreateLine", s.onLineBeCreated = "onLineBeCreated", s.beforeAddNodes = "beforeAddNodes", s.beforeAddLines = "beforeAddLines", s.onKeyboardDown = "onKeyboardDown", s.onKeyboardUp = "onKeyboardUp", s.onCanvasDragStart = "onCanvasDragStart", s.onForceLayoutFinish = "onForceLayoutFinish", s.beforeScrollStart = "beforeScrollStart", s))(D || {});
|
|
122
122
|
const me = (s, o) => {
|
|
123
123
|
if (s.from === void 0)
|
|
124
124
|
throw console.log("error,line must has option[from](nodeId):", s), new Error("error,line must has option[from]:");
|
|
@@ -128,14 +128,14 @@ const me = (s, o) => {
|
|
|
128
128
|
throw console.log("error line from, must be string(nodeId):", s), new TypeError("error line from, must be string:");
|
|
129
129
|
if (typeof s.to != "string")
|
|
130
130
|
throw console.log("error line to, must be string(nodeId):", s), new TypeError("error line to, must be string:");
|
|
131
|
-
return s.isShow !== void 0 && (s.hidden = !s.isShow, console.warn("[relation-graph Warning] line option[isShow] is deprecated, please use [hidden] instead.")), s.isHide !== void 0 && (s.hidden = s.isHide, console.warn("[relation-graph Warning] line option[isHide] is deprecated, please use [hidden] instead.")),
|
|
131
|
+
return s.isShow !== void 0 && (s.hidden = !s.isShow, console.warn("[relation-graph Warning] line option[isShow] is deprecated, please use [hidden] instead.")), s.isHide !== void 0 && (s.hidden = s.isHide, console.warn("[relation-graph Warning] line option[isHide] is deprecated, please use [hidden] instead.")), {
|
|
132
132
|
id: s.id,
|
|
133
133
|
from: s.from,
|
|
134
134
|
to: s.to,
|
|
135
135
|
type: s.type !== void 0 ? s.type : "line",
|
|
136
136
|
isFakeLine: s.isFakeLine !== void 0 ? s.isFakeLine : !1,
|
|
137
|
-
fromType: s.fromType !== void 0 ? s.fromType : s.isFakeLine ?
|
|
138
|
-
toType: s.toType !== void 0 ? s.toType : s.isFakeLine ?
|
|
137
|
+
fromType: s.fromType !== void 0 ? s.fromType : s.isFakeLine ? A.CanvasPoint : A.Node,
|
|
138
|
+
toType: s.toType !== void 0 ? s.toType : s.isFakeLine ? A.CanvasPoint : A.Node,
|
|
139
139
|
selected: !1,
|
|
140
140
|
text: s.text !== void 0 ? s.text : "",
|
|
141
141
|
textOffset_x: s.textOffset_x !== void 0 ? s.textOffset_x : void 0,
|
|
@@ -152,8 +152,9 @@ const me = (s, o) => {
|
|
|
152
152
|
disablePointEvent: s.disablePointEvent !== void 0 ? s.disablePointEvent : !1,
|
|
153
153
|
showStartArrow: s.showStartArrow !== void 0 ? s.showStartArrow : !1,
|
|
154
154
|
showEndArrow: s.showEndArrow !== void 0 ? s.showEndArrow : !0,
|
|
155
|
-
|
|
155
|
+
useTextOnPath: s.useTextOnPath !== void 0 ? s.useTextOnPath : void 0,
|
|
156
156
|
onPathStartOffset: s.onPathStartOffset !== void 0 ? s.onPathStartOffset : void 0,
|
|
157
|
+
placeText: s.placeText !== void 0 ? s.placeText : void 0,
|
|
157
158
|
startMarkerId: s.startMarkerId || "",
|
|
158
159
|
endMarkerId: s.endMarkerId || "",
|
|
159
160
|
textAnchor: s.textAnchor !== void 0 ? s.textAnchor : void 0,
|
|
@@ -189,32 +190,32 @@ const me = (s, o) => {
|
|
|
189
190
|
return Object.keys(s).forEach((e) => {
|
|
190
191
|
if (!$t.includes(e)) {
|
|
191
192
|
const t = s[e];
|
|
192
|
-
t !== void 0 && (e === "isFakeLine" && t === !1 || e === "fromType" && t ===
|
|
193
|
+
t !== void 0 && (e === "isFakeLine" && t === !1 || e === "fromType" && t === A.Node || e === "toType" && t === A.Node || e === "animation" && t === 0 || e === "text" && t === "" || e === "dashType" && t === 0 || e === "disablePointEvent" && t === !1 || e === "showStartArrow" && t === !1 || e === "showEndArrow" && t === !0 || e === "startMarkerId" && t === "" || e === "endMarkerId" && t === "" || e === "forDisplayOnly" && t === !1 || e === "fromJuctionPointOffsetX" && t === 0 || e === "fromJuctionPointOffsetY" && t === 0 || e === "toJuctionPointOffsetX" && t === 0 || e === "toJuctionPointOffsetY" && t === 0 || e === "opacity" && t === 1 || e === "hidden" && t === !1 || e === "data" && (!t || Object.keys(t).length === 0) || (o[e] = s[e]));
|
|
193
194
|
}
|
|
194
195
|
}), o;
|
|
195
|
-
},
|
|
196
|
+
}, je = (s) => {
|
|
196
197
|
if (!!s)
|
|
197
198
|
return Ie(s.line);
|
|
198
199
|
}, Ut = {
|
|
199
200
|
json2Line: me,
|
|
200
|
-
transLinkToJson:
|
|
201
|
+
transLinkToJson: je
|
|
201
202
|
}, jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
202
203
|
__proto__: null,
|
|
203
204
|
json2Line: me,
|
|
204
205
|
transLineToJson: Ie,
|
|
205
|
-
transLinkToJson:
|
|
206
|
+
transLinkToJson: je,
|
|
206
207
|
default: Ut
|
|
207
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
208
|
+
}, Symbol.toStringTag, { value: "Module" })), z = {
|
|
208
209
|
getDescendantNodes(s, o = []) {
|
|
209
210
|
return s.lot && s.lot.childs && s.lot.childs.forEach((e) => {
|
|
210
|
-
o.push(e),
|
|
211
|
+
o.push(e), z.getDescendantNodes(e, o);
|
|
211
212
|
}), o;
|
|
212
213
|
},
|
|
213
214
|
isVisibleNode(s, o = 0) {
|
|
214
|
-
return typeof o != "number" && (o = 0), o > 18 ? !0 : s.hidden ? !1 : s.lot && s.lot.parent ? s.lot.parent.expanded === !1 ? !1 :
|
|
215
|
+
return typeof o != "number" && (o = 0), o > 18 ? !0 : s.hidden ? !1 : s.lot && s.lot.parent ? s.lot.parent.expanded === !1 ? !1 : z.isVisibleNode(s.lot.parent, o + 1) : !0;
|
|
215
216
|
},
|
|
216
217
|
isAllowShowNode(s, o = 0) {
|
|
217
|
-
return
|
|
218
|
+
return z.isVisibleNode(s, o = 0);
|
|
218
219
|
},
|
|
219
220
|
getNodeWidth(s) {
|
|
220
221
|
return s.el_W || s.width || 50;
|
|
@@ -224,15 +225,15 @@ const me = (s, o) => {
|
|
|
224
225
|
},
|
|
225
226
|
getNodeXByLotX(s, o) {
|
|
226
227
|
const e = o.lot.x || 0;
|
|
227
|
-
return s.alignItemsX === "end" ? e -
|
|
228
|
+
return s.alignItemsX === "end" ? e - z.getNodeWidth(o) : s.alignItemsX === "start" ? e : e - z.getNodeWidth(o) / 2;
|
|
228
229
|
},
|
|
229
230
|
getNodeYByLotY(s, o) {
|
|
230
231
|
const e = o.lot.y || 0;
|
|
231
|
-
return s.alignItemsY === "end" ? e -
|
|
232
|
+
return s.alignItemsY === "end" ? e - z.getNodeHeight(o) : s.alignItemsY === "start" ? e : e - z.getNodeHeight(o) / 2;
|
|
232
233
|
},
|
|
233
234
|
getNodeLotXY(s, o) {
|
|
234
235
|
let e = o.x || 0, t = o.y || 0;
|
|
235
|
-
return s.alignItemsX === "end" ? e = e +
|
|
236
|
+
return s.alignItemsX === "end" ? e = e + z.getNodeWidth(o) : s.alignItemsX === "start" || (e = e + z.getNodeWidth(o) / 2), s.alignItemsY === "end" ? t = t + z.getNodeHeight(o) : s.alignItemsY === "start" || (t = t + z.getNodeHeight(o) / 2), { x: e, y: t };
|
|
236
237
|
},
|
|
237
238
|
isRectangleOverlap(s, o) {
|
|
238
239
|
const e = s.x, t = o.x, n = s.el_W, i = o.el_W, a = s.y, r = o.y, l = s.el_H, c = o.el_H;
|
|
@@ -263,24 +264,24 @@ const me = (s, o) => {
|
|
|
263
264
|
i && i.length > 0 && this.flatNodeData(i, n, e, t);
|
|
264
265
|
});
|
|
265
266
|
}
|
|
266
|
-
},
|
|
267
|
+
}, Pe = (s, o) => s || s === 0 ? s : o, qe = {
|
|
267
268
|
id: "rg-newNodeTemplate",
|
|
268
269
|
x: 0,
|
|
269
270
|
y: 0,
|
|
270
271
|
text: ""
|
|
271
|
-
},
|
|
272
|
+
}, Se = (s, o, e) => {
|
|
272
273
|
if (s.id === void 0)
|
|
273
274
|
throw console.log("node must has id:", s), new Error("node must has option[id]:");
|
|
274
275
|
s.isShow !== void 0 && (s.hidden = !s.isShow, console.warn("[relation-graph Warning] line option[isShow] is deprecated, please use [hidden] instead.")), s.isHide !== void 0 && (s.hidden = s.isHide, console.warn("[relation-graph Warning] line option[isHide] is deprecated, please use [hidden] instead."));
|
|
275
|
-
const
|
|
276
|
+
const t = s.width || s.width === 0 ? s.width : o == null ? void 0 : o.defaultNodeWidth, n = s.height || s.height === 0 ? s.height : o == null ? void 0 : o.defaultNodeHeight, i = {
|
|
276
277
|
id: s.id,
|
|
277
278
|
text: s.text !== void 0 ? s.text : "",
|
|
278
279
|
type: s.type !== void 0 ? s.type : "node",
|
|
279
|
-
targetType: s.targetType !== void 0 ? s.targetType :
|
|
280
|
+
targetType: s.targetType !== void 0 ? s.targetType : A.Node,
|
|
280
281
|
expanded: s.expanded !== void 0 ? s.expanded : !0,
|
|
281
282
|
selected: s.selected !== void 0 ? s.selected : !1,
|
|
282
283
|
className: s.className !== void 0 ? s.className : "",
|
|
283
|
-
nodeShape:
|
|
284
|
+
nodeShape: Pe(s.nodeShape, o == null ? void 0 : o.defaultNodeShape),
|
|
284
285
|
borderWidth: s.borderWidth !== void 0 ? s.borderWidth : void 0,
|
|
285
286
|
borderRadius: s.borderRadius !== void 0 ? s.borderRadius : void 0,
|
|
286
287
|
borderColor: s.borderColor !== void 0 ? s.borderColor : void 0,
|
|
@@ -289,8 +290,8 @@ const me = (s, o) => {
|
|
|
289
290
|
color: s.color !== void 0 ? s.color : void 0,
|
|
290
291
|
opacity: s.opacity !== void 0 ? s.opacity : void 0,
|
|
291
292
|
fixed: s.fixed !== void 0 ? s.fixed : !1,
|
|
292
|
-
width:
|
|
293
|
-
height:
|
|
293
|
+
width: t,
|
|
294
|
+
height: n,
|
|
294
295
|
force_weight: s.force_weight,
|
|
295
296
|
x: s.x !== void 0 ? s.x : 0,
|
|
296
297
|
y: s.y !== void 0 ? s.y : 0,
|
|
@@ -302,16 +303,20 @@ const me = (s, o) => {
|
|
|
302
303
|
rgShouldRender: !0,
|
|
303
304
|
rgChildrenSize: 0,
|
|
304
305
|
zIndex: s.zIndex || 0,
|
|
305
|
-
el_W: s.el_W ||
|
|
306
|
-
el_H: s.el_H ||
|
|
306
|
+
el_W: s.el_W || t || 0,
|
|
307
|
+
el_H: s.el_H || n || 0,
|
|
307
308
|
data: s.data !== void 0 ? s.data : {}
|
|
308
309
|
};
|
|
309
|
-
|
|
310
|
+
if (e && e.has(i.id)) {
|
|
311
|
+
const a = e.get(i.id);
|
|
312
|
+
i.el_W || a && (i.el_W = a[0]), i.el_H || a && (i.el_H = a[1]);
|
|
313
|
+
}
|
|
314
|
+
return i.lot = {
|
|
310
315
|
childs: [],
|
|
311
316
|
parent: void 0,
|
|
312
317
|
eached: !1,
|
|
313
318
|
strength: 0
|
|
314
|
-
},
|
|
319
|
+
}, i.width && (i.el_W = i.width), i.height && (i.el_H = i.height), i;
|
|
315
320
|
}, qt = [
|
|
316
321
|
"Fx",
|
|
317
322
|
"Fy",
|
|
@@ -339,16 +344,16 @@ const me = (s, o) => {
|
|
|
339
344
|
return Object.keys(s).forEach((e) => {
|
|
340
345
|
if (!qt.includes(e)) {
|
|
341
346
|
const t = s[e];
|
|
342
|
-
t !== void 0 && (e === "offset_x" && t === 0 || e === "nodeShape" && t === 1 || e === "offset_y" && t === 0 || e === "zIndex" && t === 0 || e === "width" && !t || e === "height" && !t || e === "fixed" && t === !1 || e === "className" && t === "" || e === "hidden" && t === !1 || e === "disableDrag" && t === !1 || e === "expanded" && t === !0 || e === "opacity" && t === 1 || e === "type" && t === "node" || e === "targetType" && t ===
|
|
347
|
+
t !== void 0 && (e === "offset_x" && t === 0 || e === "nodeShape" && t === 1 || e === "offset_y" && t === 0 || e === "zIndex" && t === 0 || e === "width" && !t || e === "height" && !t || e === "fixed" && t === !1 || e === "className" && t === "" || e === "hidden" && t === !1 || e === "disableDrag" && t === !1 || e === "expanded" && t === !0 || e === "opacity" && t === 1 || e === "type" && t === "node" || e === "targetType" && t === A.Node || e === "data" && (!t || Object.keys(t).length === 0) || (o[e] = t));
|
|
343
348
|
}
|
|
344
349
|
}), o;
|
|
345
350
|
}, Jt = {
|
|
346
|
-
json2Node:
|
|
351
|
+
json2Node: Se,
|
|
347
352
|
transNodeToJson: Ee
|
|
348
353
|
}, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
349
354
|
__proto__: null,
|
|
350
|
-
newNodeTemplate:
|
|
351
|
-
json2Node:
|
|
355
|
+
newNodeTemplate: qe,
|
|
356
|
+
json2Node: Se,
|
|
352
357
|
transNodeToJson: Ee,
|
|
353
358
|
default: Jt
|
|
354
359
|
}, Symbol.toStringTag, { value: "Module" })), Me = (s = {}) => {
|
|
@@ -381,20 +386,20 @@ const me = (s, o) => {
|
|
|
381
386
|
defaultNodeColor: "#ffffff",
|
|
382
387
|
defaultNodeBorderColor: "#666666",
|
|
383
388
|
defaultNodeBorderWidth: 1,
|
|
384
|
-
defaultNodeBorderRadius:
|
|
389
|
+
defaultNodeBorderRadius: 4,
|
|
385
390
|
defaultNodeShape: ze.rect,
|
|
386
391
|
defaultNodeWidth: void 0,
|
|
387
392
|
defaultNodeHeight: void 0,
|
|
388
393
|
defaultLineColor: "#cccccc",
|
|
389
394
|
defaultLineWidth: 2,
|
|
390
|
-
defaultLineShape:
|
|
395
|
+
defaultLineShape: F.StandardStraight,
|
|
391
396
|
defaultLineTextOffset_x: void 0,
|
|
392
397
|
defaultLineTextOffset_y: void 0,
|
|
393
|
-
defaultJunctionPoint:
|
|
398
|
+
defaultJunctionPoint: j.border,
|
|
394
399
|
defaultLineJunctionOffset: 3,
|
|
395
400
|
defaultPolyLineRadius: 5,
|
|
396
401
|
placeOtherGroup: !0,
|
|
397
|
-
|
|
402
|
+
defaultLineTextOnPath: !1,
|
|
398
403
|
lineTextMaxLength: 66,
|
|
399
404
|
multiLineDistance: 50,
|
|
400
405
|
defaultLineMarker: {
|
|
@@ -438,7 +443,7 @@ const me = (s, o) => {
|
|
|
438
443
|
},
|
|
439
444
|
creatingNodePlot: !1,
|
|
440
445
|
showTemplateNode: !0,
|
|
441
|
-
newNodeTemplate:
|
|
446
|
+
newNodeTemplate: Se(JSON.parse(JSON.stringify(qe)), {}),
|
|
442
447
|
creatingLinePlot: !1,
|
|
443
448
|
newLineTemplate: {
|
|
444
449
|
from: "newRelationTemplate-from",
|
|
@@ -547,29 +552,29 @@ const me = (s, o) => {
|
|
|
547
552
|
} else
|
|
548
553
|
o[t] = n;
|
|
549
554
|
}), o;
|
|
550
|
-
},
|
|
555
|
+
}, Je = (s, o) => {
|
|
551
556
|
x("applyDefaultOptionsByLayout", s.layoutName, o);
|
|
552
557
|
const e = s.layoutName || "";
|
|
553
|
-
e === "center" || e.includes("tree") && (s.from === "top" || s.from, s.from === "left" || s.from)
|
|
554
|
-
},
|
|
558
|
+
e === "center" || e.includes("tree") && (s.from === "top" || s.from, s.from === "left" || s.from);
|
|
559
|
+
}, Ze = (s) => {
|
|
555
560
|
const o = s.layoutName || "";
|
|
556
561
|
if (o === "center") {
|
|
557
562
|
const e = s;
|
|
558
|
-
e.layoutDirection
|
|
563
|
+
e.layoutDirection = void 0;
|
|
559
564
|
} else if (o.includes("tree")) {
|
|
560
565
|
const e = s;
|
|
561
|
-
e.
|
|
566
|
+
e.from === void 0 && (e.from = "left"), e.levelGaps === void 0 && (e.levelGaps = []), (e.from === "top" || e.from === "bottom") && (e.layoutDirection === void 0 && (e.layoutDirection = "v"), x("set layoutDirection=v"), x("set defaultJunctionPoint=tb")), (e.from === "left" || e.from === "right") && (e.layoutDirection === void 0 && (e.layoutDirection = "h"), x("set defaultJunctionPoint=lr"));
|
|
562
567
|
} else
|
|
563
568
|
(o === "fixed" || o === "force") && (s.layoutDirection = void 0);
|
|
564
569
|
s.supportAutoLayout = !1, s.autoLayouting = !1;
|
|
565
570
|
}, Qt = {
|
|
566
571
|
createDefaultConfig: Me,
|
|
567
|
-
applyDefaultOptionsByLayout:
|
|
572
|
+
applyDefaultOptionsByLayout: Je
|
|
568
573
|
}, Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
569
574
|
__proto__: null,
|
|
570
575
|
createDefaultConfig: Me,
|
|
571
|
-
applyDefaultOptionsByLayout:
|
|
572
|
-
appendDefaultOptions4Layout:
|
|
576
|
+
applyDefaultOptionsByLayout: Je,
|
|
577
|
+
appendDefaultOptions4Layout: Ze,
|
|
573
578
|
default: Qt
|
|
574
579
|
}, Symbol.toStringTag, { value: "Module" })), Be = Xe(null), en = Xe(null), dt = Xe(0), ue = Xe({
|
|
575
580
|
shouldRenderLines: [],
|
|
@@ -578,25 +583,25 @@ const me = (s, o) => {
|
|
|
578
583
|
options: Me({})
|
|
579
584
|
});
|
|
580
585
|
function $() {
|
|
581
|
-
const s =
|
|
586
|
+
const s = se(Be);
|
|
582
587
|
if (!s)
|
|
583
588
|
throw new Error("'useGraphInstance' must be used within 'RGProvider'");
|
|
584
589
|
return s;
|
|
585
590
|
}
|
|
586
|
-
function
|
|
587
|
-
const s =
|
|
591
|
+
function ce() {
|
|
592
|
+
const s = se(dt);
|
|
588
593
|
if (s === void 0)
|
|
589
594
|
throw new Error("'useAutoUpdateView' must be used within 'RGProvider'");
|
|
590
595
|
return s;
|
|
591
596
|
}
|
|
592
|
-
function
|
|
593
|
-
const s =
|
|
597
|
+
function J() {
|
|
598
|
+
const s = se(ue);
|
|
594
599
|
if (s === void 0)
|
|
595
600
|
throw new Error("'useGraphStore' must be used within 'RGProvider'");
|
|
596
601
|
return s;
|
|
597
602
|
}
|
|
598
603
|
function tn() {
|
|
599
|
-
const s =
|
|
604
|
+
const s = se(ue);
|
|
600
605
|
if (s === void 0)
|
|
601
606
|
throw new Error("'useCreatingLine' must be used within 'RGProvider'");
|
|
602
607
|
const o = $();
|
|
@@ -619,7 +624,7 @@ function tn() {
|
|
|
619
624
|
]);
|
|
620
625
|
}
|
|
621
626
|
function nn() {
|
|
622
|
-
const s =
|
|
627
|
+
const s = se(ue);
|
|
623
628
|
if (s === void 0)
|
|
624
629
|
throw new Error("'useCreatingLine' must be used within 'RGProvider'");
|
|
625
630
|
return K(() => !s.options || !s.options.creatingNodePlot ? {
|
|
@@ -633,25 +638,25 @@ function nn() {
|
|
|
633
638
|
]);
|
|
634
639
|
}
|
|
635
640
|
function on() {
|
|
636
|
-
const s =
|
|
641
|
+
const s = se(ue);
|
|
637
642
|
if (s === void 0)
|
|
638
643
|
throw new Error("'useEditingNodes' must be used within 'RGProvider'");
|
|
639
644
|
return K(() => s.options.editingController, [s.options.editingController]);
|
|
640
645
|
}
|
|
641
646
|
function sn() {
|
|
642
|
-
const s =
|
|
647
|
+
const s = se(ue);
|
|
643
648
|
if (s === void 0)
|
|
644
649
|
throw new Error("'useEditingLine' must be used within 'RGProvider'");
|
|
645
650
|
return K(() => s.options.editingLineController, [s.options.editingLineController]);
|
|
646
651
|
}
|
|
647
652
|
function an() {
|
|
648
|
-
const s =
|
|
653
|
+
const s = se(ue);
|
|
649
654
|
if (s === void 0)
|
|
650
655
|
throw new Error("'useConnectingNode' must be used within 'RGProvider'");
|
|
651
656
|
return K(() => s.options.nodeConnectController, [s.options.nodeConnectController]);
|
|
652
657
|
}
|
|
653
658
|
function rn() {
|
|
654
|
-
const s =
|
|
659
|
+
const s = se(ue);
|
|
655
660
|
if (s === void 0)
|
|
656
661
|
throw new Error("'useViewInformation' must be used within 'RGProvider'");
|
|
657
662
|
return K(() => {
|
|
@@ -667,7 +672,7 @@ function rn() {
|
|
|
667
672
|
]);
|
|
668
673
|
}
|
|
669
674
|
function ln() {
|
|
670
|
-
const s =
|
|
675
|
+
const s = se(ue);
|
|
671
676
|
if (s === void 0)
|
|
672
677
|
throw new Error("'useSelection' must be used within 'RGProvider'");
|
|
673
678
|
return K(() => ({
|
|
@@ -679,7 +684,7 @@ function ln() {
|
|
|
679
684
|
]);
|
|
680
685
|
}
|
|
681
686
|
function dn() {
|
|
682
|
-
const s =
|
|
687
|
+
const s = se(ue);
|
|
683
688
|
if (s === void 0)
|
|
684
689
|
throw new Error("'useCheckedItem' must be used within 'RGProvider'");
|
|
685
690
|
return K(() => ({
|
|
@@ -693,9 +698,9 @@ function dn() {
|
|
|
693
698
|
]);
|
|
694
699
|
}
|
|
695
700
|
const ct = ({ forElementLines: s }) => {
|
|
696
|
-
const { options: o } =
|
|
701
|
+
const { options: o } = J();
|
|
697
702
|
return /* @__PURE__ */ H("defs", { children: [
|
|
698
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ w(
|
|
699
704
|
"marker",
|
|
700
705
|
{
|
|
701
706
|
id: `${o.instanceId}-arrow-default`,
|
|
@@ -706,7 +711,7 @@ const ct = ({ forElementLines: s }) => {
|
|
|
706
711
|
markerUnits: "userSpaceOnUse",
|
|
707
712
|
orient: "auto",
|
|
708
713
|
viewBox: o.defaultLineMarker.viewBox,
|
|
709
|
-
children: /* @__PURE__ */
|
|
714
|
+
children: /* @__PURE__ */ w(
|
|
710
715
|
"path",
|
|
711
716
|
{
|
|
712
717
|
style: { fill: "context-stroke" },
|
|
@@ -715,7 +720,7 @@ const ct = ({ forElementLines: s }) => {
|
|
|
715
720
|
)
|
|
716
721
|
}
|
|
717
722
|
),
|
|
718
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ w(
|
|
719
724
|
"marker",
|
|
720
725
|
{
|
|
721
726
|
id: `${o.instanceId}-start-arrow-default`,
|
|
@@ -726,7 +731,7 @@ const ct = ({ forElementLines: s }) => {
|
|
|
726
731
|
markerUnits: "userSpaceOnUse",
|
|
727
732
|
orient: "auto-start-reverse",
|
|
728
733
|
viewBox: o.defaultLineMarker.viewBox,
|
|
729
|
-
children: /* @__PURE__ */
|
|
734
|
+
children: /* @__PURE__ */ w(
|
|
730
735
|
"path",
|
|
731
736
|
{
|
|
732
737
|
style: { fill: "context-stroke" },
|
|
@@ -744,15 +749,15 @@ const ct = ({ forElementLines: s }) => {
|
|
|
744
749
|
if (!n)
|
|
745
750
|
return null;
|
|
746
751
|
const i = o.line, a = i.selected;
|
|
747
|
-
return Gt(/* @__PURE__ */
|
|
752
|
+
return Gt(/* @__PURE__ */ w(
|
|
748
753
|
"div",
|
|
749
754
|
{
|
|
750
755
|
className: [
|
|
751
756
|
"rg-line-peel",
|
|
752
757
|
i.className,
|
|
753
|
-
e && "rg-line-
|
|
754
|
-
(i.disablePointEvent || i.opacity === 0) && "rg-line-
|
|
755
|
-
a && "rg-line-
|
|
758
|
+
e && "rg-line-checked",
|
|
759
|
+
(i.disablePointEvent || i.opacity === 0) && "rg-line-disable-events",
|
|
760
|
+
a && "rg-line-selected"
|
|
756
761
|
].filter(Boolean).join(" "),
|
|
757
762
|
"data-id": i.id,
|
|
758
763
|
style: {
|
|
@@ -765,30 +770,30 @@ const ct = ({ forElementLines: s }) => {
|
|
|
765
770
|
children: s
|
|
766
771
|
}
|
|
767
772
|
), n);
|
|
768
|
-
}, ut = ({ lineConfig: s, linePathInfo: o,
|
|
769
|
-
const
|
|
773
|
+
}, ut = ({ lineConfig: s, linePathInfo: o, useTextOnPath: e, checked: t, graphInstanceId: n, onLineClick: i, children: a }) => {
|
|
774
|
+
const r = $(), l = s.line, c = l.selected, d = r.getArrowMarkerId(l, !0), h = r.getArrowMarkerId(l, !1), f = l.lineWidth ? l.lineWidth + "px" : void 0, y = e ? r.generateLineTextStyle4TextOnPath(s) : null, u = n + "-" + l.id;
|
|
770
775
|
return /* @__PURE__ */ H(
|
|
771
776
|
"g",
|
|
772
777
|
{
|
|
773
778
|
className: [
|
|
774
779
|
"rg-line-peel",
|
|
775
|
-
|
|
776
|
-
t && "rg-line-
|
|
777
|
-
|
|
778
|
-
(
|
|
780
|
+
l.className,
|
|
781
|
+
t && "rg-line-checked",
|
|
782
|
+
c && "rg-line-selected",
|
|
783
|
+
(l.disablePointEvent || l.opacity === 0) && "rg-line-disable-events"
|
|
779
784
|
].filter(Boolean).join(" "),
|
|
780
|
-
"data-id":
|
|
785
|
+
"data-id": l.id,
|
|
781
786
|
style: {
|
|
782
|
-
"--rg-line-width":
|
|
783
|
-
"--rg-line-color":
|
|
784
|
-
"--rg-line-opacity":
|
|
785
|
-
"--rg-line-fontcolor":
|
|
786
|
-
"--rg-line-marker-end":
|
|
787
|
-
"--rg-line-marker-start":
|
|
788
|
-
...
|
|
787
|
+
"--rg-line-width": f,
|
|
788
|
+
"--rg-line-color": l.color,
|
|
789
|
+
"--rg-line-opacity": l.opacity,
|
|
790
|
+
"--rg-line-fontcolor": l.fontColor,
|
|
791
|
+
"--rg-line-marker-end": h,
|
|
792
|
+
"--rg-line-marker-start": d,
|
|
793
|
+
...l.cssVars || {}
|
|
789
794
|
},
|
|
790
795
|
children: [
|
|
791
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ w(
|
|
792
797
|
"path",
|
|
793
798
|
{
|
|
794
799
|
d: o.pathData,
|
|
@@ -797,26 +802,27 @@ const ct = ({ forElementLines: s }) => {
|
|
|
797
802
|
onClick: i
|
|
798
803
|
}
|
|
799
804
|
),
|
|
800
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ w(
|
|
801
806
|
"path",
|
|
802
807
|
{
|
|
803
808
|
id: u,
|
|
804
809
|
d: o.pathData,
|
|
805
810
|
className: [
|
|
806
811
|
"rg-line",
|
|
807
|
-
|
|
808
|
-
|
|
812
|
+
l.dashType ? "rg-line-dashtype-" + l.dashType : void 0,
|
|
813
|
+
l.animation ? "rg-line-anm-" + l.animation : void 0
|
|
809
814
|
].filter(Boolean).join(" ")
|
|
810
815
|
}
|
|
811
816
|
),
|
|
812
|
-
y && /* @__PURE__ */
|
|
817
|
+
y && /* @__PURE__ */ w("g", { children: /* @__PURE__ */ w(
|
|
813
818
|
"text",
|
|
814
819
|
{
|
|
815
820
|
className: "rg-line-text rg-line-text-on-path",
|
|
816
|
-
|
|
821
|
+
dx: y.textOffset.x + "px",
|
|
822
|
+
dy: y.textOffset.y + "px",
|
|
817
823
|
onTouchStart: i,
|
|
818
824
|
onClick: i,
|
|
819
|
-
children: /* @__PURE__ */
|
|
825
|
+
children: /* @__PURE__ */ w(
|
|
820
826
|
"textPath",
|
|
821
827
|
{
|
|
822
828
|
xlinkHref: `#${u}`,
|
|
@@ -828,47 +834,48 @@ const ct = ({ forElementLines: s }) => {
|
|
|
828
834
|
}
|
|
829
835
|
)
|
|
830
836
|
}
|
|
831
|
-
) })
|
|
837
|
+
) }),
|
|
838
|
+
a
|
|
832
839
|
]
|
|
833
840
|
}
|
|
834
841
|
);
|
|
835
842
|
}, ft = ({
|
|
836
843
|
lineConfig: s,
|
|
837
|
-
|
|
844
|
+
defaultLineTextOnPath: o,
|
|
838
845
|
graphInstanceId: e,
|
|
839
846
|
checked: t
|
|
840
847
|
}) => {
|
|
841
|
-
const n = $(), i = K(() => n.generateLinePath(s), [s]), a = (
|
|
842
|
-
|
|
843
|
-
}, r =
|
|
844
|
-
return /* @__PURE__ */ H(
|
|
845
|
-
/* @__PURE__ */
|
|
848
|
+
const n = $(), i = K(() => n.generateLinePath(s), [s]), a = (h) => {
|
|
849
|
+
n.onLineClick(s.line, h.nativeEvent);
|
|
850
|
+
}, r = s.line.useTextOnPath || o, l = r && s.line.lineShape !== F.StandardStraight, c = !l, d = n.generateLineTextStyle(s, i);
|
|
851
|
+
return /* @__PURE__ */ H(le, { children: [
|
|
852
|
+
/* @__PURE__ */ w(
|
|
846
853
|
ut,
|
|
847
854
|
{
|
|
848
855
|
lineConfig: s,
|
|
849
856
|
linePathInfo: i,
|
|
850
857
|
onLineClick: a,
|
|
851
|
-
|
|
858
|
+
useTextOnPath: l,
|
|
852
859
|
checked: t,
|
|
853
860
|
graphInstanceId: e
|
|
854
861
|
}
|
|
855
862
|
),
|
|
856
|
-
s.line.text &&
|
|
863
|
+
s.line.text && c && /* @__PURE__ */ w(
|
|
857
864
|
ht,
|
|
858
865
|
{
|
|
859
866
|
lineConfig: s,
|
|
860
867
|
linePathInfo: i,
|
|
861
868
|
checked: t,
|
|
862
|
-
children: /* @__PURE__ */
|
|
869
|
+
children: /* @__PURE__ */ w(
|
|
863
870
|
"div",
|
|
864
871
|
{
|
|
865
|
-
className: "rg-line-label"
|
|
872
|
+
className: `rg-line-label ${r ? "rg-line-label-on-path" : ""}`,
|
|
866
873
|
style: {
|
|
867
|
-
...
|
|
874
|
+
...d.cssStyles
|
|
868
875
|
},
|
|
869
876
|
onTouchStart: a,
|
|
870
877
|
onClick: a,
|
|
871
|
-
children:
|
|
878
|
+
children: d.text
|
|
872
879
|
}
|
|
873
880
|
)
|
|
874
881
|
}
|
|
@@ -876,19 +883,19 @@ const ct = ({ forElementLines: s }) => {
|
|
|
876
883
|
] });
|
|
877
884
|
}, gt = ({
|
|
878
885
|
line: s,
|
|
879
|
-
|
|
886
|
+
defaultLineTextOnPath: o,
|
|
880
887
|
graphInstanceId: e,
|
|
881
888
|
checked: t,
|
|
882
889
|
lineSlot: n
|
|
883
890
|
}) => {
|
|
884
891
|
const i = $();
|
|
885
|
-
|
|
892
|
+
ce();
|
|
886
893
|
const a = s.isFakeLine ? i.generateFakeLineConfig(s) : i.generateLineConfig(s);
|
|
887
|
-
return /* @__PURE__ */
|
|
894
|
+
return /* @__PURE__ */ w(le, { children: a && (n ? n({ lineConfig: a, defaultLineTextOnPath: o, graphInstanceId: e, checked: t }) : /* @__PURE__ */ w(
|
|
888
895
|
ft,
|
|
889
896
|
{
|
|
890
897
|
lineConfig: a,
|
|
891
|
-
|
|
898
|
+
defaultLineTextOnPath: o,
|
|
892
899
|
graphInstanceId: e,
|
|
893
900
|
checked: t
|
|
894
901
|
}
|
|
@@ -896,20 +903,20 @@ const ct = ({ forElementLines: s }) => {
|
|
|
896
903
|
}, pt = ({
|
|
897
904
|
showEasyView: s,
|
|
898
905
|
lineSlot: o,
|
|
899
|
-
|
|
906
|
+
defaultLineTextOnPath: e,
|
|
900
907
|
checkedLineId: t,
|
|
901
908
|
graphInstanceId: n,
|
|
902
909
|
allLineConfigList: i
|
|
903
910
|
}) => /* @__PURE__ */ H("div", { className: "rg-lines-container rg-lines-container-normal-lines", children: [
|
|
904
911
|
/* @__PURE__ */ H("svg", { className: "rg-lines-svg", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
905
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ w(ct, {}),
|
|
906
913
|
!s && i.map(
|
|
907
|
-
(a) => a.hidden !== !0 && /* @__PURE__ */
|
|
914
|
+
(a) => a.hidden !== !0 && /* @__PURE__ */ w(
|
|
908
915
|
gt,
|
|
909
916
|
{
|
|
910
917
|
line: a,
|
|
911
918
|
lineSlot: o,
|
|
912
|
-
|
|
919
|
+
defaultLineTextOnPath: e,
|
|
913
920
|
checked: a.id === t,
|
|
914
921
|
graphInstanceId: n
|
|
915
922
|
},
|
|
@@ -917,16 +924,16 @@ const ct = ({ forElementLines: s }) => {
|
|
|
917
924
|
)
|
|
918
925
|
)
|
|
919
926
|
] }),
|
|
920
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ w("div", { className: "rg-linetext-container" })
|
|
921
928
|
] });
|
|
922
|
-
|
|
929
|
+
Ce.memo(pt, (s, o) => s.allLineConfigList !== o.allLineConfigList || s.graphInstanceId !== o.graphInstanceId || s.checkedLineId !== o.checkedLineId || s.lineSlot !== o.lineSlot ? !1 : s.defaultLineTextOnPath === o.defaultLineTextOnPath);
|
|
923
930
|
const yt = ({ node: s, expandOrCollapseNode: o, expandHolderPosition: e }) => {
|
|
924
931
|
const t = s.expanded === !1 ? "c-expanded" : "c-collapsed";
|
|
925
|
-
return /* @__PURE__ */
|
|
932
|
+
return /* @__PURE__ */ w(
|
|
926
933
|
"div",
|
|
927
934
|
{
|
|
928
935
|
className: `rg-node-expand-holder c-expand-positon-${e}`,
|
|
929
|
-
children: /* @__PURE__ */
|
|
936
|
+
children: /* @__PURE__ */ w(
|
|
930
937
|
"span",
|
|
931
938
|
{
|
|
932
939
|
className: t,
|
|
@@ -945,7 +952,7 @@ const yt = ({ node: s, expandOrCollapseNode: o, expandHolderPosition: e }) => {
|
|
|
945
952
|
checked: i
|
|
946
953
|
}) => {
|
|
947
954
|
const a = $(), r = ee();
|
|
948
|
-
|
|
955
|
+
q(() => (a.addNodeResizeListener(r.current, s), () => {
|
|
949
956
|
r.current && a.removeNodeResizeListener(r.current);
|
|
950
957
|
}), []);
|
|
951
958
|
const l = async (v) => {
|
|
@@ -988,7 +995,7 @@ const yt = ({ node: s, expandOrCollapseNode: o, expandHolderPosition: e }) => {
|
|
|
988
995
|
node: s,
|
|
989
996
|
expandOrCollapseNode: l,
|
|
990
997
|
expandHolderPosition: m
|
|
991
|
-
}) : /* @__PURE__ */
|
|
998
|
+
}) : /* @__PURE__ */ w(
|
|
992
999
|
yt,
|
|
993
1000
|
{
|
|
994
1001
|
node: s,
|
|
@@ -996,7 +1003,7 @@ const yt = ({ node: s, expandOrCollapseNode: o, expandHolderPosition: e }) => {
|
|
|
996
1003
|
expandHolderPosition: m
|
|
997
1004
|
}
|
|
998
1005
|
)),
|
|
999
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ w(
|
|
1000
1007
|
"div",
|
|
1001
1008
|
{
|
|
1002
1009
|
className: "rg-node",
|
|
@@ -1006,11 +1013,11 @@ const yt = ({ node: s, expandOrCollapseNode: o, expandHolderPosition: e }) => {
|
|
|
1006
1013
|
onTouchStart: (v) => {
|
|
1007
1014
|
c(v);
|
|
1008
1015
|
},
|
|
1009
|
-
children: o ? o({ node: s, defaultExpandHolderPosition: t, checked: i, dragging: n }) : /* @__PURE__ */
|
|
1016
|
+
children: o ? o({ node: s, defaultExpandHolderPosition: t, checked: i, dragging: n }) : /* @__PURE__ */ w(
|
|
1010
1017
|
"div",
|
|
1011
1018
|
{
|
|
1012
1019
|
className: "rg-node-text",
|
|
1013
|
-
children: /* @__PURE__ */
|
|
1020
|
+
children: /* @__PURE__ */ w("span", { children: s.text })
|
|
1014
1021
|
}
|
|
1015
1022
|
)
|
|
1016
1023
|
}
|
|
@@ -1025,8 +1032,8 @@ const yt = ({ node: s, expandOrCollapseNode: o, expandHolderPosition: e }) => {
|
|
|
1025
1032
|
draggingNodeId: t,
|
|
1026
1033
|
checkedNodeId: n,
|
|
1027
1034
|
allNodeConfigList: i
|
|
1028
|
-
}) => /* @__PURE__ */
|
|
1029
|
-
(a) => /* @__PURE__ */
|
|
1035
|
+
}) => /* @__PURE__ */ w("div", { className: "rg-nodes-container", children: i.map(
|
|
1036
|
+
(a) => /* @__PURE__ */ w(
|
|
1030
1037
|
mt,
|
|
1031
1038
|
{
|
|
1032
1039
|
nodeProps: a,
|
|
@@ -1039,31 +1046,31 @@ const yt = ({ node: s, expandOrCollapseNode: o, expandHolderPosition: e }) => {
|
|
|
1039
1046
|
a.id
|
|
1040
1047
|
)
|
|
1041
1048
|
) });
|
|
1042
|
-
|
|
1049
|
+
Ce.memo(vt, (s, o) => s.allNodeConfigList !== o.allNodeConfigList || s.draggingNodeId !== o.draggingNodeId || s.checkedNodeId !== o.checkedNodeId || s.nodeSlot !== o.nodeSlot || s.nodeExpandButtonSlot !== o.nodeExpandButtonSlot ? !1 : s.defaultExpandHolderPosition === o.defaultExpandHolderPosition);
|
|
1043
1050
|
const cn = ({
|
|
1044
1051
|
showEasyView: s,
|
|
1045
1052
|
lineSlot: o,
|
|
1046
|
-
|
|
1053
|
+
defaultLineTextOnPath: e,
|
|
1047
1054
|
checkedLineId: t,
|
|
1048
1055
|
graphInstanceId: n
|
|
1049
1056
|
}) => {
|
|
1050
|
-
const i = $(), { shouldRenderFakeLines: a } =
|
|
1057
|
+
const i = $(), { shouldRenderFakeLines: a } = J(), r = s ? [] : i.getShouldRenderFakeLines(a);
|
|
1051
1058
|
return /* @__PURE__ */ H("div", { className: "rg-lines-container rg-lines-container-el-lines", children: [
|
|
1052
|
-
/* @__PURE__ */
|
|
1059
|
+
/* @__PURE__ */ w("div", { className: "rg-linetext-container" }),
|
|
1053
1060
|
/* @__PURE__ */ H(
|
|
1054
1061
|
"svg",
|
|
1055
1062
|
{
|
|
1056
1063
|
className: "rg-lines-svg rg-lines-svg-el-lines",
|
|
1057
1064
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1058
1065
|
children: [
|
|
1059
|
-
/* @__PURE__ */
|
|
1066
|
+
/* @__PURE__ */ w(ct, { forElementLines: !0 }),
|
|
1060
1067
|
!s && r.map(
|
|
1061
|
-
(l) => l.hidden !== !0 && /* @__PURE__ */
|
|
1068
|
+
(l) => l.hidden !== !0 && /* @__PURE__ */ w(
|
|
1062
1069
|
gt,
|
|
1063
1070
|
{
|
|
1064
1071
|
line: l,
|
|
1065
1072
|
lineSlot: o,
|
|
1066
|
-
|
|
1073
|
+
defaultLineTextOnPath: e,
|
|
1067
1074
|
checked: l.id === t,
|
|
1068
1075
|
graphInstanceId: n
|
|
1069
1076
|
},
|
|
@@ -1076,22 +1083,22 @@ const cn = ({
|
|
|
1076
1083
|
] });
|
|
1077
1084
|
}, hn = ({
|
|
1078
1085
|
lineSlot: s,
|
|
1079
|
-
|
|
1086
|
+
defaultLineTextOnPath: o,
|
|
1080
1087
|
graphInstanceId: e
|
|
1081
1088
|
}) => {
|
|
1082
|
-
const t = $(), { options: n } =
|
|
1089
|
+
const t = $(), { options: n } = J(), i = t.generateCreatingLineConfig(n);
|
|
1083
1090
|
return /* @__PURE__ */ H("div", { className: "rg-lines-container rg-lines-container-el-lines", children: [
|
|
1084
|
-
/* @__PURE__ */
|
|
1085
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ w("div", { className: "rg-linetext-container" }),
|
|
1092
|
+
/* @__PURE__ */ w(
|
|
1086
1093
|
"svg",
|
|
1087
1094
|
{
|
|
1088
1095
|
className: "rg-lines-svg rg-lines-svg-el-lines",
|
|
1089
1096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1090
|
-
children: s ? s({ lineConfig: i }) : /* @__PURE__ */
|
|
1097
|
+
children: s ? s({ lineConfig: i }) : /* @__PURE__ */ w(
|
|
1091
1098
|
ft,
|
|
1092
1099
|
{
|
|
1093
1100
|
lineConfig: i,
|
|
1094
|
-
|
|
1101
|
+
defaultLineTextOnPath: o,
|
|
1095
1102
|
graphInstanceId: e
|
|
1096
1103
|
}
|
|
1097
1104
|
)
|
|
@@ -1109,9 +1116,9 @@ const cn = ({
|
|
|
1109
1116
|
checkedNodeId: r,
|
|
1110
1117
|
checkedLineId: l,
|
|
1111
1118
|
graphInstanceId: c,
|
|
1112
|
-
|
|
1119
|
+
defaultLineTextOnPath: d
|
|
1113
1120
|
}) => {
|
|
1114
|
-
const h = $(), { shouldRenderNodes: f, shouldRenderLines: y } =
|
|
1121
|
+
const h = $(), { shouldRenderNodes: f, shouldRenderLines: y } = J(), u = K(
|
|
1115
1122
|
() => t ? [] : h.getShouldRenderNodes(f),
|
|
1116
1123
|
[h, f, t]
|
|
1117
1124
|
), g = K(
|
|
@@ -1119,18 +1126,18 @@ const cn = ({
|
|
|
1119
1126
|
[h, y, t]
|
|
1120
1127
|
);
|
|
1121
1128
|
return /* @__PURE__ */ H("div", { className: "rg-single-graph", children: [
|
|
1122
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ w(
|
|
1123
1130
|
pt,
|
|
1124
1131
|
{
|
|
1125
1132
|
graphInstanceId: c,
|
|
1126
1133
|
showEasyView: t,
|
|
1127
|
-
|
|
1134
|
+
defaultLineTextOnPath: d,
|
|
1128
1135
|
checkedLineId: l,
|
|
1129
1136
|
lineSlot: o,
|
|
1130
1137
|
allLineConfigList: g
|
|
1131
1138
|
}
|
|
1132
1139
|
),
|
|
1133
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ w("div", { className: "rg-nodes-container-wrapper", children: !t && /* @__PURE__ */ w(
|
|
1134
1141
|
vt,
|
|
1135
1142
|
{
|
|
1136
1143
|
defaultExpandHolderPosition: i,
|
|
@@ -1141,40 +1148,40 @@ const cn = ({
|
|
|
1141
1148
|
allNodeConfigList: u
|
|
1142
1149
|
}
|
|
1143
1150
|
) }),
|
|
1144
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ w(
|
|
1145
1152
|
cn,
|
|
1146
1153
|
{
|
|
1147
1154
|
graphInstanceId: c,
|
|
1148
1155
|
showEasyView: t,
|
|
1149
|
-
|
|
1156
|
+
defaultLineTextOnPath: d,
|
|
1150
1157
|
checkedLineId: l,
|
|
1151
1158
|
lineSlot: o
|
|
1152
1159
|
}
|
|
1153
1160
|
),
|
|
1154
|
-
n && /* @__PURE__ */
|
|
1161
|
+
n && /* @__PURE__ */ w(
|
|
1155
1162
|
hn,
|
|
1156
1163
|
{
|
|
1157
|
-
|
|
1164
|
+
defaultLineTextOnPath: d,
|
|
1158
1165
|
checkedLineId: l,
|
|
1159
1166
|
lineSlot: o
|
|
1160
1167
|
}
|
|
1161
1168
|
)
|
|
1162
1169
|
] });
|
|
1163
1170
|
}, fn = (s) => {
|
|
1164
|
-
const o = $(), { options: e } =
|
|
1165
|
-
return
|
|
1171
|
+
const o = $(), { options: e } = J(), t = ee();
|
|
1172
|
+
return q(() => (x("[RGEasyView mounted]"), o.setEasyViewCanvas(t.current), () => {
|
|
1166
1173
|
x("[RGEasyView UnMounted]");
|
|
1167
|
-
}), []), /* @__PURE__ */
|
|
1174
|
+
}), []), /* @__PURE__ */ w("div", { className: `rg-easy-view ${e.showEasyView ? "rg-easy-view-active" : ""}`, children: /* @__PURE__ */ w("canvas", { ref: t }) });
|
|
1168
1175
|
}, gn = (s) => {
|
|
1169
|
-
const o = $(), { options: e } =
|
|
1170
|
-
|
|
1176
|
+
const o = $(), { options: e } = J();
|
|
1177
|
+
ce();
|
|
1171
1178
|
const t = ee(), n = ee(), i = K(() => e.canvasSize, [e.canvasSize]), a = K(() => e.canvasOffset, [e.canvasOffset]), r = K(() => e.canvasZoom / 100, [e.canvasZoom]), l = {
|
|
1172
1179
|
width: `${i.width}px`,
|
|
1173
1180
|
height: `${i.height}px`,
|
|
1174
1181
|
backgroundColor: "transparent",
|
|
1175
1182
|
transform: `translate(${a.x}px, ${a.y}px) scale(${r},${r})`
|
|
1176
1183
|
};
|
|
1177
|
-
|
|
1184
|
+
q(() => (x("[RGCanvas mounted]"), o.setCanvasDom(t.current), () => {
|
|
1178
1185
|
x("[RGCanvas UnMounted]");
|
|
1179
1186
|
}), []);
|
|
1180
1187
|
const c = (h) => {
|
|
@@ -1200,15 +1207,15 @@ const cn = ({
|
|
|
1200
1207
|
c(h);
|
|
1201
1208
|
},
|
|
1202
1209
|
children: [
|
|
1203
|
-
/* @__PURE__ */
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ w(fn, {}),
|
|
1211
|
+
/* @__PURE__ */ w("div", { style: l, className: "rg-map-canvas rg-canvas-behind", children: /* @__PURE__ */ w("div", { className: "rg-canvas-slot rg-canvas-slot-behind", children: s.canvasPlugSlot && (typeof s.canvasPlugSlot == "function" ? /* @__PURE__ */ w(s.canvasPlugSlot, {}) : s.canvasPlugSlot) }) }),
|
|
1212
|
+
/* @__PURE__ */ w(
|
|
1206
1213
|
"div",
|
|
1207
1214
|
{
|
|
1208
1215
|
ref: t,
|
|
1209
1216
|
style: l,
|
|
1210
1217
|
className: "rg-map-canvas",
|
|
1211
|
-
children: /* @__PURE__ */
|
|
1218
|
+
children: /* @__PURE__ */ w(
|
|
1212
1219
|
un,
|
|
1213
1220
|
{
|
|
1214
1221
|
nodeSlot: s.nodeSlot,
|
|
@@ -1219,14 +1226,14 @@ const cn = ({
|
|
|
1219
1226
|
defaultExpandHolderPosition: e.defaultExpandHolderPosition,
|
|
1220
1227
|
draggingNodeId: e.draggingNodeId,
|
|
1221
1228
|
checkedNodeId: e.checkedNodeId,
|
|
1222
|
-
|
|
1229
|
+
defaultLineTextOnPath: e.defaultLineTextOnPath,
|
|
1223
1230
|
checkedLineId: e.checkedLineId,
|
|
1224
1231
|
graphInstanceId: e.instanceId
|
|
1225
1232
|
}
|
|
1226
1233
|
)
|
|
1227
1234
|
}
|
|
1228
1235
|
),
|
|
1229
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ w("div", { style: l, className: "rg-map-canvas rg-canvas-above", children: /* @__PURE__ */ w("div", { className: "rg-canvas-slot rg-canvas-slot-above", children: s.canvasPlugAboveSlot }) })
|
|
1230
1237
|
]
|
|
1231
1238
|
}
|
|
1232
1239
|
);
|
|
@@ -1234,11 +1241,11 @@ const cn = ({
|
|
|
1234
1241
|
const s = $(), o = (s == null ? void 0 : s.options.canvasMoveMode) || !1, e = (t) => {
|
|
1235
1242
|
s && s.startMoveCanvas(t.nativeEvent, !0);
|
|
1236
1243
|
};
|
|
1237
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ w(
|
|
1238
1245
|
"div",
|
|
1239
1246
|
{
|
|
1240
1247
|
className: `rg-move-operator ${o ? "rg-move-operator-active" : ""}`,
|
|
1241
|
-
children: /* @__PURE__ */
|
|
1248
|
+
children: /* @__PURE__ */ w(
|
|
1242
1249
|
"div",
|
|
1243
1250
|
{
|
|
1244
1251
|
className: "rg-move-touchpad",
|
|
@@ -1324,9 +1331,9 @@ const cn = ({
|
|
|
1324
1331
|
|
|
1325
1332
|
`
|
|
1326
1333
|
}
|
|
1327
|
-
},
|
|
1334
|
+
}, re = ({ iconName: s, className: o }) => {
|
|
1328
1335
|
const e = yn[s];
|
|
1329
|
-
return /* @__PURE__ */
|
|
1336
|
+
return /* @__PURE__ */ w(
|
|
1330
1337
|
"svg",
|
|
1331
1338
|
{
|
|
1332
1339
|
className: `rg-icon ${o || ""}`,
|
|
@@ -1337,10 +1344,10 @@ const cn = ({
|
|
|
1337
1344
|
}
|
|
1338
1345
|
);
|
|
1339
1346
|
}, mn = () => {
|
|
1340
|
-
const s = $(), { options: o } =
|
|
1347
|
+
const s = $(), { options: o } = J(), e = (t) => {
|
|
1341
1348
|
s.clearLoading();
|
|
1342
1349
|
};
|
|
1343
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ w(le, { children: o && /* @__PURE__ */ w(
|
|
1344
1351
|
"div",
|
|
1345
1352
|
{
|
|
1346
1353
|
className: `rg-graph-loading ${o.graphLoading ? "" : "rg-graph-loading-hide"}`,
|
|
@@ -1348,24 +1355,24 @@ const cn = ({
|
|
|
1348
1355
|
e();
|
|
1349
1356
|
},
|
|
1350
1357
|
children: /* @__PURE__ */ H("div", { className: "rg-graph-loading-message", children: [
|
|
1351
|
-
/* @__PURE__ */
|
|
1358
|
+
/* @__PURE__ */ w(re, { iconName: "icon-lianjiezhong", className: "rg-graph-loading-icon" }),
|
|
1352
1359
|
"Loading..."
|
|
1353
1360
|
] })
|
|
1354
1361
|
}
|
|
1355
1362
|
) });
|
|
1356
1363
|
}, vn = ({ nodeSlot: s }) => {
|
|
1357
1364
|
$();
|
|
1358
|
-
const { options: o } =
|
|
1365
|
+
const { options: o } = J();
|
|
1359
1366
|
return o && /* @__PURE__ */ H("div", { className: "rg-operate", children: [
|
|
1360
1367
|
/* @__PURE__ */ H("div", { className: "rg-creating-container", children: [
|
|
1361
|
-
o.creatingNodePlot && o.showTemplateNode && /* @__PURE__ */
|
|
1368
|
+
o.creatingNodePlot && o.showTemplateNode && /* @__PURE__ */ w(
|
|
1362
1369
|
mt,
|
|
1363
1370
|
{
|
|
1364
1371
|
nodeProps: o.newNodeTemplate,
|
|
1365
1372
|
nodeSlot: s
|
|
1366
1373
|
}
|
|
1367
1374
|
),
|
|
1368
|
-
o.creatingSelection && /* @__PURE__ */
|
|
1375
|
+
o.creatingSelection && /* @__PURE__ */ w(
|
|
1369
1376
|
"div",
|
|
1370
1377
|
{
|
|
1371
1378
|
className: "rg-selection",
|
|
@@ -1377,8 +1384,8 @@ const cn = ({
|
|
|
1377
1384
|
}
|
|
1378
1385
|
)
|
|
1379
1386
|
] }),
|
|
1380
|
-
/* @__PURE__ */
|
|
1381
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ w(pn, {}),
|
|
1388
|
+
/* @__PURE__ */ w(mn, {})
|
|
1382
1389
|
] });
|
|
1383
1390
|
}, xt = ({
|
|
1384
1391
|
direction: s = "h",
|
|
@@ -1387,8 +1394,8 @@ const cn = ({
|
|
|
1387
1394
|
children: t
|
|
1388
1395
|
}) => {
|
|
1389
1396
|
const n = $();
|
|
1390
|
-
|
|
1391
|
-
const { options: i } =
|
|
1397
|
+
ce();
|
|
1398
|
+
const { options: i } = J(), a = () => {
|
|
1392
1399
|
n == null || n.toggleAutoLayout();
|
|
1393
1400
|
}, r = async () => {
|
|
1394
1401
|
n && (n.enableCanvasAnimation(), n.setZoom(100), n.moveToCenter(), n.zoomToFit(), setTimeout(() => {
|
|
@@ -1399,67 +1406,67 @@ const cn = ({
|
|
|
1399
1406
|
}, c = async () => {
|
|
1400
1407
|
await (n == null ? void 0 : n.fullscreen());
|
|
1401
1408
|
};
|
|
1402
|
-
return
|
|
1409
|
+
return q(() => {
|
|
1403
1410
|
}, []), /* @__PURE__ */ H(
|
|
1404
1411
|
"div",
|
|
1405
1412
|
{
|
|
1406
1413
|
className: `rg-toolbar rg-xs-toolbar rg-toolbar-h-${o || i.toolBarPositionH} rg-toolbar-v-${e || i.toolBarPositionV} rg-toolbar-${s || i.toolBarDirection}`,
|
|
1407
1414
|
children: [
|
|
1408
|
-
/* @__PURE__ */
|
|
1409
|
-
/* @__PURE__ */ H(
|
|
1410
|
-
/* @__PURE__ */
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
/* @__PURE__ */
|
|
1415
|
+
/* @__PURE__ */ w("div", { title: "Full Screen", className: "rg-mb-button", style: { marginTop: 0 }, onClick: c, children: /* @__PURE__ */ w(re, { iconName: "icon-quanping" }) }),
|
|
1416
|
+
/* @__PURE__ */ H(le, { children: [
|
|
1417
|
+
/* @__PURE__ */ w("div", { className: "rg-mb-button", onClick: () => l(20), children: /* @__PURE__ */ w(re, { iconName: "icon-fangda" }) }),
|
|
1418
|
+
/* @__PURE__ */ w("div", { className: "rg-current-zoom", onClick: r, children: `${Math.round(i.canvasZoom)}%` }),
|
|
1419
|
+
/* @__PURE__ */ w("div", { className: "rg-mb-button", style: { marginTop: 0 }, onClick: () => l(-20), children: /* @__PURE__ */ w(re, { iconName: "icon-suoxiao" }) })
|
|
1413
1420
|
] }),
|
|
1414
|
-
i.layout.supportAutoLayout && /* @__PURE__ */
|
|
1421
|
+
i.layout.supportAutoLayout && /* @__PURE__ */ w(
|
|
1415
1422
|
"div",
|
|
1416
1423
|
{
|
|
1417
1424
|
title: i.layout.autoLayouting ? "Stop Force Layout" : "Start Force Layout",
|
|
1418
1425
|
className: `rg-mb-button ${i.layout.autoLayouting ? "rg-mb-button-on" : ""}`,
|
|
1419
1426
|
onClick: a,
|
|
1420
|
-
children: i.layout.autoLayouting ? /* @__PURE__ */
|
|
1427
|
+
children: i.layout.autoLayouting ? /* @__PURE__ */ w(re, { iconName: "icon-lianjiezhong", className: "rg-loading-icon" }) : /* @__PURE__ */ w(re, { iconName: "icon-zidong" })
|
|
1421
1428
|
}
|
|
1422
1429
|
),
|
|
1423
1430
|
t
|
|
1424
1431
|
]
|
|
1425
1432
|
}
|
|
1426
1433
|
);
|
|
1427
|
-
},
|
|
1434
|
+
}, Lt = ({ children: s }) => /* @__PURE__ */ w(le, {}), Qe = ({ children: s }) => /* @__PURE__ */ w(le, {}), Ct = ({ children: s }) => /* @__PURE__ */ w(le, {}), wt = ({ children: s }) => /* @__PURE__ */ w(le, {}), _t = (s) => {
|
|
1428
1435
|
const o = $();
|
|
1429
|
-
|
|
1436
|
+
ce();
|
|
1430
1437
|
const e = ee(), [t, n] = pe(!1);
|
|
1431
|
-
|
|
1438
|
+
q(() => {
|
|
1432
1439
|
x("<RelationGraph> Dom Mounted!"), o.setDom(e.current), n(!0);
|
|
1433
|
-
const v = (
|
|
1434
|
-
o.onMouseWheel(
|
|
1440
|
+
const v = (L) => {
|
|
1441
|
+
o.onMouseWheel(L);
|
|
1435
1442
|
};
|
|
1436
1443
|
return e.current.addEventListener("wheel", v, { passive: !1 }), () => {
|
|
1437
|
-
var
|
|
1438
|
-
x("<RelationGraph> Dom UnMounted!"), (
|
|
1444
|
+
var L;
|
|
1445
|
+
x("<RelationGraph> Dom UnMounted!"), (L = e.current) == null || L.removeEventListener("wheel", v), o.beforeUnmount();
|
|
1439
1446
|
};
|
|
1440
1447
|
}, []);
|
|
1441
|
-
const { options: i } =
|
|
1448
|
+
const { options: i } = J();
|
|
1442
1449
|
let a, r;
|
|
1443
|
-
const l = [], c = [], d = [], h =
|
|
1444
|
-
if (v &&
|
|
1450
|
+
const l = [], c = [], d = [], h = Ce.Children.toArray(s.children).filter((v) => {
|
|
1451
|
+
if (v && Ce.isValidElement(v))
|
|
1445
1452
|
if (v.type === Yi) {
|
|
1446
|
-
const
|
|
1447
|
-
if (typeof
|
|
1448
|
-
a =
|
|
1453
|
+
const L = v.props.children;
|
|
1454
|
+
if (typeof L == "function")
|
|
1455
|
+
a = L;
|
|
1449
1456
|
else
|
|
1450
1457
|
throw new Error("RGSlotOnNode children must be a function, e.g. <RGSlotOnNode>{ (node: RGNode) => <div>{node.text}</div> }</RGSlotOnNode>");
|
|
1451
|
-
} else if (v.type ===
|
|
1452
|
-
const
|
|
1453
|
-
if (typeof
|
|
1454
|
-
r =
|
|
1458
|
+
} else if (v.type === Lt) {
|
|
1459
|
+
const L = v.props.children;
|
|
1460
|
+
if (typeof L == "function")
|
|
1461
|
+
r = L;
|
|
1455
1462
|
else
|
|
1456
1463
|
throw new Error("RGSlotOnLine children must be a function, e.g. <RGSlotOnLine>{ (lineConfig: RGGenerateLineConfig) => <RGLineContent lineConfig={lineConfig} /> }</RGSlotOnLine>");
|
|
1457
1464
|
} else {
|
|
1458
|
-
if (v.type ===
|
|
1465
|
+
if (v.type === Qe)
|
|
1459
1466
|
return l.push(v.props.children), !1;
|
|
1460
|
-
if (v.type ===
|
|
1467
|
+
if (v.type === Ct)
|
|
1461
1468
|
return c.push(v.props.children), !1;
|
|
1462
|
-
if (v.type ===
|
|
1469
|
+
if (v.type === wt)
|
|
1463
1470
|
return d.push(v.props.children), !1;
|
|
1464
1471
|
}
|
|
1465
1472
|
return !0;
|
|
@@ -1469,7 +1476,7 @@ const cn = ({
|
|
|
1469
1476
|
if (r && s.lineSlot)
|
|
1470
1477
|
throw new Error("You can only provide lineSlot or RGSlotOnLine, but not both.");
|
|
1471
1478
|
const g = a || s.nodeSlot, m = r || s.lineSlot, p = s.nodeExpandButtonSlot;
|
|
1472
|
-
return /* @__PURE__ */
|
|
1479
|
+
return /* @__PURE__ */ w(
|
|
1473
1480
|
"div",
|
|
1474
1481
|
{
|
|
1475
1482
|
ref: e,
|
|
@@ -1495,9 +1502,9 @@ const cn = ({
|
|
|
1495
1502
|
"--rg-line-color": i == null ? void 0 : i.defaultLineColor,
|
|
1496
1503
|
"--rg-line-width": (i == null ? void 0 : i.defaultLineWidth) + "px"
|
|
1497
1504
|
},
|
|
1498
|
-
children: i && /* @__PURE__ */ H(
|
|
1499
|
-
i.showToolBar && /* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */
|
|
1505
|
+
children: i && /* @__PURE__ */ H(le, { children: [
|
|
1506
|
+
i.showToolBar && /* @__PURE__ */ w(xt, {}),
|
|
1507
|
+
/* @__PURE__ */ w(
|
|
1501
1508
|
gn,
|
|
1502
1509
|
{
|
|
1503
1510
|
nodeSlot: g,
|
|
@@ -1507,20 +1514,18 @@ const cn = ({
|
|
|
1507
1514
|
nodeExpandButtonSlot: p
|
|
1508
1515
|
}
|
|
1509
1516
|
),
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1517
|
+
/* @__PURE__ */ w(vn, { nodeSlot: g }),
|
|
1518
|
+
/* @__PURE__ */ w("div", { className: "rg-graph-plugs", children: /* @__PURE__ */ w("div", { className: "rg-view-slot", children: f }) })
|
|
1512
1519
|
] })
|
|
1513
1520
|
}
|
|
1514
1521
|
);
|
|
1515
1522
|
}, Nt = (s) => {
|
|
1516
1523
|
const o = $();
|
|
1517
|
-
return
|
|
1518
|
-
|
|
1519
|
-
const e =
|
|
1524
|
+
return q(() => {
|
|
1525
|
+
lt("React"), o.setOptions(s.options);
|
|
1526
|
+
const e = Ue(s);
|
|
1520
1527
|
x("[RelationGraph]mounted:listeners:", e), o.setListeners(e), o.ready(), o.dataUpdated(), s.initialData && (x("[RelationGraph] apply data"), o.applyInitialData(s.initialData));
|
|
1521
|
-
}, []),
|
|
1522
|
-
x("[RelationGraph] update options:", s.options), console.warn("[RelationGraph] update options:", s.options), o.setOptions(s.options), o.dataUpdated();
|
|
1523
|
-
}, [s.options]), /* @__PURE__ */ L(_t, { ...s });
|
|
1528
|
+
}, []), /* @__PURE__ */ w(_t, { ...s });
|
|
1524
1529
|
};
|
|
1525
1530
|
class xn {
|
|
1526
1531
|
constructor(o) {
|
|
@@ -1569,125 +1574,125 @@ class xn {
|
|
|
1569
1574
|
return;
|
|
1570
1575
|
let n = 0, i = 0, a = 0, r = 0, l = 0, c = 0, d = 0, h = 0, f = "";
|
|
1571
1576
|
o.beginPath(), t.forEach((y) => {
|
|
1572
|
-
const u = y.trim(), g = u.charAt(0), p = u.substring(1).trim().split(/[ ,]+/).filter((
|
|
1573
|
-
let v = 0,
|
|
1577
|
+
const u = y.trim(), g = u.charAt(0), p = u.substring(1).trim().split(/[ ,]+/).filter((C) => C !== "").map(parseFloat);
|
|
1578
|
+
let v = 0, L = 0, N = 0, O = 0, b = 0, T = 0, S = 0, R = 0, k = 0, P = 0, M = 0;
|
|
1574
1579
|
switch (g) {
|
|
1575
1580
|
case "M":
|
|
1576
1581
|
n = p[0], i = p[1], a = n, r = i, o.moveTo(n + this.offset.x, i + this.offset.y);
|
|
1577
|
-
for (let
|
|
1578
|
-
n = p[
|
|
1582
|
+
for (let C = 2; C < p.length; C += 2)
|
|
1583
|
+
n = p[C], i = p[C + 1], o.lineTo(n + this.offset.x, i + this.offset.y);
|
|
1579
1584
|
break;
|
|
1580
1585
|
case "L":
|
|
1581
|
-
for (let
|
|
1582
|
-
n = p[
|
|
1586
|
+
for (let C = 0; C < p.length; C += 2)
|
|
1587
|
+
n = p[C], i = p[C + 1], o.lineTo(n + this.offset.x, i + this.offset.y);
|
|
1583
1588
|
break;
|
|
1584
1589
|
case "l":
|
|
1585
|
-
for (let
|
|
1586
|
-
n += p[
|
|
1590
|
+
for (let C = 0; C < p.length; C += 2)
|
|
1591
|
+
n += p[C], i += p[C + 1], o.lineTo(n + this.offset.x, i + this.offset.y);
|
|
1587
1592
|
break;
|
|
1588
1593
|
case "H":
|
|
1589
|
-
for (let
|
|
1590
|
-
n = p[
|
|
1594
|
+
for (let C = 0; C < p.length; C++)
|
|
1595
|
+
n = p[C], o.lineTo(n + this.offset.x, i + this.offset.y);
|
|
1591
1596
|
break;
|
|
1592
1597
|
case "h":
|
|
1593
|
-
for (let
|
|
1594
|
-
n += p[
|
|
1598
|
+
for (let C = 0; C < p.length; C++)
|
|
1599
|
+
n += p[C], o.lineTo(n + this.offset.x, i + this.offset.y);
|
|
1595
1600
|
break;
|
|
1596
1601
|
case "V":
|
|
1597
|
-
for (let
|
|
1598
|
-
i = p[
|
|
1602
|
+
for (let C = 0; C < p.length; C++)
|
|
1603
|
+
i = p[C], o.lineTo(n + this.offset.x, i + this.offset.y);
|
|
1599
1604
|
break;
|
|
1600
1605
|
case "v":
|
|
1601
|
-
for (let
|
|
1602
|
-
i += p[
|
|
1606
|
+
for (let C = 0; C < p.length; C++)
|
|
1607
|
+
i += p[C], o.lineTo(n + this.offset.x, i + this.offset.y);
|
|
1603
1608
|
break;
|
|
1604
1609
|
case "C":
|
|
1605
|
-
for (let
|
|
1606
|
-
N = p[
|
|
1610
|
+
for (let C = 0; C < p.length; C += 6)
|
|
1611
|
+
N = p[C], O = p[C + 1], b = p[C + 2], T = p[C + 3], v = p[C + 4], L = p[C + 5], o.bezierCurveTo(
|
|
1607
1612
|
N + this.offset.x,
|
|
1608
|
-
P + this.offset.y,
|
|
1609
|
-
b + this.offset.x,
|
|
1610
1613
|
O + this.offset.y,
|
|
1614
|
+
b + this.offset.x,
|
|
1615
|
+
T + this.offset.y,
|
|
1611
1616
|
v + this.offset.x,
|
|
1612
|
-
|
|
1613
|
-
), n = v, i =
|
|
1617
|
+
L + this.offset.y
|
|
1618
|
+
), n = v, i = L, l = b, c = T;
|
|
1614
1619
|
break;
|
|
1615
1620
|
case "c":
|
|
1616
|
-
for (let
|
|
1617
|
-
N = n + p[
|
|
1621
|
+
for (let C = 0; C < p.length; C += 6)
|
|
1622
|
+
N = n + p[C], O = i + p[C + 1], b = n + p[C + 2], T = i + p[C + 3], v = n + p[C + 4], L = i + p[C + 5], o.bezierCurveTo(
|
|
1618
1623
|
N + this.offset.x,
|
|
1619
|
-
P + this.offset.y,
|
|
1620
|
-
b + this.offset.x,
|
|
1621
1624
|
O + this.offset.y,
|
|
1625
|
+
b + this.offset.x,
|
|
1626
|
+
T + this.offset.y,
|
|
1622
1627
|
v + this.offset.x,
|
|
1623
|
-
|
|
1624
|
-
), l = b, c =
|
|
1628
|
+
L + this.offset.y
|
|
1629
|
+
), l = b, c = T, n = v, i = L;
|
|
1625
1630
|
break;
|
|
1626
1631
|
case "S":
|
|
1627
|
-
for (let
|
|
1628
|
-
f.match(/[CS]/i) ? (N = 2 * n - l,
|
|
1632
|
+
for (let C = 0; C < p.length; C += 4)
|
|
1633
|
+
f.match(/[CS]/i) ? (N = 2 * n - l, O = 2 * i - c) : (N = n, O = i), b = p[C], T = p[C + 1], v = p[C + 2], L = p[C + 3], o.bezierCurveTo(
|
|
1629
1634
|
N + this.offset.x,
|
|
1630
|
-
P + this.offset.y,
|
|
1631
|
-
b + this.offset.x,
|
|
1632
1635
|
O + this.offset.y,
|
|
1636
|
+
b + this.offset.x,
|
|
1637
|
+
T + this.offset.y,
|
|
1633
1638
|
v + this.offset.x,
|
|
1634
|
-
|
|
1635
|
-
), n = v, i =
|
|
1639
|
+
L + this.offset.y
|
|
1640
|
+
), n = v, i = L, l = b, c = T;
|
|
1636
1641
|
break;
|
|
1637
1642
|
case "s":
|
|
1638
|
-
for (let
|
|
1639
|
-
f.match(/[CS]/i) ? (N = 2 * n - l,
|
|
1643
|
+
for (let C = 0; C < p.length; C += 4)
|
|
1644
|
+
f.match(/[CS]/i) ? (N = 2 * n - l, O = 2 * i - c) : (N = n, O = i), b = n + p[C], T = i + p[C + 1], v = n + p[C + 2], L = i + p[C + 3], o.bezierCurveTo(
|
|
1640
1645
|
N + this.offset.x,
|
|
1641
|
-
P + this.offset.y,
|
|
1642
|
-
b + this.offset.x,
|
|
1643
1646
|
O + this.offset.y,
|
|
1647
|
+
b + this.offset.x,
|
|
1648
|
+
T + this.offset.y,
|
|
1644
1649
|
v + this.offset.x,
|
|
1645
|
-
|
|
1646
|
-
), l = b, c =
|
|
1650
|
+
L + this.offset.y
|
|
1651
|
+
), l = b, c = T, n = v, i = L;
|
|
1647
1652
|
break;
|
|
1648
1653
|
case "Q":
|
|
1649
|
-
for (let
|
|
1650
|
-
N = p[
|
|
1654
|
+
for (let C = 0; C < p.length; C += 4)
|
|
1655
|
+
N = p[C], O = p[C + 1], v = p[C + 2], L = p[C + 3], o.quadraticCurveTo(
|
|
1651
1656
|
N + this.offset.x,
|
|
1652
|
-
|
|
1657
|
+
O + this.offset.y,
|
|
1653
1658
|
v + this.offset.x,
|
|
1654
|
-
|
|
1655
|
-
), n = v, i =
|
|
1659
|
+
L + this.offset.y
|
|
1660
|
+
), n = v, i = L, d = N, h = O;
|
|
1656
1661
|
break;
|
|
1657
1662
|
case "q":
|
|
1658
|
-
for (let
|
|
1659
|
-
N = n + p[
|
|
1663
|
+
for (let C = 0; C < p.length; C += 4)
|
|
1664
|
+
N = n + p[C], O = i + p[C + 1], v = n + p[C + 2], L = i + p[C + 3], o.quadraticCurveTo(
|
|
1660
1665
|
N + this.offset.x,
|
|
1661
|
-
|
|
1666
|
+
O + this.offset.y,
|
|
1662
1667
|
v + this.offset.x,
|
|
1663
|
-
|
|
1664
|
-
), d = N, h =
|
|
1668
|
+
L + this.offset.y
|
|
1669
|
+
), d = N, h = O, n = v, i = L;
|
|
1665
1670
|
break;
|
|
1666
1671
|
case "T":
|
|
1667
|
-
for (let
|
|
1668
|
-
f.match(/[QT]/i) ? (N = 2 * n - d,
|
|
1672
|
+
for (let C = 0; C < p.length; C += 2)
|
|
1673
|
+
f.match(/[QT]/i) ? (N = 2 * n - d, O = 2 * i - h) : (N = n, O = i), v = p[C], L = p[C + 1], o.quadraticCurveTo(
|
|
1669
1674
|
N + this.offset.x,
|
|
1670
|
-
|
|
1675
|
+
O + this.offset.y,
|
|
1671
1676
|
v + this.offset.x,
|
|
1672
|
-
|
|
1673
|
-
), n = v, i =
|
|
1677
|
+
L + this.offset.y
|
|
1678
|
+
), n = v, i = L, d = N, h = O;
|
|
1674
1679
|
break;
|
|
1675
1680
|
case "t":
|
|
1676
|
-
for (let
|
|
1677
|
-
f.match(/[QT]/i) ? (N = 2 * n - d,
|
|
1681
|
+
for (let C = 0; C < p.length; C += 2)
|
|
1682
|
+
f.match(/[QT]/i) ? (N = 2 * n - d, O = 2 * i - h) : (N = n, O = i), v = n + p[C], L = i + p[C + 1], o.quadraticCurveTo(
|
|
1678
1683
|
N + this.offset.x,
|
|
1679
|
-
|
|
1684
|
+
O + this.offset.y,
|
|
1680
1685
|
v + this.offset.x,
|
|
1681
|
-
|
|
1682
|
-
), d = N, h =
|
|
1686
|
+
L + this.offset.y
|
|
1687
|
+
), d = N, h = O, n = v, i = L;
|
|
1683
1688
|
break;
|
|
1684
1689
|
case "A":
|
|
1685
|
-
for (let
|
|
1686
|
-
|
|
1690
|
+
for (let C = 0; C < p.length; C += 7)
|
|
1691
|
+
S = p[C], R = p[C + 1], k = p[C + 2], P = p[C + 3], M = p[C + 4], v = p[C + 5], L = p[C + 6], this.drawArc(o, n, i, S, R, k, P, M, v, L), n = v, i = L;
|
|
1687
1692
|
break;
|
|
1688
1693
|
case "a":
|
|
1689
|
-
for (let
|
|
1690
|
-
|
|
1694
|
+
for (let C = 0; C < p.length; C += 7)
|
|
1695
|
+
S = p[C], R = p[C + 1], k = p[C + 2], P = p[C + 3], M = p[C + 4], v = n + p[C + 5], L = i + p[C + 6], this.drawArc(o, n, i, S, R, k, P, M, v, L), n = v, i = L;
|
|
1691
1696
|
break;
|
|
1692
1697
|
case "Z":
|
|
1693
1698
|
case "z":
|
|
@@ -1713,13 +1718,13 @@ class xn {
|
|
|
1713
1718
|
)
|
|
1714
1719
|
);
|
|
1715
1720
|
isNaN(p) && (p = 0);
|
|
1716
|
-
const v = p * n * g / i,
|
|
1717
|
-
let k = Math.atan2(
|
|
1718
|
-
l === 0 &&
|
|
1719
|
-
const M = k +
|
|
1721
|
+
const v = p * n * g / i, L = p * -i * u / n, N = y * v - f * L + (e + c) / 2, O = f * v + y * L + (t + d) / 2, b = (u - v) / n, T = (g - L) / i, S = (-u - v) / n, R = (-g - L) / i;
|
|
1722
|
+
let k = Math.atan2(T, b), P = Math.atan2(T * S - b * R, b * S + T * R);
|
|
1723
|
+
l === 0 && P > 0 ? P -= 2 * Math.PI : l === 1 && P < 0 && (P += 2 * Math.PI);
|
|
1724
|
+
const M = k + P;
|
|
1720
1725
|
o.ellipse ? o.ellipse(
|
|
1721
1726
|
N + this.offset.x,
|
|
1722
|
-
|
|
1727
|
+
O + this.offset.y,
|
|
1723
1728
|
n,
|
|
1724
1729
|
i,
|
|
1725
1730
|
h,
|
|
@@ -1729,7 +1734,7 @@ class xn {
|
|
|
1729
1734
|
) : (console.warn("ctx.ellipse is not supported. Arc will be drawn as a line."), o.lineTo(c + this.offset.x, d + this.offset.y));
|
|
1730
1735
|
}
|
|
1731
1736
|
}
|
|
1732
|
-
let
|
|
1737
|
+
let we = { x: 0, y: 0 };
|
|
1733
1738
|
const _e = { x: 0, y: 0 }, fe = { x: 0, y: 0 };
|
|
1734
1739
|
let Ge, Fe;
|
|
1735
1740
|
const Ye = (s) => {
|
|
@@ -1745,17 +1750,17 @@ const Ye = (s) => {
|
|
|
1745
1750
|
} else
|
|
1746
1751
|
o.clientX = s.clientX, o.clientY = s.clientY;
|
|
1747
1752
|
return o;
|
|
1748
|
-
},
|
|
1753
|
+
}, Z = {
|
|
1749
1754
|
startDrag(s, o, e, t) {
|
|
1750
1755
|
t ? Ge = (n, i, a) => {
|
|
1751
1756
|
const r = n - fe.x, l = i - fe.y;
|
|
1752
1757
|
t(r, l, _e, fe, a);
|
|
1753
1758
|
} : Ge = (n, i) => {
|
|
1754
|
-
|
|
1755
|
-
}, Fe = e,
|
|
1759
|
+
we.x = _e.x + (n - fe.x), we.y = _e.y + (i - fe.y);
|
|
1760
|
+
}, Fe = e, we = o, _e.x = we.x, _e.y = we.y;
|
|
1756
1761
|
try {
|
|
1757
1762
|
const n = Ye(s);
|
|
1758
|
-
fe.x = n.clientX, fe.y = n.clientY, ye(s) ? (document.body.addEventListener("touchmove",
|
|
1763
|
+
fe.x = n.clientX, fe.y = n.clientY, ye(s) ? (document.body.addEventListener("touchmove", Z.onNodeMove), document.body.addEventListener("touchend", Z.onNodeDragend), document.body.addEventListener("mousemove", Z.onNodeMove), document.body.addEventListener("mouseup", Z.onNodeDragend), s.preventDefault()) : (document.body.addEventListener("mousemove", Z.onNodeMove), document.body.addEventListener("mouseup", Z.onNodeDragend));
|
|
1759
1764
|
} catch (n) {
|
|
1760
1765
|
console.error(n.message);
|
|
1761
1766
|
}
|
|
@@ -1765,7 +1770,7 @@ const Ye = (s) => {
|
|
|
1765
1770
|
Ge(o.clientX, o.clientY, s);
|
|
1766
1771
|
},
|
|
1767
1772
|
onNodeDragend(s) {
|
|
1768
|
-
if (ye(s) ? (document.body.removeEventListener("touchmove",
|
|
1773
|
+
if (ye(s) ? (document.body.removeEventListener("touchmove", Z.onNodeMove), document.body.removeEventListener("touchend", Z.onNodeDragend), document.body.removeEventListener("mousemove", Z.onNodeMove), document.body.removeEventListener("mouseup", Z.onNodeDragend)) : (document.body.removeEventListener("mousemove", Z.onNodeMove), document.body.removeEventListener("mouseup", Z.onNodeDragend)), Fe) {
|
|
1769
1774
|
const o = Ye(s), e = o.clientX, t = o.clientY, n = e - fe.x, i = t - fe.y;
|
|
1770
1775
|
Fe(
|
|
1771
1776
|
n,
|
|
@@ -1775,37 +1780,37 @@ const Ye = (s) => {
|
|
|
1775
1780
|
}
|
|
1776
1781
|
}
|
|
1777
1782
|
};
|
|
1778
|
-
function
|
|
1783
|
+
function Ln(s, o, e, t, n, i, a, r, l) {
|
|
1779
1784
|
const c = n - s, d = i - o, h = Math.sqrt(c * c + d * d);
|
|
1780
1785
|
if (h === 0)
|
|
1781
1786
|
return { x: s, y: o };
|
|
1782
|
-
const f = l * d / h, y = -(l * c) / h, u = s + f, g = o + y, m = s - e / 2, p = s + e / 2, v = o - t / 2,
|
|
1787
|
+
const f = l * d / h, y = -(l * c) / h, u = s + f, g = o + y, m = s - e / 2, p = s + e / 2, v = o - t / 2, L = o + t / 2;
|
|
1783
1788
|
let N = [];
|
|
1784
1789
|
if (c !== 0) {
|
|
1785
|
-
let
|
|
1786
|
-
|
|
1790
|
+
let T = (m - u) / c, S = g + T * d;
|
|
1791
|
+
S >= v && S <= L && N.push({ x: m, y: S });
|
|
1787
1792
|
let R = (p - u) / c, k = g + R * d;
|
|
1788
|
-
k >= v && k <=
|
|
1793
|
+
k >= v && k <= L && N.push({ x: p, y: k });
|
|
1789
1794
|
}
|
|
1790
1795
|
if (d !== 0) {
|
|
1791
|
-
let
|
|
1792
|
-
|
|
1793
|
-
let R = (
|
|
1794
|
-
k >= m && k <= p && N.push({ x: k, y:
|
|
1796
|
+
let T = (v - g) / d, S = u + T * c;
|
|
1797
|
+
S >= m && S <= p && N.push({ x: S, y: v });
|
|
1798
|
+
let R = (L - g) / d, k = u + R * c;
|
|
1799
|
+
k >= m && k <= p && N.push({ x: k, y: L });
|
|
1795
1800
|
}
|
|
1796
1801
|
if (N.length === 0 && c === 0 && d === 0)
|
|
1797
1802
|
return { x: u, y: g };
|
|
1798
|
-
let
|
|
1799
|
-
return N.forEach((
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
}),
|
|
1803
|
+
let O = null, b = 1 / 0;
|
|
1804
|
+
return N.forEach((T) => {
|
|
1805
|
+
const S = Math.sqrt((T.x - n) ** 2 + (T.y - i) ** 2);
|
|
1806
|
+
S < b && (b = S, O = T);
|
|
1807
|
+
}), O;
|
|
1803
1808
|
}
|
|
1804
1809
|
const Q = {
|
|
1805
1810
|
getRectPoint(s, o, e, t, n, i, a, r, l = !1, c = 1, d = 0, h = 14, f = !1) {
|
|
1806
1811
|
const y = s + n / 2, u = o + i / 2, g = e + a / 2, m = t + r / 2;
|
|
1807
1812
|
if (c > 1) {
|
|
1808
|
-
const R = Math.min(h, n, i), k = -R / 2,
|
|
1813
|
+
const R = Math.min(h, n, i), k = -R / 2, P = R / (c - 1), M = l && f || !l && !f ? k * -1 - d * P : k + d * P, C = Ln(
|
|
1809
1814
|
y,
|
|
1810
1815
|
u,
|
|
1811
1816
|
n,
|
|
@@ -1816,17 +1821,17 @@ const Q = {
|
|
|
1816
1821
|
r,
|
|
1817
1822
|
M
|
|
1818
1823
|
);
|
|
1819
|
-
if (
|
|
1820
|
-
return
|
|
1824
|
+
if (C)
|
|
1825
|
+
return C;
|
|
1821
1826
|
}
|
|
1822
1827
|
const p = y < g ? 1 : -1, v = u < m ? 1 : -1;
|
|
1823
1828
|
if (m === u)
|
|
1824
1829
|
return { x: y + p * n / 2, y: u };
|
|
1825
|
-
const
|
|
1826
|
-
let
|
|
1827
|
-
|
|
1828
|
-
const
|
|
1829
|
-
return { x:
|
|
1830
|
+
const L = Math.abs((g - y) / (m - u)), N = n / i;
|
|
1831
|
+
let O = 0, b = 0;
|
|
1832
|
+
L < N ? (O = p * i / 2 * L, b = v * i / 2) : (O = p * n / 2, b = v * n / 2 / L);
|
|
1833
|
+
const T = y + O, S = u + b;
|
|
1834
|
+
return { x: T, y: S };
|
|
1830
1835
|
},
|
|
1831
1836
|
getRectPointBasic(s, o, e, t, n, i, a, r) {
|
|
1832
1837
|
const l = s + n / 2, c = o + i / 2, d = e + a / 2, h = t + r / 2;
|
|
@@ -1837,8 +1842,8 @@ const Q = {
|
|
|
1837
1842
|
return Math.abs(f) < y ? (m = "2", c <= h ? (g = i / 2, u = g * f) : (g = -i / 2, u = g * f)) : (m = "3", l <= d ? (u = n / 2, g = f === 0 && d === l ? 0 : u / f) : (u = -n / 2, g = f === 0 && d === l ? 0 : u / f)), { x: l + u, y: c + g, _case: m };
|
|
1838
1843
|
},
|
|
1839
1844
|
getRectJoinPoint(s) {
|
|
1840
|
-
const { from_x: o, from_y: e, to_x: t, to_y: n, f_W: i, f_H: a, t_W: r, t_H: l } = s, c = o + i / 2, d = e + a / 2, h = t + r / 2, f = n + l / 2, y =
|
|
1841
|
-
return
|
|
1845
|
+
const { from_x: o, from_y: e, to_x: t, to_y: n, f_W: i, f_H: a, t_W: r, t_H: l } = s, c = o + i / 2, d = e + a / 2, h = t + r / 2, f = n + l / 2, y = h - c, u = f - d, g = y / (i / 2), m = u / (a / 2);
|
|
1846
|
+
return Math.abs(g) > Math.abs(m) ? g > 0 ? { x: o + i, y: d } : { x: o, y: d } : m > 0 ? { x: c, y: e + a } : { x: c, y: e };
|
|
1842
1847
|
},
|
|
1843
1848
|
getRectHJoinPoint(s) {
|
|
1844
1849
|
const { from_x: o, from_y: e, to_x: t, f_W: n, f_H: i, t_W: a } = s, r = i / 2;
|
|
@@ -1934,13 +1939,13 @@ const Q = {
|
|
|
1934
1939
|
const m = o + i / 2;
|
|
1935
1940
|
let p = y - g;
|
|
1936
1941
|
p > -1 && p < 1 && (y = y - 0.5, g = g + 0.5, p = -1);
|
|
1937
|
-
let
|
|
1942
|
+
let L = 0;
|
|
1938
1943
|
if (c > 1) {
|
|
1939
|
-
const M = Math.min(h, n, i),
|
|
1940
|
-
|
|
1944
|
+
const M = Math.min(h, n, i), C = -M / 2, E = M / (c - 1);
|
|
1945
|
+
L = l && f || !l && !f ? C * -1 - d * E : C + d * E;
|
|
1941
1946
|
}
|
|
1942
|
-
const N = u - m,
|
|
1943
|
-
return { x: g - k, y: m -
|
|
1947
|
+
const N = u - m, O = Math.sqrt(p ** 2 + N ** 2) * L / p, b = N / p, T = n / 2, S = i / 2, R = g < y ? -1 : 1, k = (-1 * T ** 2 * b * O + T * S * Math.sqrt(Math.abs(S ** 2 + b ** 2 * T ** 2 - O ** 2)) / R) / (S ** 2 + T ** 2 * b ** 2), P = b * k + O;
|
|
1948
|
+
return { x: g - k, y: m - P };
|
|
1944
1949
|
},
|
|
1945
1950
|
getCirclePointBasic(s, o, e, t, n, i, a, r, l) {
|
|
1946
1951
|
const c = s + n / 2, d = o + i / 2, h = e + a / 2, f = t + r / 2, y = h - c, u = f - d, g = Math.sqrt(y * y + u * u), m = g - l, p = m * y / g * -1, v = m * u / g * -1;
|
|
@@ -1981,18 +1986,18 @@ const Q = {
|
|
|
1981
1986
|
let n = Math.atan2(t - o, e - s) * 180 / Math.PI;
|
|
1982
1987
|
return n < 0 && (n += 360), n > 90 && n <= 270 && (n += 180), n >= 360 && (n -= 360), Math.round(n);
|
|
1983
1988
|
}
|
|
1984
|
-
},
|
|
1989
|
+
}, Le = (s, o, e, t) => {
|
|
1985
1990
|
const n = s - e, i = o - t;
|
|
1986
1991
|
return Math.sqrt(n ** 2 + i ** 2);
|
|
1987
1992
|
};
|
|
1988
|
-
function
|
|
1993
|
+
function nt(s, o, e, t, n = 0, i = 0) {
|
|
1989
1994
|
let a = 1, r = n, l = i, c = 0;
|
|
1990
1995
|
for (let d of e) {
|
|
1991
1996
|
const h = d.width, f = d.height;
|
|
1992
1997
|
f > c && (c = f), t(d, r, l), r += h + o, a > s ? (l += c + o, a = 1, r = 0, c = 0) : a++;
|
|
1993
1998
|
}
|
|
1994
1999
|
}
|
|
1995
|
-
class
|
|
2000
|
+
class Cn {
|
|
1996
2001
|
constructor(o) {
|
|
1997
2002
|
_(this, "graphInstance");
|
|
1998
2003
|
_(this, "initialized", !1);
|
|
@@ -2085,7 +2090,7 @@ class wn {
|
|
|
2085
2090
|
_appendNodeChildrenToNextLevelNodes(o, e, t, n, i, a) {
|
|
2086
2091
|
let r = 0, l = 0, c = 0;
|
|
2087
2092
|
if (e.forEach((d) => {
|
|
2088
|
-
d.lot || (d.lot = { eached: !1, childs: [] }), d.lot.eached || (l++, d.lot.parent = o,
|
|
2093
|
+
d.lot || (d.lot = { eached: !1, childs: [] }), d.lot.eached || (l++, d.lot.parent = o, z.isVisibleNode(d) && (d.lot.eached = !0, d.lot.index_of_parent = c++, t.push(d), r++), o.lot.childs.push(d));
|
|
2089
2094
|
}), a === 1) {
|
|
2090
2095
|
const d = r > 0 ? r : 1;
|
|
2091
2096
|
o.lot.strength = d, n.all_strength += d, o.lot.strength_of_level = n.all_strength, o.lot.childrenSizeVisible = r, o.lot.childrenSize = l;
|
|
@@ -2125,7 +2130,7 @@ class ve {
|
|
|
2125
2130
|
_(this, "requireLinks", !1);
|
|
2126
2131
|
_(this, "allLinks", []);
|
|
2127
2132
|
_(this, "rootNode");
|
|
2128
|
-
this.layoutOptions = o, this.graphOptions = e, this.graphInstance = t, this.networkAnalyzer = new
|
|
2133
|
+
this.layoutOptions = o, this.graphOptions = e, this.graphInstance = t, this.networkAnalyzer = new Cn(t);
|
|
2129
2134
|
}
|
|
2130
2135
|
setLinks(o) {
|
|
2131
2136
|
x("setLinks:", o.length), this.allLinks = o;
|
|
@@ -2177,7 +2182,7 @@ class ve {
|
|
|
2177
2182
|
return o;
|
|
2178
2183
|
}
|
|
2179
2184
|
getReverseAlignItems(o) {
|
|
2180
|
-
return
|
|
2185
|
+
return wn[o];
|
|
2181
2186
|
}
|
|
2182
2187
|
updateNodePosition(o, e, t) {
|
|
2183
2188
|
this.graphInstance.updateNode(typeof o == "string" ? o : o.id, { x: e, y: t });
|
|
@@ -2186,7 +2191,7 @@ class ve {
|
|
|
2186
2191
|
this.graphInstance && (this.graphInstance.dataProvider.updateShouldRenderGraphData(), this.graphInstance._dataUpdated());
|
|
2187
2192
|
}
|
|
2188
2193
|
}
|
|
2189
|
-
const
|
|
2194
|
+
const wn = {
|
|
2190
2195
|
start: "end",
|
|
2191
2196
|
end: "start",
|
|
2192
2197
|
center: "center"
|
|
@@ -2222,10 +2227,10 @@ class Re extends ve {
|
|
|
2222
2227
|
_(this, "prevNodeLevel1Index", 0);
|
|
2223
2228
|
_(this, "prevNodeLevel2Index", 0);
|
|
2224
2229
|
_(this, "stoped", !1);
|
|
2225
|
-
_(this, "maxTractionLength",
|
|
2226
|
-
_(this, "zeroForceLength",
|
|
2227
|
-
_(this, "maxRepulsionDistance",
|
|
2228
|
-
_(this, "nodeCollisionRadius",
|
|
2230
|
+
_(this, "maxTractionLength", 400);
|
|
2231
|
+
_(this, "zeroForceLength", 40);
|
|
2232
|
+
_(this, "maxRepulsionDistance", 600);
|
|
2233
|
+
_(this, "nodeCollisionRadius", 40);
|
|
2229
2234
|
_(this, "maxMoveSpeed", 100);
|
|
2230
2235
|
_(this, "n2nMaxForce", 50);
|
|
2231
2236
|
this.layoutOptions = e, this.layoutOptions.fastStart !== void 0 && (this.fastStart = this.layoutOptions.fastStart), this.layoutOptions.maxLayoutTimes !== void 0 && (this.maxLayoutTimes = this.layoutOptions.maxLayoutTimes), this.layoutOptions.byNode !== void 0 && (this.byNode = this.layoutOptions.byNode), this.layoutOptions.byLine !== void 0 && (this.byLine = this.layoutOptions.byLine), this.layoutOptions.force_node_repulsion !== void 0 && (this.force_node_repulsion = this.layoutOptions.force_node_repulsion), this.layoutOptions.force_line_elastic !== void 0 && (this.force_line_elastic = this.layoutOptions.force_line_elastic), this.layoutOptions.force_x_coefficient === void 0 && (this.layoutOptions.force_x_coefficient = 1), this.layoutOptions.force_y_coefficient === void 0 && (this.layoutOptions.force_y_coefficient = 1), this.layoutOptions.disableLiveChanges === void 0 && (this.layoutOptions.disableLiveChanges = !1), this.layoutOptions.stopWhenBalanced && (this.stopWhenBalanced = !0), this.layoutOptions.skipInitLayout !== void 0 && (this.skipInitLayout = this.layoutOptions.skipInitLayout), this.layoutOptions.maxTractionLength !== void 0 && (this.maxTractionLength = this.layoutOptions.maxTractionLength), this.layoutOptions.zeroForceLength !== void 0 && (this.zeroForceLength = this.layoutOptions.zeroForceLength), this.layoutOptions.maxRepulsionDistance !== void 0 && (this.maxRepulsionDistance = this.layoutOptions.maxRepulsionDistance), this.layoutOptions.nodeCollisionRadius !== void 0 && (this.nodeCollisionRadius = this.layoutOptions.nodeCollisionRadius), this.requireLinks = !0, this.instanceId = n ? n.generateNewUUID(5) : "error-id";
|
|
@@ -2243,14 +2248,14 @@ class Re extends ve {
|
|
|
2243
2248
|
x("layout by root:", t), (Number.isNaN(t.x) || t.x === void 0) && this.updateNodePosition(t, 0, 0);
|
|
2244
2249
|
const { tree: n } = this.networkAnalyzer.analyzeNetwork(e, t), { networkNodes: i, analyticResult: a } = n;
|
|
2245
2250
|
t.fixed || this.layoutOptions.fixedRootNode || this.updateNodePosition(t, 0, 0);
|
|
2246
|
-
const r =
|
|
2251
|
+
const r = z.getNodeLotXY({
|
|
2247
2252
|
alignItemsX: "center",
|
|
2248
2253
|
alignItemsY: "center"
|
|
2249
2254
|
}, t);
|
|
2250
2255
|
t.lot.x = r.x, t.lot.y = r.y, this.placeRelativePosition(t, i, a, 1, []), x("!!!initNodesPosition fixedRootNode:2:", t.x, t.y), i.forEach((l) => {
|
|
2251
2256
|
if (l.fixed === !0 || !l.rgCalcedVisibility || l === t)
|
|
2252
2257
|
return;
|
|
2253
|
-
const c = l.lot.x -
|
|
2258
|
+
const c = l.lot.x - z.getNodeWidth(l) / 2, d = l.lot.y - z.getNodeHeight(l) / 2;
|
|
2254
2259
|
this.updateNodePosition(l, c, d);
|
|
2255
2260
|
});
|
|
2256
2261
|
}
|
|
@@ -2281,8 +2286,8 @@ class Re extends ve {
|
|
|
2281
2286
|
let h = t;
|
|
2282
2287
|
const f = n - t, y = 200, u = this.getLevelR(l, a) || a * y * d;
|
|
2283
2288
|
for (const p of e) {
|
|
2284
|
-
const v = ((g = p.lot) == null ? void 0 : g.strengthWithChilds) / r,
|
|
2285
|
-
p.lot.x =
|
|
2289
|
+
const v = ((g = p.lot) == null ? void 0 : g.strengthWithChilds) / r, L = i.x + u, N = i.y, O = v * f, b = h + O / 2, T = Q.getRotatedPoint(L, N, i.x, i.y, b);
|
|
2290
|
+
p.lot.x = T.x, p.lot.y = T.y, p.lot.childs && p.lot.childs.length > 0 && this.placeNodesInFanRegion(p.lot.childs, h, h + O, i, a + 1, (m = p.lot) == null ? void 0 : m.strengthWithChilds, l, c + 1), h += O;
|
|
2286
2291
|
}
|
|
2287
2292
|
}
|
|
2288
2293
|
graphEventHandle(e, ...t) {
|
|
@@ -2363,7 +2368,7 @@ class Re extends ve {
|
|
|
2363
2368
|
}
|
|
2364
2369
|
}
|
|
2365
2370
|
resetCalcNodes() {
|
|
2366
|
-
|
|
2371
|
+
this.forCalcNodes = [], this.calcNodeMap = /* @__PURE__ */ new WeakMap(), this.visibleNodes.forEach((e) => {
|
|
2367
2372
|
const t = {
|
|
2368
2373
|
rgNode: e,
|
|
2369
2374
|
Fx: 0,
|
|
@@ -2509,7 +2514,7 @@ class bt extends ve {
|
|
|
2509
2514
|
alignItemsY: this.layoutOptions.alignParentItemsY
|
|
2510
2515
|
};
|
|
2511
2516
|
this.rootNode = t, this.allNodes = e, t.fixed || this.layoutOptions.fixedRootNode || this.updateNodePosition(t, 0, 0);
|
|
2512
|
-
const a =
|
|
2517
|
+
const a = z.getNodeLotXY(n, t);
|
|
2513
2518
|
t.lot.x = a.x, t.lot.y = a.y;
|
|
2514
2519
|
const r = e;
|
|
2515
2520
|
if (x("groupNodes:2:", r.length, r.map((d) => d.text).join(",")), this.layoutOptions.simpleTree === !0) {
|
|
@@ -2523,12 +2528,12 @@ class bt extends ve {
|
|
|
2523
2528
|
console.log("rotate:", l);
|
|
2524
2529
|
const c = { x: t.x, y: t.y };
|
|
2525
2530
|
this.allNodes.forEach((d) => {
|
|
2526
|
-
if (d.fixed !== !0 && !!
|
|
2531
|
+
if (d.fixed !== !0 && !!z.isVisibleNode(d) && (Number.isNaN(d.lot.x) && (x("bad lot x:", d.text, d.lot.x), d.lot.x = 0), Number.isNaN(d.lot.y) && (x("bad lot y:", d.text, d.lot.y), d.lot.y = 0), d !== t)) {
|
|
2527
2532
|
if (l) {
|
|
2528
2533
|
const u = Q.getRotatedPoint(d.lot.x, d.lot.y, c.x, c.y, l);
|
|
2529
2534
|
d.lot.x = u.x, d.lot.y = u.y;
|
|
2530
2535
|
}
|
|
2531
|
-
const h = d.lot.level < 0 ? i : n, f =
|
|
2536
|
+
const h = d.lot.level < 0 ? i : n, f = z.getNodeXByLotX(h, d), y = z.getNodeYByLotY(h, d);
|
|
2532
2537
|
this.updateNodePosition(d, f, y);
|
|
2533
2538
|
}
|
|
2534
2539
|
}), x("create rootNode coordinates:1", t.x, t.y), this.layoutEnd();
|
|
@@ -2622,7 +2627,7 @@ class bt extends ve {
|
|
|
2622
2627
|
const { calcNodes: d, calcNodeMap: h } = this.generateCalcNodes(e);
|
|
2623
2628
|
d.forEach((f) => {
|
|
2624
2629
|
const y = f.rgNode.lot.level < 0 ? i : n;
|
|
2625
|
-
f.x =
|
|
2630
|
+
f.x = z.getNodeXByLotX(y, f.rgNode), f.y = z.getNodeYByLotY(y, f.rgNode), f.width = f.rgNode.el_W, f.height = f.rgNode.el_H, f.buffY = 0;
|
|
2626
2631
|
});
|
|
2627
2632
|
for (const f of r) {
|
|
2628
2633
|
const y = l.get(f) || [];
|
|
@@ -2633,7 +2638,7 @@ class bt extends ve {
|
|
|
2633
2638
|
this.adjustNodePositions(u, "bottom", this.layoutOptions.treeNodeGapV);
|
|
2634
2639
|
for (const g of u) {
|
|
2635
2640
|
const m = g.rgNode.lot.level < 0 ? i : n;
|
|
2636
|
-
g.rgNode.lot.y =
|
|
2641
|
+
g.rgNode.lot.y = z.getNodeLotXY(m, g).y;
|
|
2637
2642
|
}
|
|
2638
2643
|
} else {
|
|
2639
2644
|
y.sort((g, m) => m.lot.y - g.lot.y);
|
|
@@ -2641,7 +2646,7 @@ class bt extends ve {
|
|
|
2641
2646
|
this.adjustNodePositions(u, "top", this.layoutOptions.treeNodeGapV);
|
|
2642
2647
|
for (const g of u) {
|
|
2643
2648
|
const m = g.rgNode.lot.level < 0 ? i : n;
|
|
2644
|
-
g.rgNode.lot.y =
|
|
2649
|
+
g.rgNode.lot.y = z.getNodeLotXY(m, g).y;
|
|
2645
2650
|
}
|
|
2646
2651
|
}
|
|
2647
2652
|
else if (a === "end") {
|
|
@@ -2649,7 +2654,7 @@ class bt extends ve {
|
|
|
2649
2654
|
const u = y.map((g) => h.get(g.id));
|
|
2650
2655
|
this.adjustNodePositions(u, "right", this.layoutOptions.treeNodeGapH);
|
|
2651
2656
|
for (const g of u) {
|
|
2652
|
-
const m = g.rgNode.lot.level < 0 ? i : n, p =
|
|
2657
|
+
const m = g.rgNode.lot.level < 0 ? i : n, p = z.getNodeLotXY(m, g);
|
|
2653
2658
|
g.rgNode.lot.x = p.x;
|
|
2654
2659
|
}
|
|
2655
2660
|
} else {
|
|
@@ -2658,88 +2663,88 @@ class bt extends ve {
|
|
|
2658
2663
|
this.adjustNodePositions(u, "left", this.layoutOptions.treeNodeGapH);
|
|
2659
2664
|
for (const g of u) {
|
|
2660
2665
|
const m = g.rgNode.lot.level < 0 ? i : n;
|
|
2661
|
-
g.rgNode.lot.x =
|
|
2666
|
+
g.rgNode.lot.x = z.getNodeLotXY(m, g).x;
|
|
2662
2667
|
}
|
|
2663
2668
|
}
|
|
2664
2669
|
console.log("levelNodes:", f, y);
|
|
2665
2670
|
}
|
|
2666
2671
|
if (t === "h") {
|
|
2667
2672
|
const f = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
|
|
2668
|
-
for (const
|
|
2669
|
-
const
|
|
2670
|
-
f.set(
|
|
2673
|
+
for (const L of r) {
|
|
2674
|
+
const O = l.get(L).map((b) => h.get(b.id));
|
|
2675
|
+
f.set(L, Math.max(...O.map((b) => b.width))), y.set(L, Math.min(...O.map((b) => b.x)));
|
|
2671
2676
|
}
|
|
2672
2677
|
const u = this.layoutOptions.treeNodeGapH;
|
|
2673
|
-
let g = r.filter((
|
|
2678
|
+
let g = r.filter((L) => L > 0).sort((L, N) => L - N), m = r.filter((L) => L < 0).sort((L, N) => N - L), p = 1;
|
|
2674
2679
|
this.layoutOptions.from === "right" && ([m, g] = [g, m], p = -1);
|
|
2675
2680
|
let v = 0;
|
|
2676
|
-
for (const
|
|
2677
|
-
const N =
|
|
2678
|
-
f.get(
|
|
2679
|
-
const
|
|
2680
|
-
if (
|
|
2681
|
-
const R =
|
|
2682
|
-
console.log("[xxxxx]move", N,
|
|
2683
|
-
const k = l.get(
|
|
2684
|
-
for (const
|
|
2685
|
-
|
|
2686
|
-
y.set(
|
|
2681
|
+
for (const L of g) {
|
|
2682
|
+
const N = L - p, O = y.get(N), b = f.get(N), T = y.get(L) + v;
|
|
2683
|
+
f.get(L);
|
|
2684
|
+
const S = O + b + u;
|
|
2685
|
+
if (S > T) {
|
|
2686
|
+
const R = S - T;
|
|
2687
|
+
console.log("[xxxxx]move", N, L, S, T, R), v = R;
|
|
2688
|
+
const k = l.get(L);
|
|
2689
|
+
for (const P of k)
|
|
2690
|
+
P.lot.x += v;
|
|
2691
|
+
y.set(L, T + R);
|
|
2687
2692
|
} else
|
|
2688
|
-
console.log("[xxxxx]goon", N,
|
|
2693
|
+
console.log("[xxxxx]goon", N, L, S, T), y.set(L, T);
|
|
2689
2694
|
}
|
|
2690
2695
|
v = 0;
|
|
2691
|
-
for (const
|
|
2692
|
-
const N =
|
|
2696
|
+
for (const L of m) {
|
|
2697
|
+
const N = L + p, O = y.get(N);
|
|
2693
2698
|
f.get(N);
|
|
2694
|
-
const b = y.get(
|
|
2695
|
-
if (b +
|
|
2696
|
-
const R =
|
|
2699
|
+
const b = y.get(L) + v, T = f.get(L), S = O - u;
|
|
2700
|
+
if (b + T > S) {
|
|
2701
|
+
const R = S - (b + T);
|
|
2697
2702
|
v = R;
|
|
2698
|
-
const k = l.get(
|
|
2699
|
-
for (const
|
|
2700
|
-
|
|
2701
|
-
y.set(
|
|
2703
|
+
const k = l.get(L);
|
|
2704
|
+
for (const P of k)
|
|
2705
|
+
P.lot.x += v;
|
|
2706
|
+
y.set(L, b + R);
|
|
2702
2707
|
} else
|
|
2703
|
-
y.set(
|
|
2708
|
+
y.set(L, b);
|
|
2704
2709
|
}
|
|
2705
2710
|
} else {
|
|
2706
2711
|
const f = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
|
|
2707
|
-
for (const
|
|
2708
|
-
const
|
|
2709
|
-
f.set(
|
|
2712
|
+
for (const L of r) {
|
|
2713
|
+
const O = l.get(L).map((b) => h.get(b.id));
|
|
2714
|
+
f.set(L, Math.max(...O.map((b) => b.height))), y.set(L, Math.min(...O.map((b) => b.y)));
|
|
2710
2715
|
}
|
|
2711
2716
|
const u = this.layoutOptions.treeNodeGapV;
|
|
2712
|
-
let g = r.filter((
|
|
2717
|
+
let g = r.filter((L) => L > 0).sort((L, N) => L - N), m = r.filter((L) => L < 0).sort((L, N) => N - L), p = 1;
|
|
2713
2718
|
this.layoutOptions.from === "bottom" && ([m, g] = [g, m], p = -1);
|
|
2714
2719
|
let v = 0;
|
|
2715
|
-
for (const
|
|
2716
|
-
const N =
|
|
2717
|
-
f.get(
|
|
2718
|
-
const
|
|
2719
|
-
if (
|
|
2720
|
-
const R =
|
|
2721
|
-
console.log("[xxxxx]move", N,
|
|
2722
|
-
const k = l.get(
|
|
2723
|
-
for (const
|
|
2724
|
-
|
|
2725
|
-
y.set(
|
|
2720
|
+
for (const L of g) {
|
|
2721
|
+
const N = L - p, O = y.get(N), b = f.get(N), T = y.get(L) + v;
|
|
2722
|
+
f.get(L);
|
|
2723
|
+
const S = O + b + u;
|
|
2724
|
+
if (S > T) {
|
|
2725
|
+
const R = S - T;
|
|
2726
|
+
console.log("[xxxxx]move", N, L, S, T, R), v = R;
|
|
2727
|
+
const k = l.get(L);
|
|
2728
|
+
for (const P of k)
|
|
2729
|
+
P.lot.y += v;
|
|
2730
|
+
y.set(L, T + R);
|
|
2726
2731
|
} else
|
|
2727
|
-
console.log("[xxxxx]goon", N,
|
|
2732
|
+
console.log("[xxxxx]goon", N, L, S, T), y.set(L, T);
|
|
2728
2733
|
}
|
|
2729
2734
|
v = 0;
|
|
2730
|
-
for (const
|
|
2731
|
-
const N =
|
|
2735
|
+
for (const L of m) {
|
|
2736
|
+
const N = L + p, O = y.get(N);
|
|
2732
2737
|
f.get(N);
|
|
2733
|
-
const b = y.get(
|
|
2734
|
-
if (b +
|
|
2735
|
-
const R =
|
|
2738
|
+
const b = y.get(L) + v, T = f.get(L), S = O - u;
|
|
2739
|
+
if (b + T > S) {
|
|
2740
|
+
const R = S - (b + T);
|
|
2736
2741
|
v = R;
|
|
2737
|
-
const k = l.get(
|
|
2738
|
-
for (const
|
|
2739
|
-
|
|
2740
|
-
y.set(
|
|
2742
|
+
const k = l.get(L);
|
|
2743
|
+
for (const P of k)
|
|
2744
|
+
P.lot.y += v;
|
|
2745
|
+
y.set(L, b + R);
|
|
2741
2746
|
} else
|
|
2742
|
-
y.set(
|
|
2747
|
+
y.set(L, b);
|
|
2743
2748
|
}
|
|
2744
2749
|
}
|
|
2745
2750
|
}
|
|
@@ -2796,12 +2801,12 @@ class Ot extends Re {
|
|
|
2796
2801
|
const r = {
|
|
2797
2802
|
alignItemsX: this.layoutOptions.alignItemsX || "center",
|
|
2798
2803
|
alignItemsY: this.layoutOptions.alignItemsY || "center"
|
|
2799
|
-
}, l =
|
|
2804
|
+
}, l = z.getNodeLotXY(r, t);
|
|
2800
2805
|
t.lot.x = l.x, t.lot.y = l.y, x("root position:", t.lot.x, t.lot.y);
|
|
2801
2806
|
const c = this.layoutOptions.distance_coefficient || 1, d = this.getLevelDistanceArr();
|
|
2802
2807
|
this.placeRelativePosition(this.rootNode, i, a, c, d), i.forEach((h) => {
|
|
2803
2808
|
if (h.fixed !== !0 && !!h.rgCalcedVisibility && h !== t) {
|
|
2804
|
-
const f = r, y =
|
|
2809
|
+
const f = r, y = z.getNodeXByLotX(f, h), u = z.getNodeYByLotY(f, h);
|
|
2805
2810
|
this.updateNodePosition(h, y, u);
|
|
2806
2811
|
}
|
|
2807
2812
|
}), this.layoutEnd();
|
|
@@ -2820,7 +2825,7 @@ class Ot extends Re {
|
|
|
2820
2825
|
return e;
|
|
2821
2826
|
}
|
|
2822
2827
|
}
|
|
2823
|
-
class
|
|
2828
|
+
class Tt extends Re {
|
|
2824
2829
|
constructor(o, e, t) {
|
|
2825
2830
|
super(o, e, t);
|
|
2826
2831
|
}
|
|
@@ -2835,7 +2840,7 @@ class Pt extends Re {
|
|
|
2835
2840
|
const t = {
|
|
2836
2841
|
alignItemsX: this.layoutOptions.alignItemsX || "center",
|
|
2837
2842
|
alignItemsY: this.layoutOptions.alignItemsY || "center"
|
|
2838
|
-
}, n =
|
|
2843
|
+
}, n = z.getNodeLotXY(t, e);
|
|
2839
2844
|
e.lot.x = n.x, e.lot.y = n.y;
|
|
2840
2845
|
const i = this.allNodes.filter((l) => l.rgCalcedVisibility), a = i.length;
|
|
2841
2846
|
let r = a * 90 / Math.PI / 2;
|
|
@@ -2845,12 +2850,12 @@ class Pt extends Re {
|
|
|
2845
2850
|
}), i.forEach((l) => {
|
|
2846
2851
|
if (l === e || l.fixed === !0 || !l.rgCalcedVisibility)
|
|
2847
2852
|
return;
|
|
2848
|
-
const c = t, d =
|
|
2853
|
+
const c = t, d = z.getNodeXByLotX(c, l), h = z.getNodeYByLotY(c, l);
|
|
2849
2854
|
this.updateNodePosition(l, d, h);
|
|
2850
2855
|
}), this.layoutEnd();
|
|
2851
2856
|
}
|
|
2852
2857
|
}
|
|
2853
|
-
class
|
|
2858
|
+
class Pt extends ve {
|
|
2854
2859
|
constructor(e, t, n) {
|
|
2855
2860
|
super(e, t, n);
|
|
2856
2861
|
_(this, "graphOptions");
|
|
@@ -2894,7 +2899,7 @@ class _n extends ve {
|
|
|
2894
2899
|
alignItemsY: this.layoutOptions.alignParentItemsY
|
|
2895
2900
|
}, { tree: a, reverseTree: r } = this.networkAnalyzer.analyzeNetwork(e, this.rootNode, !0, !0);
|
|
2896
2901
|
t.fixed || this.layoutOptions.fixedRootNode || this.updateNodePosition(t, 0, 0);
|
|
2897
|
-
const l =
|
|
2902
|
+
const l = z.getNodeLotXY(n, t);
|
|
2898
2903
|
t.lot.x = l.x, t.lot.y = l.y, this.placeRelativePosition(t, [...a.networkNodes].concat(r.networkNodes), Math.max(a.analyticResult.max_strength, r.analyticResult.max_strength)), x("allNodes:", e.length);
|
|
2899
2904
|
const c = {
|
|
2900
2905
|
left: 0,
|
|
@@ -2909,7 +2914,7 @@ class _n extends ve {
|
|
|
2909
2914
|
const p = Q.getRotatedPoint(y.lot.x, y.lot.y, d.x, d.y, c);
|
|
2910
2915
|
y.lot.x = p.x, y.lot.y = p.y;
|
|
2911
2916
|
}
|
|
2912
|
-
const u = y.lot.level < 0 ? i : n, g =
|
|
2917
|
+
const u = y.lot.level < 0 ? i : n, g = z.getNodeXByLotX(u, y), m = z.getNodeYByLotY(u, y);
|
|
2913
2918
|
this.updateNodePosition(y, g, m);
|
|
2914
2919
|
}), x("create rootNode coordinates:1", t.x, t.y);
|
|
2915
2920
|
const h = new Re({
|
|
@@ -2922,7 +2927,7 @@ class _n extends ve {
|
|
|
2922
2927
|
}, this.graphOptions, this.graphInstance);
|
|
2923
2928
|
h.isMainLayouer = !1, h.requireLinks = !0, this.layoutOptions.from === "top" || this.layoutOptions.from === "bottom" ? h.lockY = !0 : h.lockX = !0;
|
|
2924
2929
|
const f = t.fixed;
|
|
2925
|
-
t.fixed = !0, h.skipInitLayout = !0, h.setLinks(this.graphInstance.
|
|
2930
|
+
t.fixed = !0, h.skipInitLayout = !0, h.setLinks(this.graphInstance._getAllLinks()), h.resetCalcNodes(), setTimeout(() => {
|
|
2926
2931
|
t.fixed = f;
|
|
2927
2932
|
}, 800), h.onFinish(() => {
|
|
2928
2933
|
t.fixed = f, this.graphInstance && (this.graphInstance.enableNodeXYAnimation(), this.graphInstance._dataUpdated()), this.applyNodesGap(this.allNodes), this.graphInstance && (this.graphInstance._dataUpdated(), setTimeout(() => {
|
|
@@ -3008,7 +3013,7 @@ class _n extends ve {
|
|
|
3008
3013
|
return i;
|
|
3009
3014
|
}
|
|
3010
3015
|
}
|
|
3011
|
-
class
|
|
3016
|
+
class St extends ve {
|
|
3012
3017
|
constructor(e, t, n) {
|
|
3013
3018
|
super(e, t, n);
|
|
3014
3019
|
_(this, "enableGatherNodes", !1);
|
|
@@ -3033,12 +3038,12 @@ class Tt extends ve {
|
|
|
3033
3038
|
alignItemsY: this.layoutOptions.alignParentItemsY
|
|
3034
3039
|
};
|
|
3035
3040
|
t.fixed || this.layoutOptions.fixedRootNode || this.updateNodePosition(t, 0, 0);
|
|
3036
|
-
const a =
|
|
3041
|
+
const a = z.getNodeLotXY(n, t);
|
|
3037
3042
|
t.lot.x = a.x, t.lot.y = a.y, x("allNodes:", e.length);
|
|
3038
3043
|
const { tree: r } = this.networkAnalyzer.analyzeNetwork(e, t, !1);
|
|
3039
3044
|
this.placeRelativePosition(t, r.networkNodes, r.analyticResult), x("networkNodes:", r.networkNodes.length), this.allNodes.forEach((l) => {
|
|
3040
3045
|
if (l.fixed !== !0 && (Number.isNaN(l.lot.x) && (x("bad lot x:", l.text, l.lot.x), l.lot.x = 0), Number.isNaN(l.lot.y) && (x("bad lot y:", l.text, l.lot.y), l.lot.y = 0), l !== t)) {
|
|
3041
|
-
const c = l.lot.level < 0 ? i : n, d =
|
|
3046
|
+
const c = l.lot.level < 0 ? i : n, d = z.getNodeXByLotX(c, l), h = z.getNodeYByLotY(c, l);
|
|
3042
3047
|
this.updateNodePosition(l, d, h);
|
|
3043
3048
|
}
|
|
3044
3049
|
}), x("create rootNode coordinates:1", t.x, t.y), this.layoutEnd();
|
|
@@ -3145,7 +3150,7 @@ const xe = (s) => !s || s.length === 0 ? "" : s.map((o) => {
|
|
|
3145
3150
|
default:
|
|
3146
3151
|
return console.warn("\u672A\u77E5\u7684\u8DEF\u5F84\u547D\u4EE4\u7C7B\u578B:", o), "";
|
|
3147
3152
|
}
|
|
3148
|
-
}).join(" ").trim(),
|
|
3153
|
+
}).join(" ").trim(), it = (s) => {
|
|
3149
3154
|
const o = s.match(/[a-zA-Z][^a-zA-Z]*/g);
|
|
3150
3155
|
let e = 0, t = 0, n = 0, i = 0, a = 0, r = 0, l = 0, c = 0;
|
|
3151
3156
|
const d = { x: 0, y: 0 }, h = { x: 0, y: 0 }, f = [];
|
|
@@ -3299,54 +3304,54 @@ const xe = (s) => !s || s.length === 0 ? "" : s.map((o) => {
|
|
|
3299
3304
|
tcy: y,
|
|
3300
3305
|
t_W: u,
|
|
3301
3306
|
t_H: g
|
|
3302
|
-
} = s, m = d - n, p = h - i, v = n - a,
|
|
3303
|
-
let M = 0,
|
|
3307
|
+
} = s, m = d - n, p = h - i, v = n - a, L = i - r, N = d - f, O = h - y, b = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0, T = Math.min(b, Math.abs(m)) * (n < d ? 1 : -1), S = Math.min(b, Math.abs(p)) * (i < h ? 1 : -1), R = t.lineDirection || Math.abs(v) >= l / 2 ? "h" : "v", k = t.lineDirection || Math.abs(N) >= u / 2 ? "h" : "v", P = [];
|
|
3308
|
+
let M = 0, C = 0;
|
|
3304
3309
|
if (R === "v") {
|
|
3305
|
-
const
|
|
3306
|
-
if (t.
|
|
3310
|
+
const V = t.polyLineStartDistance || Math.max(Math.min(30, Math.abs(h - i) / 2), 15), X = L > 0 ? V : -V;
|
|
3311
|
+
if (t.placeText === "start" ? (M = n, C = i + (L > 0 ? 20 : -5)) : t.placeText === "center" || t.placeText === "middle" ? (M = n + (d - n) / 2, C = i + X) : (M = d, C = h - (L > 0 ? 20 : -5)), P.push(
|
|
3307
3312
|
{ type: "M", x: Math.round(n), y: Math.round(i) },
|
|
3308
|
-
{ type: "v", dy: Math.round(
|
|
3309
|
-
{ type: "c", dx1: 0, dy1: Math.round(
|
|
3313
|
+
{ type: "v", dy: Math.round(X - S) },
|
|
3314
|
+
{ type: "c", dx1: 0, dy1: Math.round(S), dx2: Math.round(T), dy2: Math.round(S), dx: Math.round(T), dy: Math.round(S) }
|
|
3310
3315
|
), k === "v")
|
|
3311
|
-
|
|
3312
|
-
{ type: "h", dx: Math.round(d - n -
|
|
3313
|
-
{ type: "c", dx1: Math.round(
|
|
3314
|
-
{ type: "v", dy: Math.round(h - i -
|
|
3316
|
+
P.push(
|
|
3317
|
+
{ type: "h", dx: Math.round(d - n - T * 2) },
|
|
3318
|
+
{ type: "c", dx1: Math.round(T), dy1: 0, dx2: Math.round(T), dy2: Math.round(S), dx: Math.round(T), dy: Math.round(S) },
|
|
3319
|
+
{ type: "v", dy: Math.round(h - i - X - S) }
|
|
3315
3320
|
);
|
|
3316
3321
|
else {
|
|
3317
|
-
const
|
|
3318
|
-
|
|
3319
|
-
{ type: "h", dx: Math.round(d - n + I -
|
|
3320
|
-
{ type: "c", dx1: Math.round(
|
|
3321
|
-
{ type: "v", dy: Math.round(h - i -
|
|
3322
|
-
{ type: "h", dx: Math.round(I -
|
|
3322
|
+
const B = Math.min(30, Math.abs(d - n) / 2), I = N > 0 ? -B : B;
|
|
3323
|
+
P.push(
|
|
3324
|
+
{ type: "h", dx: Math.round(d - n + I - T) },
|
|
3325
|
+
{ type: "c", dx1: Math.round(T), dy1: 0, dx2: Math.round(T), dy2: Math.round(S), dx: Math.round(T), dy: Math.round(S) },
|
|
3326
|
+
{ type: "v", dy: Math.round(h - i - X - S) },
|
|
3327
|
+
{ type: "h", dx: Math.round(I - T) }
|
|
3323
3328
|
);
|
|
3324
3329
|
}
|
|
3325
3330
|
} else {
|
|
3326
|
-
const
|
|
3327
|
-
if (t.
|
|
3331
|
+
const V = t.polyLineStartDistance || Math.max(Math.min(30, Math.abs(d - n) / 2), 15), X = v > 0 ? V : -V;
|
|
3332
|
+
if (t.placeText === "start" ? (M = n + (v > 0 ? 10 : -50), C = i) : t.placeText === "center" || t.placeText === "middle" ? (M = n + X, C = i + (h - i) / 2) : (M = d - (v > 0 ? 10 : -50), C = h), P.push(
|
|
3328
3333
|
{ type: "M", x: Math.round(n), y: Math.round(i) },
|
|
3329
|
-
{ type: "h", dx: Math.round(
|
|
3330
|
-
{ type: "c", dx1: Math.round(
|
|
3334
|
+
{ type: "h", dx: Math.round(X - T) },
|
|
3335
|
+
{ type: "c", dx1: Math.round(T), dy1: 0, dx2: Math.round(T), dy2: Math.round(S), dx: Math.round(T), dy: Math.round(S) }
|
|
3331
3336
|
), k === "v") {
|
|
3332
|
-
const
|
|
3333
|
-
|
|
3334
|
-
{ type: "v", dy: Math.round(h - i + I -
|
|
3335
|
-
{ type: "h", dx: Math.round(d - n -
|
|
3336
|
-
{ type: "c", dx1: 0, dy1: Math.round(
|
|
3337
|
-
{ type: "v", dy: Math.round(I -
|
|
3337
|
+
const B = Math.min(30, Math.abs(h - i) / 2), I = O > 0 ? -B : B;
|
|
3338
|
+
P.push(
|
|
3339
|
+
{ type: "v", dy: Math.round(h - i + I - S) },
|
|
3340
|
+
{ type: "h", dx: Math.round(d - n - X - T) },
|
|
3341
|
+
{ type: "c", dx1: 0, dy1: Math.round(S), dx2: Math.round(T), dy2: Math.round(S), dx: Math.round(T), dy: Math.round(S) },
|
|
3342
|
+
{ type: "v", dy: Math.round(I - S) }
|
|
3338
3343
|
);
|
|
3339
3344
|
} else
|
|
3340
|
-
|
|
3341
|
-
{ type: "v", dy: Math.round(h - i -
|
|
3342
|
-
{ type: "c", dx1: 0, dy1: Math.round(
|
|
3343
|
-
{ type: "h", dx: Math.round(d - n -
|
|
3345
|
+
P.push(
|
|
3346
|
+
{ type: "v", dy: Math.round(h - i - S * 2) },
|
|
3347
|
+
{ type: "c", dx1: 0, dy1: Math.round(S), dx2: Math.round(T), dy2: Math.round(S), dx: Math.round(T), dy: Math.round(S) },
|
|
3348
|
+
{ type: "h", dx: Math.round(d - n - X - T) }
|
|
3344
3349
|
);
|
|
3345
3350
|
}
|
|
3346
|
-
o.x = M, o.y =
|
|
3347
|
-
const E = xe(
|
|
3351
|
+
o.x = M, o.y = C;
|
|
3352
|
+
const E = xe(P);
|
|
3348
3353
|
return {
|
|
3349
|
-
pathCommands:
|
|
3354
|
+
pathCommands: P,
|
|
3350
3355
|
pathData: E,
|
|
3351
3356
|
textPosition: o,
|
|
3352
3357
|
points: []
|
|
@@ -3356,11 +3361,11 @@ const xe = (s) => !s || s.length === 0 ? "" : s.map((o) => {
|
|
|
3356
3361
|
right: { x: 1, y: 0 },
|
|
3357
3362
|
top: { x: 0, y: -1 },
|
|
3358
3363
|
bottom: { x: 0, y: 1 }
|
|
3359
|
-
},
|
|
3364
|
+
}, Tn = ({
|
|
3360
3365
|
source: s,
|
|
3361
3366
|
sourcePosition: o = "bottom",
|
|
3362
3367
|
target: e
|
|
3363
|
-
}) => o === "left" || o === "right" ? s.x < e.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : s.y < e.y ? { x: 0, y: 1 } : { x: 0, y: -1 },
|
|
3368
|
+
}) => o === "left" || o === "right" ? s.x < e.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : s.y < e.y ? { x: 0, y: 1 } : { x: 0, y: -1 }, ot = (s, o) => Math.sqrt(Math.pow(o.x - s.x, 2) + Math.pow(o.y - s.y, 2));
|
|
3364
3369
|
function We({
|
|
3365
3370
|
source: s,
|
|
3366
3371
|
sourcePosition: o = "bottom",
|
|
@@ -3370,41 +3375,41 @@ function We({
|
|
|
3370
3375
|
sourceOffset: i,
|
|
3371
3376
|
targetOffset: a
|
|
3372
3377
|
}) {
|
|
3373
|
-
const r = De[o], l = De[t], c = { x: s.x + r.x * i, y: s.y + r.y * i }, d = { x: e.x + l.x * a, y: e.y + l.y * a }, h =
|
|
3378
|
+
const r = De[o], l = De[t], c = { x: s.x + r.x * i, y: s.y + r.y * i }, d = { x: e.x + l.x * a, y: e.y + l.y * a }, h = Tn({
|
|
3374
3379
|
source: c,
|
|
3375
3380
|
sourcePosition: o,
|
|
3376
3381
|
target: d
|
|
3377
3382
|
}), f = h.x !== 0 ? "x" : "y", y = h[f];
|
|
3378
3383
|
let u = [], g, m;
|
|
3379
3384
|
const p = { x: 0, y: 0 }, v = { x: 0, y: 0 };
|
|
3380
|
-
let
|
|
3385
|
+
let L = 0;
|
|
3381
3386
|
if (r[f] * l[f] === -1) {
|
|
3382
3387
|
g = n.x, m = n.y;
|
|
3383
|
-
const
|
|
3388
|
+
const O = [
|
|
3384
3389
|
{ x: g, y: c.y },
|
|
3385
3390
|
{ x: g, y: d.y }
|
|
3386
3391
|
], b = [
|
|
3387
3392
|
{ x: c.x, y: m },
|
|
3388
3393
|
{ x: d.x, y: m }
|
|
3389
3394
|
];
|
|
3390
|
-
r[f] === y ? (
|
|
3395
|
+
r[f] === y ? (L = 1.1, u = f === "x" ? O : b) : (L = 1.2, u = f === "x" ? b : O);
|
|
3391
3396
|
} else {
|
|
3392
|
-
const
|
|
3393
|
-
if (f === "x" ? u = r.x === y ? b :
|
|
3394
|
-
|
|
3395
|
-
const
|
|
3396
|
-
if (
|
|
3397
|
-
const
|
|
3398
|
-
r[f] === y ? p[f] = (c[f] > s[f] ? -1 : 1) *
|
|
3397
|
+
const O = [{ x: c.x, y: d.y }], b = [{ x: d.x, y: c.y }];
|
|
3398
|
+
if (f === "x" ? u = r.x === y ? b : O : u = r.y === y ? O : b, o === t) {
|
|
3399
|
+
L = 2.1;
|
|
3400
|
+
const P = Math.abs(s[f] - e[f]), M = r[f] === y ? i : a;
|
|
3401
|
+
if (P <= M) {
|
|
3402
|
+
const C = Math.min(M - 1, M - P);
|
|
3403
|
+
r[f] === y ? p[f] = (c[f] > s[f] ? -1 : 1) * C : v[f] = (d[f] > e[f] ? -1 : 1) * C;
|
|
3399
3404
|
}
|
|
3400
3405
|
}
|
|
3401
3406
|
if (o !== t) {
|
|
3402
|
-
|
|
3403
|
-
const
|
|
3404
|
-
(r[f] === 1 && (!M &&
|
|
3407
|
+
L = 2.2;
|
|
3408
|
+
const P = f === "x" ? "y" : "x", M = r[f] === l[P], C = c[P] > d[P], E = c[P] < d[P];
|
|
3409
|
+
(r[f] === 1 && (!M && C || M && E) || r[f] !== 1 && (!M && E || M && C)) && (u = f === "x" ? O : b);
|
|
3405
3410
|
}
|
|
3406
|
-
const
|
|
3407
|
-
R >= k ? (g = (
|
|
3411
|
+
const T = { x: c.x + p.x, y: c.y + p.y }, S = { x: d.x + v.x, y: d.y + v.y }, R = Math.max(Math.abs(T.x - u[0].x), Math.abs(S.x - u[0].x)), k = Math.max(Math.abs(T.y - u[0].y), Math.abs(S.y - u[0].y));
|
|
3412
|
+
R >= k ? (g = (T.x + S.x) / 2, m = u[0].y) : (g = u[0].x, m = (T.y + S.y) / 2);
|
|
3408
3413
|
}
|
|
3409
3414
|
return [[
|
|
3410
3415
|
s,
|
|
@@ -3412,7 +3417,7 @@ function We({
|
|
|
3412
3417
|
...u,
|
|
3413
3418
|
{ x: d.x + v.x, y: d.y + v.y },
|
|
3414
3419
|
e
|
|
3415
|
-
], g, m, 0, 0,
|
|
3420
|
+
], g, m, 0, 0, L];
|
|
3416
3421
|
}
|
|
3417
3422
|
const Ae = (s) => {
|
|
3418
3423
|
const o = [];
|
|
@@ -3431,8 +3436,8 @@ const Ae = (s) => {
|
|
|
3431
3436
|
}
|
|
3432
3437
|
return o.filter((e) => e.merged !== !0);
|
|
3433
3438
|
};
|
|
3434
|
-
function
|
|
3435
|
-
const n = Math.min(
|
|
3439
|
+
function Pn(s, o, e, t) {
|
|
3440
|
+
const n = Math.min(ot(s, o) / 2, ot(o, e) / 2, t), { x: i, y: a } = o;
|
|
3436
3441
|
if (s.x === i && i === e.x || s.y === a && a === e.y)
|
|
3437
3442
|
return [{ type: "L", x: i, y: a }];
|
|
3438
3443
|
if (s.y === a) {
|
|
@@ -3470,13 +3475,13 @@ const Mt = (s, o) => {
|
|
|
3470
3475
|
let a = i.x === t.x ? 0 : i.x < t.x ? -1 : 1, r = i.y === t.y ? 0 : i.y < t.y ? -1 : 1;
|
|
3471
3476
|
s.length === 2 && (a = 0, r = 0), e.push({ type: "l", dx: Math.round(t.x - i.x + o * a), dy: Math.round(t.y - i.y + o * r) });
|
|
3472
3477
|
} else {
|
|
3473
|
-
const i =
|
|
3478
|
+
const i = Pn(s[n - 1], t, s[n + 1], o);
|
|
3474
3479
|
e.push(...i);
|
|
3475
3480
|
}
|
|
3476
3481
|
}), e;
|
|
3477
3482
|
};
|
|
3478
3483
|
var ge = /* @__PURE__ */ ((s) => (s.border = "border", s.ltrb = "ltrb", s.tb = "tb", s.lr = "lr", s.left = "left", s.right = "right", s.top = "top", s.bottom = "bottom", s))(ge || {});
|
|
3479
|
-
const Ve = (s, o, e, t, n, i, a, r) => s === "left" ? "left" : s === "right" ? "right" : s === "top" ? "top" : s === "bottom" ? "bottom" : s === "horizontalLine" ? t ? i > r ? "bottom" : "top" : i < r ? "bottom" : "top" : s === "verticalLine" ? t ? n > a ? "right" : "left" : n < a ? "right" : "left" : o === 1 ? "right" : o === -1 ? "left" : e === 1 ? "bottom" : e === -1 ? "top" : "left",
|
|
3484
|
+
const Ve = (s, o, e, t, n, i, a, r) => s === "left" ? "left" : s === "right" ? "right" : s === "top" ? "top" : s === "bottom" ? "bottom" : s === "horizontalLine" ? t ? i > r ? "bottom" : "top" : i < r ? "bottom" : "top" : s === "verticalLine" ? t ? n > a ? "right" : "left" : n < a ? "right" : "left" : o === 1 ? "right" : o === -1 ? "left" : e === 1 ? "bottom" : e === -1 ? "top" : "left", st = (s) => s === "left" ? "right" : s === "right" ? "left" : s === "top" ? "bottom" : s === "bottom" ? "top" : "left", Rt = (s) => {
|
|
3480
3485
|
if (s.length < 2)
|
|
3481
3486
|
throw new Error("At least two points are required to form a polyline.");
|
|
3482
3487
|
let o = 0;
|
|
@@ -3493,90 +3498,97 @@ const Ve = (s, o, e, t, n, i, a, r) => s === "left" ? "left" : s === "right" ? "
|
|
|
3493
3498
|
return { x: h, y: f };
|
|
3494
3499
|
}
|
|
3495
3500
|
return { x: 0, y: 0 };
|
|
3496
|
-
},
|
|
3497
|
-
const { line: t, fromJunctionPoint: n, toJunctionPoint: i, lineDirection: a, lineShape: r, fx: l, fy: c, fcx: d, fcy: h, f_W: f, f_H: y, tx: u, ty: g, tcx: m, tcy: p, t_W: v, t_H:
|
|
3498
|
-
let b = N > 1 ? 1 : N < -1 ? -1 : 0,
|
|
3499
|
-
Math.abs(b) === 1 && Math.abs(
|
|
3500
|
-
const
|
|
3501
|
-
let k =
|
|
3502
|
-
Math.abs(k) === 1 && Math.abs(
|
|
3503
|
-
const M = Ve(n, b,
|
|
3501
|
+
}, Sn = (s, o = { x: 0, y: 0, rotate: 0 }, e = {}) => {
|
|
3502
|
+
const { line: t, fromJunctionPoint: n, toJunctionPoint: i, lineDirection: a, lineShape: r, fx: l, fy: c, fcx: d, fcy: h, f_W: f, f_H: y, tx: u, ty: g, tcx: m, tcy: p, t_W: v, t_H: L } = s, N = l - d, O = c - h;
|
|
3503
|
+
let b = N > 1 ? 1 : N < -1 ? -1 : 0, T = O > 1 ? 1 : O < -1 ? -1 : 0;
|
|
3504
|
+
Math.abs(b) === 1 && Math.abs(T) === 1 && (Math.abs(N) > Math.abs(O) ? T = 0 : b = 0), b === 0 && T === 0 && (b = 1);
|
|
3505
|
+
const S = u - m, R = g - p;
|
|
3506
|
+
let k = S > 1 ? 1 : S < -1 ? -1 : 0, P = R > 1 ? 1 : R < -1 ? -1 : 0;
|
|
3507
|
+
Math.abs(k) === 1 && Math.abs(P) === 1 && (Math.abs(S) > Math.abs(R) ? P = 0 : k = 0), k === 0 && P === 0 && (b = -1);
|
|
3508
|
+
const M = Ve(n, b, T, !1, l, c, u, g), C = Ve(i, k, P, !0, l, c, u, g), E = M, V = C, X = l + (u - l) / 2, B = c + (g - c) / 2;
|
|
3504
3509
|
let I = { x: 0, y: 0 }, W = 30, U = 30;
|
|
3505
3510
|
t.ctrlOptionsFor44 && (I = { x: t.ctrlOptionsFor44.cx, y: t.ctrlOptionsFor44.cy }, W += t.ctrlOptionsFor44.fd, U += t.ctrlOptionsFor44.td);
|
|
3506
|
-
const
|
|
3511
|
+
const ie = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0, [te] = We({
|
|
3507
3512
|
source: { x: l, y: c },
|
|
3508
3513
|
sourcePosition: E,
|
|
3509
3514
|
target: { x: u, y: g },
|
|
3510
|
-
targetPosition:
|
|
3515
|
+
targetPosition: V,
|
|
3511
3516
|
center: {
|
|
3512
|
-
x:
|
|
3513
|
-
y:
|
|
3517
|
+
x: X + I.x,
|
|
3518
|
+
y: B + I.y
|
|
3514
3519
|
},
|
|
3515
3520
|
sourceOffset: W,
|
|
3516
3521
|
targetOffset: U
|
|
3517
|
-
}),
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3522
|
+
}), de = Ae(te), ae = Mt(de, ie), oe = xe(ae), he = Rt(te);
|
|
3523
|
+
if (o.x = he.x, o.y = he.y, a === "v") {
|
|
3524
|
+
const ne = O > 1 ? 1 : O < -1 ? -1 : 0, G = R > 1 ? 1 : R < -1 ? -1 : 0;
|
|
3525
|
+
t.placeText === "start" ? (o.x = l, o.y = c + ne * 10) : t.placeText === "end" && (o.x = u, o.y = g + G * 10);
|
|
3526
|
+
} else {
|
|
3527
|
+
const ne = N > 1 ? 1 : N < -1 ? -1 : 0, G = S > 1 ? 1 : S < -1 ? -1 : 0;
|
|
3528
|
+
t.placeText === "start" ? (o.x = l + ne * 10, o.y = c) : t.placeText === "end" && (o.x = u + G * 10, o.y = g);
|
|
3529
|
+
}
|
|
3530
|
+
return {
|
|
3531
|
+
pathCommands: ae,
|
|
3532
|
+
pathData: oe,
|
|
3521
3533
|
textPosition: o,
|
|
3522
|
-
points:
|
|
3534
|
+
points: de,
|
|
3523
3535
|
startDirection: E,
|
|
3524
|
-
endDirection:
|
|
3536
|
+
endDirection: V
|
|
3525
3537
|
};
|
|
3526
3538
|
}, Mn = (s, o = { x: 0, y: 0, rotate: 0 }, e = {}) => {
|
|
3527
|
-
const { line: t, fromJunctionPoint: n, toJunctionPoint: i, lineDirection: a, lineShape: r, fx: l, fy: c, fcx: d, fcy: h, f_W: f, f_H: y, tx: u, ty: g, tcx: m, tcy: p, t_W: v, t_H:
|
|
3528
|
-
let b = N > 3 ? 1 : N < -3 ? -1 : 0,
|
|
3529
|
-
Math.abs(b) === 1 && Math.abs(
|
|
3530
|
-
const
|
|
3531
|
-
let k =
|
|
3532
|
-
Math.abs(k) === 1 && Math.abs(
|
|
3533
|
-
let M = Ve(n, b,
|
|
3534
|
-
const E = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0,
|
|
3535
|
-
let
|
|
3539
|
+
const { line: t, fromJunctionPoint: n, toJunctionPoint: i, lineDirection: a, lineShape: r, fx: l, fy: c, fcx: d, fcy: h, f_W: f, f_H: y, tx: u, ty: g, tcx: m, tcy: p, t_W: v, t_H: L } = s, N = l - d, O = c - h;
|
|
3540
|
+
let b = N > 3 ? 1 : N < -3 ? -1 : 0, T = O > 3 ? 1 : O < -3 ? -1 : 0;
|
|
3541
|
+
Math.abs(b) === 1 && Math.abs(T) === 1 && (Math.abs(N) > Math.abs(O) ? T = 0 : b = 0), b === 0 && T === 0 && (b = 1);
|
|
3542
|
+
const S = u - m, R = g - p;
|
|
3543
|
+
let k = S > 3 ? 1 : S < -3 ? -1 : 0, P = R > 3 ? 1 : R < -3 ? -1 : 0;
|
|
3544
|
+
Math.abs(k) === 1 && Math.abs(P) === 1 && (Math.abs(S) > Math.abs(R) ? P = 0 : k = 0), k === 0 && P === 0 && (b = -1);
|
|
3545
|
+
let M = Ve(n, b, T, !1, l, c, u, g), C = Ve(i, k, P, !0, l, c, u, g);
|
|
3546
|
+
const E = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0, V = t.ctrlPointsFor49;
|
|
3547
|
+
let X = {
|
|
3536
3548
|
x: Math.round(l),
|
|
3537
3549
|
y: Math.round(c)
|
|
3538
|
-
},
|
|
3550
|
+
}, B = {
|
|
3539
3551
|
x: Math.round(u),
|
|
3540
3552
|
y: Math.round(g)
|
|
3541
3553
|
}, I = {
|
|
3542
|
-
x: Math.round(
|
|
3543
|
-
y: Math.round(
|
|
3554
|
+
x: Math.round(V[0].x),
|
|
3555
|
+
y: Math.round(V[0].y)
|
|
3544
3556
|
}, W = {
|
|
3545
|
-
x: Math.round(
|
|
3546
|
-
y: Math.round(
|
|
3547
|
-
}, U = [...
|
|
3548
|
-
if (t.isReverse && ([M,
|
|
3549
|
-
const
|
|
3550
|
-
source:
|
|
3557
|
+
x: Math.round(V[V.length - 1].x),
|
|
3558
|
+
y: Math.round(V[V.length - 1].y)
|
|
3559
|
+
}, U = [...V];
|
|
3560
|
+
if (t.isReverse && ([M, C] = [C, M]), Math.abs(X.x - I.x) > 3 || Math.abs(X.y - I.y) > 3) {
|
|
3561
|
+
const oe = X.x + (I.x - X.x) / 2, he = X.y + (I.y - X.y) / 2, ne = st(M), [G] = We({
|
|
3562
|
+
source: X,
|
|
3551
3563
|
sourcePosition: M,
|
|
3552
3564
|
target: I,
|
|
3553
|
-
targetPosition:
|
|
3554
|
-
center: { x:
|
|
3565
|
+
targetPosition: ne,
|
|
3566
|
+
center: { x: oe, y: he },
|
|
3555
3567
|
sourceOffset: 20,
|
|
3556
3568
|
targetOffset: 5
|
|
3557
3569
|
});
|
|
3558
|
-
U = Ae([...
|
|
3570
|
+
U = Ae([...G, ...U]);
|
|
3559
3571
|
}
|
|
3560
|
-
if (Math.abs(
|
|
3561
|
-
const
|
|
3572
|
+
if (Math.abs(B.x - W.x) > 3 || Math.abs(B.y - W.y) > 3) {
|
|
3573
|
+
const oe = W.x + (B.x - W.x) / 2, he = W.y + (B.y - W.y) / 2, ne = st(C), [G] = We({
|
|
3562
3574
|
source: W,
|
|
3563
|
-
sourcePosition:
|
|
3564
|
-
target:
|
|
3565
|
-
targetPosition:
|
|
3566
|
-
center: { x:
|
|
3575
|
+
sourcePosition: ne,
|
|
3576
|
+
target: B,
|
|
3577
|
+
targetPosition: C,
|
|
3578
|
+
center: { x: oe, y: he },
|
|
3567
3579
|
sourceOffset: 5,
|
|
3568
3580
|
targetOffset: 20
|
|
3569
3581
|
});
|
|
3570
|
-
U = Ae([...U, ...
|
|
3582
|
+
U = Ae([...U, ...G]);
|
|
3571
3583
|
}
|
|
3572
|
-
const
|
|
3573
|
-
return o.x =
|
|
3584
|
+
const ie = U, te = Mt(ie, E), de = xe(te), ae = Rt(V);
|
|
3585
|
+
return o.x = ae.x, o.y = ae.y, {
|
|
3574
3586
|
pathCommands: [],
|
|
3575
|
-
pathData:
|
|
3587
|
+
pathData: de,
|
|
3576
3588
|
textPosition: o,
|
|
3577
|
-
points:
|
|
3589
|
+
points: ie,
|
|
3578
3590
|
startDirection: M,
|
|
3579
|
-
endDirection:
|
|
3591
|
+
endDirection: C
|
|
3580
3592
|
};
|
|
3581
3593
|
}, Rn = (s, o = { x: 0, y: 0, rotate: 0 }) => {
|
|
3582
3594
|
const {
|
|
@@ -3591,38 +3603,38 @@ const Ve = (s, o, e, t, n, i, a, r) => s === "left" ? "left" : s === "right" ? "
|
|
|
3591
3603
|
tcx: d,
|
|
3592
3604
|
tcy: h
|
|
3593
3605
|
} = s, f = l - n, y = c - i;
|
|
3594
|
-
let u = n - a, g = i - r, m = l - d, p = c - h, { fromJunctionPoint: v, toJunctionPoint:
|
|
3595
|
-
e.isReverse && ([v,
|
|
3596
|
-
const N = Math.min(200, Math.max(100, Math.abs(f / 2))),
|
|
3597
|
-
let
|
|
3598
|
-
const R = m / (Math.abs(m) + Math.abs(p)) * N + f, k = p / (Math.abs(m) + Math.abs(p)) *
|
|
3599
|
-
let
|
|
3600
|
-
e.ctrlPoints && e.ctrlPoints.length > 0 && (e.isReverse ? (
|
|
3601
|
-
const M = { x: n +
|
|
3606
|
+
let u = n - a, g = i - r, m = l - d, p = c - h, { fromJunctionPoint: v, toJunctionPoint: L } = e;
|
|
3607
|
+
e.isReverse && ([v, L] = [L, v]), (v === j.left || v === j.right) && (g = 0), (v === j.top || v === j.bottom) && (u = 0), (L === j.left || L === j.right) && (p = 0), (L === j.top || L === j.bottom) && (m = 0);
|
|
3608
|
+
const N = Math.min(200, Math.max(100, Math.abs(f / 2))), O = Math.min(200, Math.max(100, Math.abs(y / 2))), b = u / (Math.abs(u) + Math.abs(g)) * N, T = g / (Math.abs(u) + Math.abs(g)) * O;
|
|
3609
|
+
let S = { x: b, y: T };
|
|
3610
|
+
const R = m / (Math.abs(m) + Math.abs(p)) * N + f, k = p / (Math.abs(m) + Math.abs(p)) * O + y;
|
|
3611
|
+
let P = { x: R, y: k };
|
|
3612
|
+
e.ctrlPoints && e.ctrlPoints.length > 0 && (e.isReverse ? (S.x += e.ctrlPoints[1].x, S.y += e.ctrlPoints[1].y, P.x += e.ctrlPoints[0].x, P.y += e.ctrlPoints[0].y) : (S.x += e.ctrlPoints[0].x, S.y += e.ctrlPoints[0].y, P.x += e.ctrlPoints[1].x, P.y += e.ctrlPoints[1].y));
|
|
3613
|
+
const M = { x: n + S.x, y: i + S.y }, C = { x: n + P.x, y: i + P.y }, E = { x: n + f, y: i + y }, V = [
|
|
3602
3614
|
{ type: "M", x: n, y: i },
|
|
3603
3615
|
{
|
|
3604
3616
|
type: "c",
|
|
3605
|
-
dx1:
|
|
3606
|
-
dy1:
|
|
3607
|
-
dx2:
|
|
3608
|
-
dy2:
|
|
3617
|
+
dx1: S.x,
|
|
3618
|
+
dy1: S.y,
|
|
3619
|
+
dx2: P.x,
|
|
3620
|
+
dy2: P.y,
|
|
3609
3621
|
dx: f,
|
|
3610
3622
|
dy: y
|
|
3611
3623
|
}
|
|
3612
3624
|
];
|
|
3613
|
-
t === 8 &&
|
|
3614
|
-
const
|
|
3625
|
+
t === 8 && V.push({ type: "Z" });
|
|
3626
|
+
const X = kt(
|
|
3615
3627
|
{ x: n, y: i },
|
|
3616
3628
|
M,
|
|
3617
|
-
|
|
3629
|
+
C,
|
|
3618
3630
|
E,
|
|
3619
3631
|
t < 6 ? 0.8 : 0.5
|
|
3620
3632
|
);
|
|
3621
|
-
o.x =
|
|
3622
|
-
const
|
|
3633
|
+
o.x = X.x, o.y = X.y;
|
|
3634
|
+
const B = xe(V);
|
|
3623
3635
|
return {
|
|
3624
|
-
pathCommands:
|
|
3625
|
-
pathData:
|
|
3636
|
+
pathCommands: V,
|
|
3637
|
+
pathData: B,
|
|
3626
3638
|
textPosition: o,
|
|
3627
3639
|
points: []
|
|
3628
3640
|
};
|
|
@@ -3648,38 +3660,38 @@ const Ve = (s, o, e, t, n, i, a, r) => s === "left" ? "left" : s === "right" ? "
|
|
|
3648
3660
|
tcy: m,
|
|
3649
3661
|
t_W: p,
|
|
3650
3662
|
t_H: v
|
|
3651
|
-
} = s,
|
|
3652
|
-
let
|
|
3653
|
-
if (a ===
|
|
3654
|
-
|
|
3655
|
-
else if (a ===
|
|
3656
|
-
|
|
3657
|
-
else if (a ===
|
|
3658
|
-
|
|
3659
|
-
else if (a ===
|
|
3660
|
-
const
|
|
3661
|
-
|
|
3662
|
-
const
|
|
3663
|
-
E = { x:
|
|
3664
|
-
}
|
|
3665
|
-
const
|
|
3663
|
+
} = s, L = y - r, N = u - l, O = y > r ? 1 : -1, b = u > l ? 1 : -1, T = i === "v" ? b : O, S = r - c, R = l - d, k = y - g, P = u - m, M = 1 / (t + 1) * (n + 1);
|
|
3664
|
+
let C = { x: 0, y: 0 }, E = { x: 0, y: 0 };
|
|
3665
|
+
if (a === F.Curve2)
|
|
3666
|
+
C = i === "v" ? { x: 0, y: T * 30 } : { x: T * 30, y: 0 }, E = i === "v" ? { x: L * M, y: T * -10 } : { x: T * -10, y: N * M };
|
|
3667
|
+
else if (a === F.Curve3)
|
|
3668
|
+
C = i === "v" ? { x: 0, y: N * M } : { x: T * 30, y: 0 }, E = i === "v" ? { x: 0, y: 0 } : { x: T * -10, y: N * M };
|
|
3669
|
+
else if (a === F.Curve5)
|
|
3670
|
+
C = { x: 0, y: 0 }, E = i === "v" ? { x: 0, y: N * M } : { x: L * M, y: 0 };
|
|
3671
|
+
else if (a === F.Curve7 || a === F.Curve8) {
|
|
3672
|
+
const de = S / (Math.abs(S) + Math.abs(R)) * 30, ae = R / (Math.abs(S) + Math.abs(R)) * 30;
|
|
3673
|
+
C = { x: de, y: ae };
|
|
3674
|
+
const oe = k / (Math.abs(k) + Math.abs(P)) * 30 + L, he = P / (Math.abs(k) + Math.abs(P)) * 30 + N;
|
|
3675
|
+
E = { x: oe, y: he };
|
|
3676
|
+
}
|
|
3677
|
+
const V = { x: r + C.x, y: l + C.y }, X = { x: r + E.x, y: l + E.y }, B = { x: r + L, y: l + N }, I = [
|
|
3666
3678
|
{ type: "M", x: r, y: l },
|
|
3667
3679
|
{
|
|
3668
3680
|
type: "c",
|
|
3669
|
-
dx1:
|
|
3670
|
-
dy1:
|
|
3681
|
+
dx1: C.x,
|
|
3682
|
+
dy1: C.y,
|
|
3671
3683
|
dx2: E.x,
|
|
3672
3684
|
dy2: E.y,
|
|
3673
|
-
dx:
|
|
3685
|
+
dx: L,
|
|
3674
3686
|
dy: N
|
|
3675
3687
|
}
|
|
3676
3688
|
];
|
|
3677
3689
|
a === 8 && I.push({ type: "Z" });
|
|
3678
3690
|
const W = kt(
|
|
3679
3691
|
{ x: r, y: l },
|
|
3680
|
-
A,
|
|
3681
3692
|
V,
|
|
3682
|
-
|
|
3693
|
+
X,
|
|
3694
|
+
B,
|
|
3683
3695
|
a < 6 ? 0.8 : 0.5
|
|
3684
3696
|
);
|
|
3685
3697
|
o.x = W.x, o.y = W.y;
|
|
@@ -3866,9 +3878,10 @@ class ke extends En {
|
|
|
3866
3878
|
this.commits = this.resetCommints(), this.updateViewHook(e);
|
|
3867
3879
|
}
|
|
3868
3880
|
updateOptions(e) {
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3881
|
+
var t;
|
|
3882
|
+
if (x("RGDataProvider:updateOptions:", e), e.layout && console.log("RGDataProvider:updateOptions:layout:", (t = e.layout) == null ? void 0 : t.layoutName, e.layout), Object.assign(this.options, e), this.isPerformanceMode() && !this.options.showEasyView) {
|
|
3883
|
+
const n = Object.keys(e);
|
|
3884
|
+
console.log("changedKeys:", n.join(",")), n.includes("canvasZoom") && (this.commits.nodesListChanged = !0, this.commits.linesListChanged = !0), n.includes("viewSize") && (this.commits.nodesListChanged = !0, this.commits.linesListChanged = !0), n.includes("canvasOffset") && (this.commits.nodesListChanged = !0, this.commits.linesListChanged = !0);
|
|
3872
3885
|
}
|
|
3873
3886
|
this.commits.optionsChanged = !0;
|
|
3874
3887
|
}
|
|
@@ -3970,7 +3983,7 @@ class ke extends En {
|
|
|
3970
3983
|
const t = this.runtimeDATA4ConnectTargets.findIndex((n) => n.targetId === e);
|
|
3971
3984
|
if (t !== -1) {
|
|
3972
3985
|
const n = this.runtimeDATA4ConnectTargets[t];
|
|
3973
|
-
(n.targetType ===
|
|
3986
|
+
(n.targetType === A.NodePoint || n.targetType === A.CanvasPoint) && this.runtimeDATA4ConnectTargets.splice(t, 1);
|
|
3974
3987
|
}
|
|
3975
3988
|
this.commits.connectTargetsListChanged = !0;
|
|
3976
3989
|
}
|
|
@@ -3996,12 +4009,12 @@ class ke extends En {
|
|
|
3996
4009
|
for (let n = 0; n < this.graphData.fakeLines.length; n++) {
|
|
3997
4010
|
const i = this.graphData.fakeLines[n];
|
|
3998
4011
|
let a = !1;
|
|
3999
|
-
if (i.fromType ===
|
|
4012
|
+
if (i.fromType === A.Node && e.includes(i.from))
|
|
4000
4013
|
a = !0;
|
|
4001
|
-
else if (i.fromType ===
|
|
4014
|
+
else if (i.fromType === A.CanvasPoint || i.fromType === A.NodePoint) {
|
|
4002
4015
|
const r = this.getConnectTargetById(i.from);
|
|
4003
4016
|
r && r.nodeId && e.includes(r.nodeId) && (a = !0);
|
|
4004
|
-
} else if (i.toType ===
|
|
4017
|
+
} else if (i.toType === A.CanvasPoint || i.toType === A.NodePoint) {
|
|
4005
4018
|
const r = this.getConnectTargetById(i.to);
|
|
4006
4019
|
r && r.nodeId && e.includes(r.nodeId) && (a = !0);
|
|
4007
4020
|
}
|
|
@@ -4014,12 +4027,12 @@ class ke extends En {
|
|
|
4014
4027
|
}
|
|
4015
4028
|
addFakeLines(e) {
|
|
4016
4029
|
for (const t of e)
|
|
4017
|
-
if (t.id || console.warn("Must have id for fake line:", t), this.graphData.fakeLines.some((n) => n.id === t.id))
|
|
4018
|
-
console.
|
|
4030
|
+
if (t.id || console.warn("[relation-graph]Must have id for fake line:", t), this.graphData.fakeLines.some((n) => n.id === t.id))
|
|
4031
|
+
console.log("[relation-graph]Ignore duplicate fake line id:", t.id);
|
|
4019
4032
|
else {
|
|
4020
4033
|
t.isFakeLine = !0;
|
|
4021
4034
|
const n = me(t, this.options);
|
|
4022
|
-
n.
|
|
4035
|
+
n.id || (n.id = $e(6)), this.graphData.fakeLines.push(n);
|
|
4023
4036
|
}
|
|
4024
4037
|
this.commits.fakeLinesListChanged = !0;
|
|
4025
4038
|
}
|
|
@@ -4057,7 +4070,7 @@ class ke extends En {
|
|
|
4057
4070
|
}
|
|
4058
4071
|
const i = t.hidden !== void 0 && n.hidden !== t.hidden;
|
|
4059
4072
|
if (Object.assign(n, t, { id: e }), i) {
|
|
4060
|
-
const a =
|
|
4073
|
+
const a = z.getDescendantNodes(n);
|
|
4061
4074
|
this.updateNodesVisibleProperty([n].concat(a));
|
|
4062
4075
|
}
|
|
4063
4076
|
this.commitNode(e);
|
|
@@ -4115,7 +4128,7 @@ class ke extends En {
|
|
|
4115
4128
|
let t = !1;
|
|
4116
4129
|
e || (e = this.getNodes(), t = !0);
|
|
4117
4130
|
for (const n of e) {
|
|
4118
|
-
const i =
|
|
4131
|
+
const i = z.isVisibleNode(n);
|
|
4119
4132
|
n.rgCalcedVisibility !== i && (n.rgCalcedVisibility = i, this.commitNode(n.id));
|
|
4120
4133
|
}
|
|
4121
4134
|
for (const n of this.runtimeDATA4Links)
|
|
@@ -4456,7 +4469,7 @@ class Bn extends ke {
|
|
|
4456
4469
|
class Gn extends ke {
|
|
4457
4470
|
constructor(o, e) {
|
|
4458
4471
|
super(), e(), this.updateViewHook = (t) => {
|
|
4459
|
-
if (t.optionsChanged && o.store4Options.set(this.getOptions()), t.nodesListChanged || t.changedNodes.length > 0) {
|
|
4472
|
+
if (t.optionsChanged && o.store4Options.set(this.getOptions()), t.linesListChanged || t.changedLines.length > 0 || t.nodesListChanged || t.changedNodes.length > 0) {
|
|
4460
4473
|
const n = this.getShouldRenderNodes();
|
|
4461
4474
|
o.store4ShouldRenderNodes.set([...n]);
|
|
4462
4475
|
}
|
|
@@ -4555,6 +4568,33 @@ class Yn extends Fn {
|
|
|
4555
4568
|
getLinks() {
|
|
4556
4569
|
return this.dataProvider.getLinks();
|
|
4557
4570
|
}
|
|
4571
|
+
_getAllLinks() {
|
|
4572
|
+
const o = this.getLinks();
|
|
4573
|
+
return this._getFakeLineLinks().concat(o);
|
|
4574
|
+
}
|
|
4575
|
+
getNodeByTargetId(o) {
|
|
4576
|
+
const e = this.dataProvider.getConnectTargetById(o);
|
|
4577
|
+
if (e && e.nodeId)
|
|
4578
|
+
return this.getNodeById(e.nodeId);
|
|
4579
|
+
}
|
|
4580
|
+
_getFakeLineLinks() {
|
|
4581
|
+
const o = [];
|
|
4582
|
+
for (const e of this.getFakeLines())
|
|
4583
|
+
if (!e.forDisplayOnly && (e.fromType === A.Node || e.fromType === A.NodePoint || e.fromType === A.CanvasPoint) && (e.toType === A.Node || e.toType === A.NodePoint || e.toType === A.CanvasPoint)) {
|
|
4584
|
+
let t = null, n = null;
|
|
4585
|
+
e.fromType === A.Node ? t = this.getNodeById(e.from) : (e.fromType === A.NodePoint || e.fromType === A.CanvasPoint) && (t = this.getNodeByTargetId(e.from)), e.toType === A.Node ? n = this.getNodeById(e.to) : (e.toType === A.NodePoint || e.toType === A.CanvasPoint) && (n = this.getNodeByTargetId(e.to)), t && n && o.push({
|
|
4586
|
+
lineId: e.id,
|
|
4587
|
+
line: e,
|
|
4588
|
+
fromNode: t,
|
|
4589
|
+
toNode: n,
|
|
4590
|
+
totalLinesBetweenNodes: 1,
|
|
4591
|
+
currentLineIndex: 0,
|
|
4592
|
+
rgShouldRender: !0,
|
|
4593
|
+
rgCalcedVisibility: !0
|
|
4594
|
+
});
|
|
4595
|
+
}
|
|
4596
|
+
return o;
|
|
4597
|
+
}
|
|
4558
4598
|
getConnectTargets() {
|
|
4559
4599
|
return this.dataProvider.getConnectTargets();
|
|
4560
4600
|
}
|
|
@@ -4578,23 +4618,30 @@ class Hn extends Yn {
|
|
|
4578
4618
|
getLinesBetweenNodes(o) {
|
|
4579
4619
|
return this.getLinksBetweenNodes(o).map((e) => e.line);
|
|
4580
4620
|
}
|
|
4581
|
-
getNodeRelatedNodes(o
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4621
|
+
getNodeRelatedNodes(o, e = {
|
|
4622
|
+
incoming: !0,
|
|
4623
|
+
outgoing: !0
|
|
4624
|
+
}) {
|
|
4625
|
+
const t = [];
|
|
4626
|
+
for (const n of this.getLinks()) {
|
|
4627
|
+
if (n.line.forDisplayOnly)
|
|
4628
|
+
continue;
|
|
4629
|
+
const { fromNode: i, toNode: a } = n;
|
|
4630
|
+
e.outgoing && i === o && (t.includes(a) || t.push(a)), e.incoming && a === o && (t.includes(i) || t.push(i));
|
|
4631
|
+
}
|
|
4632
|
+
for (const n of this._getFakeLineLinks()) {
|
|
4633
|
+
if (n.line.forDisplayOnly)
|
|
4634
|
+
continue;
|
|
4635
|
+
const { fromNode: i, toNode: a } = n;
|
|
4636
|
+
e.outgoing && i === o && (t.includes(a) || t.push(a)), e.incoming && a === o && (t.includes(i) || t.push(i));
|
|
4637
|
+
}
|
|
4638
|
+
return t;
|
|
4586
4639
|
}
|
|
4587
4640
|
getNodeIncomingNodes(o) {
|
|
4588
|
-
|
|
4589
|
-
for (const t of this.getLinks())
|
|
4590
|
-
t.line.forDisplayOnly || t.toNode === o && (e.includes(t.fromNode) || e.push(t.fromNode));
|
|
4591
|
-
return e;
|
|
4641
|
+
return this.getNodeRelatedNodes(o, { incoming: !0, outgoing: !1 });
|
|
4592
4642
|
}
|
|
4593
4643
|
getNodeOutgoingNodes(o) {
|
|
4594
|
-
|
|
4595
|
-
for (const t of this.getLinks())
|
|
4596
|
-
t.line.forDisplayOnly || t.fromNode === o && (e.includes(t.toNode) || e.push(t.toNode));
|
|
4597
|
-
return e;
|
|
4644
|
+
return this.getNodeRelatedNodes(o, { incoming: !1, outgoing: !0 });
|
|
4598
4645
|
}
|
|
4599
4646
|
findGroupNodes(o, e = []) {
|
|
4600
4647
|
return this._getNetworkNodesByNode(o, e);
|
|
@@ -4656,7 +4703,7 @@ class Hn extends Yn {
|
|
|
4656
4703
|
};
|
|
4657
4704
|
}
|
|
4658
4705
|
getDescendantNodes(o) {
|
|
4659
|
-
return
|
|
4706
|
+
return z.getDescendantNodes(o);
|
|
4660
4707
|
}
|
|
4661
4708
|
getNodesInSelectionView(o) {
|
|
4662
4709
|
const e = this.getCanvasXyByViewXy({
|
|
@@ -4688,6 +4735,7 @@ class Wn extends Hn {
|
|
|
4688
4735
|
_(this, "_canvasCurrentInfo", { x: 0, y: 0, scale: 1 });
|
|
4689
4736
|
_(this, "_nodeResizeEffectTimer");
|
|
4690
4737
|
_(this, "prevAddNodeTimestamp", 0);
|
|
4738
|
+
_(this, "_nodesElSizeMap", /* @__PURE__ */ new Map());
|
|
4691
4739
|
}
|
|
4692
4740
|
removeLine(e) {
|
|
4693
4741
|
this.removeLines([e]);
|
|
@@ -4803,7 +4851,7 @@ class Wn extends Hn {
|
|
|
4803
4851
|
}
|
|
4804
4852
|
addElementLines(e) {
|
|
4805
4853
|
x("addElementLines:", e), e.forEach((t) => {
|
|
4806
|
-
t.fromType =
|
|
4854
|
+
t.fromType = A.HTMLElementId, t.toType = A.HTMLElementId, t.isFakeLine = !0, t.id || (t.id = this.generateNewUUID(6)), t.forDisplayOnly = !0;
|
|
4807
4855
|
}), this.addFakeLines(e), console.log("addElementLines:", e.length, e), this.updateElementLines();
|
|
4808
4856
|
}
|
|
4809
4857
|
updateNodeOffsetSize(e, t, n) {
|
|
@@ -4824,7 +4872,7 @@ class Wn extends Hn {
|
|
|
4824
4872
|
clearElementLines() {
|
|
4825
4873
|
const e = [];
|
|
4826
4874
|
for (const t of this.getFakeLines())
|
|
4827
|
-
(t.fromType ===
|
|
4875
|
+
(t.fromType === A.HTMLElementId || t.toType === A.HTMLElementId) && e.push(t.id);
|
|
4828
4876
|
this.dataProvider.removeFakeLineByIds(e), this._dataUpdated();
|
|
4829
4877
|
}
|
|
4830
4878
|
_addNodes(e) {
|
|
@@ -4838,7 +4886,7 @@ class Wn extends Hn {
|
|
|
4838
4886
|
let r = t[a.id];
|
|
4839
4887
|
if (!r) {
|
|
4840
4888
|
let { text: l, id: c } = a;
|
|
4841
|
-
!l && a.label && (l = a.label, console.warn('Use "label" as "text":', a.label)), !l && c && (l = c, console.warn('Use "id" as "text":', c)), r =
|
|
4889
|
+
!l && a.label && (l = a.label, console.warn('Use "label" as "text":', a.label)), !l && c && (l = c, console.warn('Use "id" as "text":', c)), r = Se(Object.assign({}, a, { text: l }), i, this._nodesElSizeMap), this._initRawPropertyFn && this._initRawPropertyFn(r, "lot", r.lot), r && (t[r.id] = r, n.push(r));
|
|
4842
4890
|
}
|
|
4843
4891
|
}), this.dataProvider.addNodes(n), n.length > 0 && (this.prevAddNodeTimestamp = Date.now());
|
|
4844
4892
|
}
|
|
@@ -4902,15 +4950,19 @@ class Wn extends Hn {
|
|
|
4902
4950
|
this.dataProvider.updateFakeLine(typeof e == "string" ? e : e.id, t), this._dataUpdated();
|
|
4903
4951
|
}
|
|
4904
4952
|
flatNodeData(e, t, n, i) {
|
|
4905
|
-
|
|
4953
|
+
z.flatNodeData(e, t, n, i);
|
|
4954
|
+
}
|
|
4955
|
+
backupNodesElSize() {
|
|
4956
|
+
for (const e of this.getNodes())
|
|
4957
|
+
this._nodesElSizeMap.set(e.id, [e.el_W, e.el_H]);
|
|
4906
4958
|
}
|
|
4907
4959
|
loadGraphJsonData(e) {
|
|
4908
4960
|
e.lines || (e.lines = e.relations, e.lines && console.warn("[relation-graph] For compatibility with older version, Use jsonData.relations as jsonData.lines, It is recommended that you define your data using")), e.lines || (e.lines = e.links || e.edges, e.lines && console.warn("[relation-graph] For compatibility with older version, Use jsonData.links/jsonData.edges as jsonData.lines, It is recommended that you define your data using"));
|
|
4909
4961
|
const t = e.nodes || [], n = e.lines || [], i = [], a = [];
|
|
4910
4962
|
this.flatNodeData(t, null, i, a), n.forEach((r) => {
|
|
4911
4963
|
a.push(r);
|
|
4912
|
-
}), this._addNodes(i), x("Nodes is initialized"), this._addLines(a), this._dataUpdated(), setTimeout(() => {
|
|
4913
|
-
e.elementLines && (console.warn("elementLines is deprecated, please use fakeLines with isFakeLine and fromType/toType = RGInnerConnectTargetType.HTMLElementId instead:", e.elementLines), this.addElementLines(e.elementLines)),
|
|
4964
|
+
}), this._addNodes(i), x("Nodes is initialized"), this._addLines(a), this._dataUpdated(), e.fakeLines && this.addFakeLines(e.fakeLines), setTimeout(() => {
|
|
4965
|
+
e.elementLines && (console.warn("elementLines is deprecated, please use fakeLines with isFakeLine and fromType/toType = RGInnerConnectTargetType.HTMLElementId instead:", e.elementLines), this.addElementLines(e.elementLines)), this._dataUpdated();
|
|
4914
4966
|
}, 500);
|
|
4915
4967
|
}
|
|
4916
4968
|
updateShouldRenderGraphData(e = !1) {
|
|
@@ -4929,7 +4981,7 @@ class Wn extends Hn {
|
|
|
4929
4981
|
this.dataProvider.clearReactiveData(), this.dataProvider.clearChecked(), this.dataProvider.setEditingLine(null), this.dataProvider.setEditingNodes([]);
|
|
4930
4982
|
}
|
|
4931
4983
|
_setJsonData(e, t = !1) {
|
|
4932
|
-
this._clearGraph(), x("set jsonData:", e), this.loadGraphJsonData(e);
|
|
4984
|
+
this.backupNodesElSize(), this._clearGraph(), x("set jsonData:", e), this.loadGraphJsonData(e);
|
|
4933
4985
|
}
|
|
4934
4986
|
}
|
|
4935
4987
|
class $n extends Wn {
|
|
@@ -5007,7 +5059,7 @@ class $n extends Wn {
|
|
|
5007
5059
|
offsetY: y,
|
|
5008
5060
|
width: l.width / h,
|
|
5009
5061
|
height: l.height / h
|
|
5010
|
-
}),
|
|
5062
|
+
}), !0) : !1;
|
|
5011
5063
|
}
|
|
5012
5064
|
_onConnectTargetMounted(e, t, n, i) {
|
|
5013
5065
|
const a = this.dataProvider.getCanvasScale();
|
|
@@ -5017,7 +5069,7 @@ class $n extends Wn {
|
|
|
5017
5069
|
return Oe(e, "rg-node-peel", "rg-map");
|
|
5018
5070
|
}
|
|
5019
5071
|
registerConnectTarget(e, t, n, i, a = {}) {
|
|
5020
|
-
if (n !==
|
|
5072
|
+
if (n !== A.NodePoint && n !== A.CanvasPoint)
|
|
5021
5073
|
return;
|
|
5022
5074
|
if (!e) {
|
|
5023
5075
|
console.error(`[registerConnectTarget]Can not find CanvasPoint target DOM: ${t}`);
|
|
@@ -5048,7 +5100,7 @@ class $n extends Wn {
|
|
|
5048
5100
|
_addConnectTargetToNodeMap(e, t, n, i) {
|
|
5049
5101
|
this.dataProvider.updateConnectTarget(t.targetId, {
|
|
5050
5102
|
junctionPoint: t.junctionPoint,
|
|
5051
|
-
targetType:
|
|
5103
|
+
targetType: A.NodePoint,
|
|
5052
5104
|
nodeId: e,
|
|
5053
5105
|
targetData: Object.assign({}, t.targetData || {}, { nodeId: e })
|
|
5054
5106
|
});
|
|
@@ -5065,7 +5117,7 @@ class $n extends Wn {
|
|
|
5065
5117
|
const i = n.classList.contains("rg-canvas-slot-above") ? "above" : "behind";
|
|
5066
5118
|
this.dataProvider.updateConnectTarget(e.targetId, {
|
|
5067
5119
|
junctionPoint: e.junctionPoint,
|
|
5068
|
-
targetType:
|
|
5120
|
+
targetType: A.CanvasPoint,
|
|
5069
5121
|
targetData: Object.assign({}, e.targetData || {})
|
|
5070
5122
|
});
|
|
5071
5123
|
const a = this.canvasConnectTargetsMap.get(i);
|
|
@@ -5112,7 +5164,7 @@ class Un extends $n {
|
|
|
5112
5164
|
totalLinesBetweenNodes: 1,
|
|
5113
5165
|
currentLineIndex: 0
|
|
5114
5166
|
};
|
|
5115
|
-
const a = t.toNode, r = a.targetType ===
|
|
5167
|
+
const a = t.toNode, r = a.targetType === A.Node ? t.toNode : this.getFakeLineTarget(a.targetType, a.id, n);
|
|
5116
5168
|
return {
|
|
5117
5169
|
line: Object.assign({}, n, { isFakeLine: !1 }),
|
|
5118
5170
|
from: this.getFakeLineTarget(i.targetType, i.id, n),
|
|
@@ -5133,12 +5185,12 @@ class Un extends $n {
|
|
|
5133
5185
|
}
|
|
5134
5186
|
generateFakeLineConfig(e) {
|
|
5135
5187
|
let t = 1, n = 0;
|
|
5136
|
-
if (e.fromType ===
|
|
5188
|
+
if (e.fromType === A.HTMLElementId && e.toType === A.HTMLElementId) {
|
|
5137
5189
|
const r = this.dataProvider.getFakeLines().filter((l) => l.from === e.from && l.to === e.to);
|
|
5138
5190
|
r.length > 1 && (console.warn("sameTargetLines element-line:", e), t = r.length, n = r.indexOf(e));
|
|
5139
5191
|
}
|
|
5140
5192
|
let i = this.getFakeLineTarget(e.fromType, e.from, e), a = this.getFakeLineTarget(e.toType, e.to, e);
|
|
5141
|
-
return !i && e.fromType ===
|
|
5193
|
+
return !i && e.fromType === A.Node ? (console.error("[generateFakeLineConfig]error fakeLine from:", e.fromType, e.from, e), !1) : !a && e.fromType === A.Node ? (console.error("[generateFakeLineConfig]error fakeLine to:", e.toType, e.to, e), !1) : {
|
|
5142
5194
|
line: e,
|
|
5143
5195
|
from: i,
|
|
5144
5196
|
to: a,
|
|
@@ -5150,12 +5202,12 @@ class Un extends $n {
|
|
|
5150
5202
|
this.fakeLineTargetRender = e;
|
|
5151
5203
|
}
|
|
5152
5204
|
getFakeLineTarget(e, t, n) {
|
|
5153
|
-
if (e ===
|
|
5205
|
+
if (e === A.HTMLElementId) {
|
|
5154
5206
|
let i = this.dataProvider.getElLineTargets().find((a) => a.id === t);
|
|
5155
5207
|
return i || (i = {
|
|
5156
5208
|
x: 300,
|
|
5157
5209
|
y: 300,
|
|
5158
|
-
targetType:
|
|
5210
|
+
targetType: A.HTMLElementId,
|
|
5159
5211
|
nodeShape: 1,
|
|
5160
5212
|
id: t,
|
|
5161
5213
|
el_W: 40,
|
|
@@ -5163,9 +5215,9 @@ class Un extends $n {
|
|
|
5163
5215
|
hidden: !0
|
|
5164
5216
|
}, this.dataProvider.addElLineTarget(i), this.updateElementLines()), i.hidden ? null : i;
|
|
5165
5217
|
} else {
|
|
5166
|
-
if (e ===
|
|
5218
|
+
if (e === A.Node)
|
|
5167
5219
|
return this.getNodeById(t);
|
|
5168
|
-
if (e ===
|
|
5220
|
+
if (e === A.NodePoint || e === A.CanvasPoint) {
|
|
5169
5221
|
const i = this.dataProvider.getConnectTargetById(t);
|
|
5170
5222
|
if (!i)
|
|
5171
5223
|
return;
|
|
@@ -5178,7 +5230,7 @@ class Un extends $n {
|
|
|
5178
5230
|
return {
|
|
5179
5231
|
x: a.x + i.offsetPercentX * a.el_W + i.offsetX,
|
|
5180
5232
|
y: a.y + i.offsetPercentY * a.el_H + i.offsetY,
|
|
5181
|
-
targetType:
|
|
5233
|
+
targetType: A.NodePoint,
|
|
5182
5234
|
targetData: i.targetData,
|
|
5183
5235
|
nodeShape: 0,
|
|
5184
5236
|
id: t,
|
|
@@ -5190,7 +5242,7 @@ class Un extends $n {
|
|
|
5190
5242
|
return {
|
|
5191
5243
|
x: i.offsetX,
|
|
5192
5244
|
y: i.offsetY,
|
|
5193
|
-
targetType:
|
|
5245
|
+
targetType: A.CanvasPoint,
|
|
5194
5246
|
targetData: i.targetData,
|
|
5195
5247
|
nodeShape: 0,
|
|
5196
5248
|
id: t,
|
|
@@ -5209,15 +5261,17 @@ class jn extends Un {
|
|
|
5209
5261
|
super();
|
|
5210
5262
|
}
|
|
5211
5263
|
_updateOptions(o) {
|
|
5212
|
-
o.instanceId
|
|
5264
|
+
!o.instanceId && this.getOptions().instanceId !== o.instanceId && (o.instanceId = this.instanceId);
|
|
5213
5265
|
const e = Object.assign({}, o);
|
|
5214
5266
|
if (e.layouts)
|
|
5215
|
-
throw new Error(
|
|
5267
|
+
throw new Error('Graph options do not support setting layouts properties, Please use "layout"!');
|
|
5268
|
+
if (e.lineUseTextPath)
|
|
5269
|
+
throw new Error('Graph options do not support setting layouts properties, Please use "defaultLineTextOnPath"!');
|
|
5216
5270
|
if (e.defaultPloyLineRadius && (e.defaultPolyLineRadius = e.defaultPloyLineRadius), e.debug !== void 0) {
|
|
5217
5271
|
const t = e.debug === !0;
|
|
5218
5272
|
t && x("RGOptions:user instance options:", e), window && (window.relationGraphDebug = t);
|
|
5219
5273
|
}
|
|
5220
|
-
e.layout && (
|
|
5274
|
+
e.layout && (Ze(e.layout), Je(e.layout, e)), this.dataProvider.updateOptions(e);
|
|
5221
5275
|
}
|
|
5222
5276
|
resetViewSize(o = !1) {
|
|
5223
5277
|
const e = this.getViewBoundingClientRect(), t = {};
|
|
@@ -5408,8 +5462,8 @@ class Jn extends qn {
|
|
|
5408
5462
|
throw this.throwLineError("D", 10, 10);
|
|
5409
5463
|
if (c === 0 && h === 0 && d === 0 && f === 0)
|
|
5410
5464
|
throw this.throwLineError("D", 10, 10);
|
|
5411
|
-
const p = h - c + (f - d) > 0, v = o.isReverse ? t : e,
|
|
5412
|
-
c -=
|
|
5465
|
+
const p = h - c + (f - d) > 0, v = o.isReverse ? t : e, L = o.isReverse ? e : t, N = Pe(v.nodeShape, a.defaultNodeShape), O = o.junctionOffset || a.defaultLineJunctionOffset || 0;
|
|
5466
|
+
c -= O, d -= O, h -= O, f -= O, y += O * 2, u += O * 2, g += O * 2, m += O * 2;
|
|
5413
5467
|
const b = {
|
|
5414
5468
|
from_x: c,
|
|
5415
5469
|
from_y: d,
|
|
@@ -5425,7 +5479,7 @@ class Jn extends qn {
|
|
|
5425
5479
|
totalLinesBetweenNodes: n,
|
|
5426
5480
|
currentLineIndex: i,
|
|
5427
5481
|
lineDistance: a.multiLineDistance || 50
|
|
5428
|
-
},
|
|
5482
|
+
}, T = Pe(L.nodeShape, a.defaultNodeShape), S = {
|
|
5429
5483
|
from_x: h,
|
|
5430
5484
|
from_y: f,
|
|
5431
5485
|
to_x: c,
|
|
@@ -5434,26 +5488,26 @@ class Jn extends qn {
|
|
|
5434
5488
|
f_H: m,
|
|
5435
5489
|
t_W: y,
|
|
5436
5490
|
t_H: u,
|
|
5437
|
-
nodeShape:
|
|
5491
|
+
nodeShape: T,
|
|
5438
5492
|
isReverse: p,
|
|
5439
5493
|
isEndPoint: !0,
|
|
5440
5494
|
totalLinesBetweenNodes: n,
|
|
5441
5495
|
currentLineIndex: i,
|
|
5442
5496
|
lineDistance: a.multiLineDistance || 50
|
|
5443
5497
|
}, R = a.defaultJunctionPoint || j.border;
|
|
5444
|
-
let k = o.fromJunctionPoint || R,
|
|
5445
|
-
o.isReverse && ([k,
|
|
5446
|
-
const
|
|
5447
|
-
|
|
5448
|
-
const
|
|
5449
|
-
if (
|
|
5498
|
+
let k = o.fromJunctionPoint || R, P = o.toJunctionPoint || R, M = o.fromJuctionPointOffsetX || 0, C = o.fromJuctionPointOffsetY || 0, E = o.toJuctionPointOffsetX || 0, V = o.toJuctionPointOffsetY || 0;
|
|
5499
|
+
o.isReverse && ([k, P] = [P, k], [M, C, E, V] = [E, V, M, C]), (e === t || c === 0 && h === 0 && d === 0 && f === 0) && M === 0 && C === 0 && E === 0 && V === 0 && ((r === F.StandardStraight || r === F.Curve2 || r === F.Curve3 || r === F.SimpleOrthogonal || r === F.Curve5) && (r = F.StandardCurve), V = 20);
|
|
5500
|
+
const X = this._getJunctionPoint(k, b);
|
|
5501
|
+
X.x += M, X.y += C;
|
|
5502
|
+
const B = this._getJunctionPoint(P, S);
|
|
5503
|
+
if (B.x += E, B.y += V, !X || !B)
|
|
5450
5504
|
throw this.throwLineError("E", -20, -20);
|
|
5451
|
-
const I = c + y / 2, W = d + u / 2, U = h + g / 2,
|
|
5452
|
-
k === "horizontalLine" ? (
|
|
5453
|
-
const te =
|
|
5454
|
-
if (Number.isNaN(te) || Number.isNaN(
|
|
5505
|
+
const I = c + y / 2, W = d + u / 2, U = h + g / 2, ie = f + m / 2;
|
|
5506
|
+
k === "horizontalLine" ? (X.x = B.x, (r === 44 || r === 49) && (X.x += (B.x > U ? 1 : -1) * 30)) : k === "verticalLine" && (X.y = B.y, (r === 44 || r === 49) && (X.y += (B.y > ie ? 1 : -1) * 30)), P === "horizontalLine" ? (B.x = X.x, (r === 44 || r === 49) && (B.x += (X.x > I ? 1 : -1) * 30)) : P === "verticalLine" && (B.y = X.y, (r === 44 || r === 49) && (B.y += (X.y > W ? 1 : -1) * 30));
|
|
5507
|
+
const te = X.x, de = X.y, ae = B.x, oe = B.y;
|
|
5508
|
+
if (Number.isNaN(te) || Number.isNaN(de))
|
|
5455
5509
|
throw x("error start point:", e.text), this.throwLineError("F", -10, 0);
|
|
5456
|
-
if (Number.isNaN(
|
|
5510
|
+
if (Number.isNaN(ae) || Number.isNaN(oe))
|
|
5457
5511
|
throw x("error end point:", t.text), this.throwLineError("G", 10, 0);
|
|
5458
5512
|
return {
|
|
5459
5513
|
line: o,
|
|
@@ -5463,17 +5517,17 @@ class Jn extends qn {
|
|
|
5463
5517
|
lineShape: r,
|
|
5464
5518
|
lineRadius: a.lineRadius || 0,
|
|
5465
5519
|
fromJunctionPoint: k,
|
|
5466
|
-
toJunctionPoint:
|
|
5520
|
+
toJunctionPoint: P,
|
|
5467
5521
|
fx: te,
|
|
5468
|
-
fy:
|
|
5522
|
+
fy: de,
|
|
5469
5523
|
fcx: I,
|
|
5470
5524
|
fcy: W,
|
|
5471
5525
|
f_W: y,
|
|
5472
5526
|
f_H: u,
|
|
5473
|
-
tx:
|
|
5474
|
-
ty:
|
|
5527
|
+
tx: ae,
|
|
5528
|
+
ty: oe,
|
|
5475
5529
|
tcx: U,
|
|
5476
|
-
tcy:
|
|
5530
|
+
tcy: ie,
|
|
5477
5531
|
t_W: g,
|
|
5478
5532
|
t_H: m
|
|
5479
5533
|
};
|
|
@@ -5481,7 +5535,7 @@ class Jn extends qn {
|
|
|
5481
5535
|
createLinePathData(o) {
|
|
5482
5536
|
const { lineShape: e } = o;
|
|
5483
5537
|
let t;
|
|
5484
|
-
return e ===
|
|
5538
|
+
return e === F.SimpleOrthogonal ? t = On(o, void 0, { lineRadius: o.lineRadius }) : e === F.StandardOrthogonal ? t = Sn(o, void 0, { lineRadius: o.lineRadius }) : e === F.HardOrthogonal ? t = Mn(o, void 0, { lineRadius: o.lineRadius }) : e === F.StandardCurve ? t = Rn(o) : e === F.Curve2 || e === F.Curve3 || e === F.Curve5 || e === F.Curve7 || e === F.Curve8 ? t = kn(o) : t = bn(o), t;
|
|
5485
5539
|
}
|
|
5486
5540
|
getArrowMarkerId(o, e = !1) {
|
|
5487
5541
|
let t = o.showStartArrow === !0, n = o.showEndArrow !== !1;
|
|
@@ -5513,7 +5567,7 @@ class Jn extends qn {
|
|
|
5513
5567
|
if (Number.isNaN(t) || Number.isNaN(n))
|
|
5514
5568
|
return "translate(0,0)";
|
|
5515
5569
|
const a = this.getOptions(), r = o.textOffset_x || a.defaultLineTextOffset_x || 0, l = o.textOffset_y || a.defaultLineTextOffset_y || 0, c = o.lineShape || 1;
|
|
5516
|
-
return c ===
|
|
5570
|
+
return c === F.StandardStraight || c === F.SimpleOrthogonal ? `translate(-50%, -50%) translate(${t + r}px,${n + l}px) rotate(${i || 0}deg)` : `translate(-50%, -50%) translate(${t + r}px,${n + l}px)`;
|
|
5517
5571
|
}
|
|
5518
5572
|
generateLineTextStyle(o, e) {
|
|
5519
5573
|
const t = this.getOptions(), n = {
|
|
@@ -5531,30 +5585,33 @@ class Jn extends qn {
|
|
|
5531
5585
|
if (Number.isNaN(l) || Number.isNaN(c))
|
|
5532
5586
|
return { text: r, cssStyles: n };
|
|
5533
5587
|
const h = [], f = i.textAnchor || "center";
|
|
5534
|
-
f === "start" ? h.push("translate(0%, -50%)") : f === "end" ? h.push("translate(100%, -50%)") : h.push("translate(-50%, -50%)"), h.push(`translate(${l}px,${c}px)`);
|
|
5535
|
-
const y = i.textOffset_x || t.defaultLineTextOffset_x || 0, u = i.textOffset_y || t.defaultLineTextOffset_y || 0;
|
|
5536
|
-
return (i.
|
|
5588
|
+
f === "start" ? h.push("translate(0%, -50%)") : f === "end" ? h.push("translate(-100%, -50%)") : h.push("translate(-50%, -50%)"), h.push(`translate(${l}px,${c}px)`);
|
|
5589
|
+
const y = i.textOffset_x || t.defaultLineTextOffset_x || 0, u = i.textOffset_y || t.defaultLineTextOffset_y || 0, g = i.lineShape || 1;
|
|
5590
|
+
return (i.useTextOnPath || t.defaultLineTextOnPath) && g === 1 && d && h.push(`rotate(${d || 0}deg)`), g === F.StandardStraight ? (n.transformOrigin = "50% 50%", h.push(`translate(${y}px,${u}px)`)) : h.push(`translate(${y}px,${u}px)`), n.transform = h.join(" "), {
|
|
5537
5591
|
text: r,
|
|
5538
5592
|
cssStyles: n
|
|
5539
5593
|
};
|
|
5540
5594
|
}
|
|
5541
|
-
|
|
5595
|
+
generateLineTextStyle4TextOnPath(o) {
|
|
5542
5596
|
const { line: e, from: t, to: n } = o;
|
|
5543
5597
|
let i = e.text;
|
|
5544
5598
|
if (!i || !n || !t)
|
|
5545
5599
|
return null;
|
|
5546
5600
|
let a = 0;
|
|
5547
|
-
const r =
|
|
5548
|
-
i.length >
|
|
5549
|
-
const
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5601
|
+
const r = this.getOptions();
|
|
5602
|
+
i.length > r.lineTextMaxLength && (i = i.substring(0, r.lineTextMaxLength || 15) + "...");
|
|
5603
|
+
const l = e.textOffset_x || r.defaultLineTextOffset_x || 0, c = e.textOffset_y || r.defaultLineTextOffset_y || 0, d = {
|
|
5604
|
+
x: l,
|
|
5605
|
+
y: c - 6
|
|
5606
|
+
};
|
|
5607
|
+
let h = "50%";
|
|
5608
|
+
e.onPathStartOffset === "start" ? (h = "0%", d.x += 20) : e.onPathStartOffset === "end" ? (h = "100%", d.x -= 20) : e.onPathStartOffset === "center" ? h = "50%" : e.onPathStartOffset && (h = e.onPathStartOffset);
|
|
5609
|
+
let f = "middle";
|
|
5610
|
+
return e.textAnchor && (f = e.textAnchor), {
|
|
5554
5611
|
text: i,
|
|
5555
|
-
textOffset:
|
|
5556
|
-
textAnchor:
|
|
5557
|
-
onPathStartOffset:
|
|
5612
|
+
textOffset: d,
|
|
5613
|
+
textAnchor: f,
|
|
5614
|
+
onPathStartOffset: h,
|
|
5558
5615
|
textRotate: a
|
|
5559
5616
|
};
|
|
5560
5617
|
}
|
|
@@ -5703,9 +5760,9 @@ class Kn extends ve {
|
|
|
5703
5760
|
console.log("rotate:", i), this.networkAnalyzer.analyzeNetwork(n, this.rootNode, !1), this.placeNodesPosition(t, n);
|
|
5704
5761
|
const a = { x: t.x, y: t.y };
|
|
5705
5762
|
this.allNodes.forEach((r) => {
|
|
5706
|
-
if (r.fixed !== !0 && !!
|
|
5763
|
+
if (r.fixed !== !0 && !!z.isVisibleNode(r) && (Number.isNaN(r.lot.x) && (x("bad lot x:", r.text, r.lot.x), r.lot.x = 0), Number.isNaN(r.lot.y) && (x("bad lot y:", r.text, r.lot.y), r.lot.y = 0), r !== t)) {
|
|
5707
5764
|
this.layoutOptions.from === "right" && (r.lot.x = Q.getFlippedX(r.lot.x, a.x)), this.layoutOptions.from === "bottom" && (r.lot.y = Q.getFlippedY(r.lot.y, a.y));
|
|
5708
|
-
const l = this.layoutOptions.from === "right" ?
|
|
5765
|
+
const l = this.layoutOptions.from === "right" ? z.getNodeXByLotX({ alignItemsX: "end" }, r) : r.lot.x, c = this.layoutOptions.from === "bottom" ? z.getNodeYByLotY({ alignItemsY: "end" }, r) : r.lot.y;
|
|
5709
5766
|
this.updateNodePosition(r, l, c);
|
|
5710
5767
|
}
|
|
5711
5768
|
});
|
|
@@ -5733,9 +5790,9 @@ class Kn extends ve {
|
|
|
5733
5790
|
n === 0 && t.push(...e);
|
|
5734
5791
|
const i = [];
|
|
5735
5792
|
e.forEach((a) => {
|
|
5736
|
-
if (!
|
|
5793
|
+
if (!z.isVisibleNode(a))
|
|
5737
5794
|
return;
|
|
5738
|
-
const r = this.graphInstance.getNodeIncomingNodes(a).filter(
|
|
5795
|
+
const r = this.graphInstance.getNodeIncomingNodes(a).filter(z.isVisibleNode), c = this.graphInstance.getNodeOutgoingNodes(a).filter(z.isVisibleNode).filter((h) => !t.includes(h));
|
|
5739
5796
|
t.push(...c);
|
|
5740
5797
|
const d = r.filter((h) => !t.includes(h));
|
|
5741
5798
|
t.push(...d), a.lot.level = n, a.lot.toNodes = c, a.lot.fromNodes = d;
|
|
@@ -5748,7 +5805,7 @@ class Kn extends ve {
|
|
|
5748
5805
|
const r = i, l = a, c = e.filter((d) => d.lot.level === t);
|
|
5749
5806
|
console.log("reduceNodeRect:level:", t, c.length);
|
|
5750
5807
|
for (const d of c) {
|
|
5751
|
-
if (!
|
|
5808
|
+
if (!z.isVisibleNode(d))
|
|
5752
5809
|
continue;
|
|
5753
5810
|
let h = d.el_W || d.width || 50, f = d.el_H || d.height || 50;
|
|
5754
5811
|
if (d.lot.width = h, d.lot.height = f, d.lot.toNodes.length === 0 && d.lot.fromNodes.length === 0)
|
|
@@ -5879,9 +5936,8 @@ class ei extends Qn {
|
|
|
5879
5936
|
const t = this.getNodes();
|
|
5880
5937
|
x("node size\uFF1A", t.length);
|
|
5881
5938
|
let n = this.dataProvider.getRootNode();
|
|
5882
|
-
if (e && (n = typeof e == "string" ? this.getNodeById(e) : e, !n)
|
|
5939
|
+
if (e && (n = typeof e == "string" ? this.getNodeById(e) : e), n || (n = t[0], this._rgAsConnectArea || (x("[relation-graph]No root node, use first node as root:", n), x("[relation-graph]You can set rootNode call doLayout(rootNode | nodeId) with a node id"))), !n)
|
|
5883
5940
|
throw new Error("custom rootNode not found, id:" + e);
|
|
5884
|
-
n || (n = t[0], this._rgAsConnectArea || (x("[relation-graph]No root node, use first node as root:", n), x("[relation-graph]You can set rootNode call doLayout(rootNode | nodeId) with a node id")));
|
|
5885
5941
|
const i = this.getOptions();
|
|
5886
5942
|
this.dataProvider.setRootNodeId(n ? n.id : ""), this.stopAutoLayout();
|
|
5887
5943
|
const a = this.createLayout(i.layout, !0);
|
|
@@ -5921,7 +5977,7 @@ class ei extends Qn {
|
|
|
5921
5977
|
placeSingleNodes(e) {
|
|
5922
5978
|
if (e.length > 0) {
|
|
5923
5979
|
const t = Math.ceil(Math.sqrt(e.length));
|
|
5924
|
-
|
|
5980
|
+
nt(
|
|
5925
5981
|
t,
|
|
5926
5982
|
30,
|
|
5927
5983
|
e.map((i) => ({ width: i.el_W, height: i.el_H, node: i })),
|
|
@@ -5947,7 +6003,7 @@ class ei extends Qn {
|
|
|
5947
6003
|
if (t.length === 0)
|
|
5948
6004
|
return;
|
|
5949
6005
|
const n = Math.floor(Math.sqrt(t.length)) || 1;
|
|
5950
|
-
|
|
6006
|
+
nt(
|
|
5951
6007
|
n,
|
|
5952
6008
|
100,
|
|
5953
6009
|
t,
|
|
@@ -5972,7 +6028,7 @@ class ei extends Qn {
|
|
|
5972
6028
|
}
|
|
5973
6029
|
r.fixed ? x("[placeNextNetwork]fixed root x,y:", r.x, r.y, r.text) : (this.updateNodePosition(r, 0, 0), x("[placeNextNetwork]set root x,y:", r.x, r.y, r.text)), l.layoutOptions.fixedRootNode = !0;
|
|
5974
6030
|
const c = this.getNetworkNodesByNode(r);
|
|
5975
|
-
x("[placeNextNetwork]thisNetworkNodes:", e.length), l.
|
|
6031
|
+
x("[placeNextNetwork]thisNetworkNodes:", e.length), l.placeNodes(c, r), t.push(...c), n.push({ nodes: c });
|
|
5976
6032
|
const d = [];
|
|
5977
6033
|
e.forEach((h) => {
|
|
5978
6034
|
t.includes(h) || d.push(h);
|
|
@@ -5986,7 +6042,7 @@ class ei extends Qn {
|
|
|
5986
6042
|
}
|
|
5987
6043
|
startAutoLayout() {
|
|
5988
6044
|
var t;
|
|
5989
|
-
this.getOptions().layout.supportAutoLayout && (t = this.layoutor) != null && t.start && (x("Start force layout:" + this.layoutor.instanceId), this.layoutor.start());
|
|
6045
|
+
this.getOptions().layout.supportAutoLayout && (t = this.layoutor) != null && t.start && (x("Start force layout:" + this.layoutor.instanceId), this.layoutor.setLinks(this._getAllLinks()), this.layoutor.start());
|
|
5990
6046
|
}
|
|
5991
6047
|
stopAutoLayout() {
|
|
5992
6048
|
var t;
|
|
@@ -5995,14 +6051,14 @@ class ei extends Qn {
|
|
|
5995
6051
|
createLayout(e, t = !1) {
|
|
5996
6052
|
console.error("########createLayout:", e);
|
|
5997
6053
|
const n = this.getOptions();
|
|
5998
|
-
|
|
6054
|
+
Ze(e);
|
|
5999
6055
|
let i = null;
|
|
6000
|
-
if (e.layoutName === "tree" ? i = new bt(e, n, this) : e.layoutName === "center" ? i = new Ot(e, n, this) : e.layoutName === "circle" ? i = new
|
|
6056
|
+
if (e.layoutName === "tree" ? i = new bt(e, n, this) : e.layoutName === "center" ? i = new Ot(e, n, this) : e.layoutName === "circle" ? i = new Tt(e, n, this) : e.layoutName === "force" ? i = new Re(e, n, this) : e.layoutName === "fixed" ? i = new Pt(e, n, this) : e.layoutName === "smart-tree" ? i = new _n(e, n, this) : e.layoutName === "io-tree" ? i = new Kn(e, n, this) : e.layoutName === "folder" && (i = new St(e, n, this)), !i)
|
|
6001
6057
|
throw new Error("unknown layout: " + e.layoutName);
|
|
6002
|
-
return i.requireLinks && i.setLinks(this.
|
|
6058
|
+
return i.requireLinks && i.setLinks(this._getAllLinks()), i.isMainLayouer = t, i.layoutOptions.fixedRootNode = !0, t && (this.layoutor = i, this.dataProvider.updateOptions({
|
|
6003
6059
|
layout: {
|
|
6004
6060
|
...n.layout,
|
|
6005
|
-
supportAutoLayout: i.autoLayout !== void 0
|
|
6061
|
+
supportAutoLayout: i.autoLayout !== void 0 && e.disableAsForceLayout !== !0
|
|
6006
6062
|
}
|
|
6007
6063
|
})), i;
|
|
6008
6064
|
}
|
|
@@ -6057,7 +6113,7 @@ class oi extends ei {
|
|
|
6057
6113
|
})), this.emitEvent(D.onNodeClick, e, t), this._prevClickNodeTime = Date.now();
|
|
6058
6114
|
}
|
|
6059
6115
|
onNodeDragStart(e, t) {
|
|
6060
|
-
if (!e ||
|
|
6116
|
+
if (!e || Te(t))
|
|
6061
6117
|
return;
|
|
6062
6118
|
const n = this.getOptions();
|
|
6063
6119
|
if ((e.disableDrag || n.disableDragNode) && !(t.target && t.target.closest(".rg-node-drag-handler"))) {
|
|
@@ -6091,13 +6147,13 @@ class oi extends ei {
|
|
|
6091
6147
|
if (!h || a)
|
|
6092
6148
|
return;
|
|
6093
6149
|
const u = this.getViewXyByEvent(h), g = this.getCanvasXyByViewXy(u), m = g.x - l.x, p = g.y - l.y;
|
|
6094
|
-
let v = m + c.x,
|
|
6095
|
-
const b = this.emitEvent(D.onNodeDragging, e, v,
|
|
6096
|
-
b && (typeof b.x == "number" && (v = b.x, N = v - c.x), typeof b.y == "number" && (
|
|
6150
|
+
let v = m + c.x, L = p + c.y, N = v - c.x, O = L - c.y;
|
|
6151
|
+
const b = this.emitEvent(D.onNodeDragging, e, v, L, N, O, h);
|
|
6152
|
+
b && (typeof b.x == "number" && (v = b.x, N = v - c.x), typeof b.y == "number" && (L = b.y, O = L - c.y)), this.canvasAutoMoving(u), this.draggingSelectedNodes(e, v, L, N, O), this._dataUpdated();
|
|
6097
6153
|
}, y = () => {
|
|
6098
6154
|
f(), this._canvasMovingTimer = requestAnimationFrame(y);
|
|
6099
6155
|
};
|
|
6100
|
-
|
|
6156
|
+
Z.startDrag(t, c, r, (u, g, m, p, v) => {
|
|
6101
6157
|
d ? h = v : Math.abs(u) + Math.abs(g) > 4 && (x("[node]onNodeDragStart...", ye(h), h), this.emitEvent(D.onNodeDragStart, e, h), d = !0, this.dataProvider.updateOptions({
|
|
6102
6158
|
draggingNodeId: e.id
|
|
6103
6159
|
}), this._canvasMovingTimer = requestAnimationFrame(y)), this.updateElementLines(), this._dataUpdated();
|
|
@@ -6106,10 +6162,11 @@ class oi extends ei {
|
|
|
6106
6162
|
_onNodeDragEnd(e, t, n, i) {
|
|
6107
6163
|
this.updateElementLines();
|
|
6108
6164
|
}
|
|
6109
|
-
onLineClick(e, t
|
|
6110
|
-
|
|
6165
|
+
onLineClick(e, t) {
|
|
6166
|
+
const n = this.getLinkByLineId(e.id);
|
|
6167
|
+
x("onLineClick:", "line:", e, "link:", n);
|
|
6111
6168
|
const i = this.getOptions();
|
|
6112
|
-
(e.disablePointEvent === void 0 ? i.disableLinePointEvent : e.disablePointEvent) || (this.setCheckedNode(""), this.setCheckedLine(e)), this.emitEvent(D.onLineClick, e,
|
|
6169
|
+
(e.disablePointEvent === void 0 ? i.disableLinePointEvent : e.disablePointEvent) || (this.setCheckedNode(""), this.setCheckedLine(e)), this.emitEvent(D.onLineClick, e, n, t), this._dataUpdated();
|
|
6113
6170
|
}
|
|
6114
6171
|
expandOrCollapseNode(e, t) {
|
|
6115
6172
|
t.stopPropagation(), e.expanded === !1 ? this.expandNode(e, t) : this.collapseNode(e, t);
|
|
@@ -6161,7 +6218,7 @@ class oi extends ei {
|
|
|
6161
6218
|
throw new Error("startCreatingNodePlot need setting param");
|
|
6162
6219
|
if (!t.onCreateNode)
|
|
6163
6220
|
throw new Error("startCreatingNodePlot need setting.onCreateNode param as callback");
|
|
6164
|
-
const n =
|
|
6221
|
+
const n = Se(JSON.parse(JSON.stringify(qe)), this.getOptions()), i = ye(e);
|
|
6165
6222
|
this.dataProvider.updateOptions({
|
|
6166
6223
|
newNodeTemplate: Object.assign({}, n, t.templateNode),
|
|
6167
6224
|
creatingNodePlot: !0,
|
|
@@ -6205,11 +6262,11 @@ class oi extends ei {
|
|
|
6205
6262
|
x("[CreatingNodePlot]create node be abort!");
|
|
6206
6263
|
return;
|
|
6207
6264
|
}
|
|
6208
|
-
const
|
|
6265
|
+
const L = this.getCanvasXyByClientXy({
|
|
6209
6266
|
x: m.clientX,
|
|
6210
6267
|
y: m.clientY
|
|
6211
6268
|
});
|
|
6212
|
-
x("[CreatingNodePlot]objectBePlaced:",
|
|
6269
|
+
x("[CreatingNodePlot]objectBePlaced:", L), t.onCreateNode(L.x, L.y, this.getOptions().newNodeTemplate), this._dataUpdated();
|
|
6213
6270
|
};
|
|
6214
6271
|
setTimeout(() => {
|
|
6215
6272
|
this.$dom.addEventListener("click", y), this.$dom.addEventListener("contextmenu", f);
|
|
@@ -6239,7 +6296,7 @@ class oi extends ei {
|
|
|
6239
6296
|
fromNode: null,
|
|
6240
6297
|
toNode: {
|
|
6241
6298
|
id: "",
|
|
6242
|
-
targetType:
|
|
6299
|
+
targetType: A.Node,
|
|
6243
6300
|
x: 0,
|
|
6244
6301
|
y: 0,
|
|
6245
6302
|
el_W: 2,
|
|
@@ -6271,7 +6328,7 @@ class oi extends ei {
|
|
|
6271
6328
|
x: e.clientX,
|
|
6272
6329
|
y: e.clientY
|
|
6273
6330
|
}), n = this.getOptions(), i = e.target;
|
|
6274
|
-
let a = "", r =
|
|
6331
|
+
let a = "", r = A.Node;
|
|
6275
6332
|
const l = this.isNode(i);
|
|
6276
6333
|
let c = !1, d = {
|
|
6277
6334
|
x: 0,
|
|
@@ -6298,11 +6355,11 @@ class oi extends ei {
|
|
|
6298
6355
|
x("[CreatingLinePlot]content point:", h.dataset.point);
|
|
6299
6356
|
let y = h.dataset.point || "border";
|
|
6300
6357
|
if (h.classList.contains("rg-connect-target")) {
|
|
6301
|
-
const { width: u, height: g, x: m, y: p } = h.getBoundingClientRect(), v = this.getCanvasXyByClientXy({ x: m, y: p }),
|
|
6358
|
+
const { width: u, height: g, x: m, y: p } = h.getBoundingClientRect(), v = this.getCanvasXyByClientXy({ x: m, y: p }), L = this.dataProvider.getCanvasScale(), N = {
|
|
6302
6359
|
x: v.x,
|
|
6303
6360
|
y: v.y,
|
|
6304
|
-
el_W: u /
|
|
6305
|
-
el_H: g /
|
|
6361
|
+
el_W: u / L,
|
|
6362
|
+
el_H: g / L,
|
|
6306
6363
|
nodeShape: 1,
|
|
6307
6364
|
id: h.dataset.targetId,
|
|
6308
6365
|
targetData: JSON.parse(h.dataset.targetData || "{}"),
|
|
@@ -6324,7 +6381,7 @@ class oi extends ei {
|
|
|
6324
6381
|
}
|
|
6325
6382
|
})), this._updateEditingConnectControllerView();
|
|
6326
6383
|
} else
|
|
6327
|
-
f && (r =
|
|
6384
|
+
f && (r = A.Node, c = !0, d.x = f.x, d.y = f.y, d.el_W = f.el_W, d.el_H = f.el_H, d.nodeShape = f.nodeShape, i.dataset.innode === "true" && (d.x = t.x, d.y = t.y, d.el_W = 2, d.el_H = 2, d.nodeShape = 1));
|
|
6328
6385
|
n.newLineTemplate.isReverse ? this.dataProvider.updateOptions({
|
|
6329
6386
|
newLineTemplate: {
|
|
6330
6387
|
...this.getOptions().newLineTemplate,
|
|
@@ -6347,7 +6404,7 @@ class oi extends ei {
|
|
|
6347
6404
|
...this.getOptions().newLineTemplate,
|
|
6348
6405
|
toJunctionPoint: j.border
|
|
6349
6406
|
}
|
|
6350
|
-
}), n.newLinkTemplate.toNode && (r =
|
|
6407
|
+
}), n.newLinkTemplate.toNode && (r = A.Node);
|
|
6351
6408
|
n.newLinkTemplate.toNode && (a && this.dataProvider.updateOptions({
|
|
6352
6409
|
newLinkTemplate: {
|
|
6353
6410
|
...this.getOptions().newLinkTemplate,
|
|
@@ -6501,7 +6558,7 @@ class oi extends ei {
|
|
|
6501
6558
|
const y = this.dataProvider.getCanvasScale();
|
|
6502
6559
|
n.fromNode.x = i.x + l / y, n.fromNode.y = i.y + c / y, n.toNode.x = a.x + l / y, n.toNode.y = a.y + c / y, this._updateEditingControllerView(), this._dataUpdated();
|
|
6503
6560
|
};
|
|
6504
|
-
|
|
6561
|
+
Z.startDrag(t, { x: 0, y: 0 }, (...l) => {
|
|
6505
6562
|
this.onLineDragEnd(...l);
|
|
6506
6563
|
}, r);
|
|
6507
6564
|
}
|
|
@@ -6509,7 +6566,7 @@ class oi extends ei {
|
|
|
6509
6566
|
x("onLineDragEnd"), this.updateElementLines();
|
|
6510
6567
|
}
|
|
6511
6568
|
onCanvasDragStart(e) {
|
|
6512
|
-
if (
|
|
6569
|
+
if (Te(e) || e.target && e.target.closest(".rg-line-peel"))
|
|
6513
6570
|
return;
|
|
6514
6571
|
const t = this.getOptions();
|
|
6515
6572
|
if (this.dataProvider.isPerformanceMode() && t.editingController.nodes.length > 0) {
|
|
@@ -6546,11 +6603,11 @@ class oi extends ei {
|
|
|
6546
6603
|
u.preventDefault();
|
|
6547
6604
|
const p = g[1], v = this.getOptions();
|
|
6548
6605
|
l || (l = { x: p.clientX, y: p.clientY }, c = v.canvasZoom);
|
|
6549
|
-
const
|
|
6606
|
+
const L = { x: m.clientX, y: m.clientY }, N = { x: p.clientX, y: p.clientY }, O = Math.hypot(l.x - y.x, l.y - y.y), T = Math.hypot(N.x - L.x, N.y - L.y) / O, S = v.mouseWheelSpeed * T, R = c * S;
|
|
6550
6607
|
this.setZoom(R, y), this._dataUpdated();
|
|
6551
6608
|
} else {
|
|
6552
|
-
const p = m.clientX, v = m.clientY,
|
|
6553
|
-
this.onCanvasDragging(
|
|
6609
|
+
const p = m.clientX, v = m.clientY, L = p - y.x, N = v - y.y, O = f.x + L, b = f.y + N;
|
|
6610
|
+
this.onCanvasDragging(O, b, N, L), this._updateEditingControllerView(), this._dataUpdated();
|
|
6554
6611
|
}
|
|
6555
6612
|
};
|
|
6556
6613
|
} else
|
|
@@ -6563,7 +6620,7 @@ class oi extends ei {
|
|
|
6563
6620
|
y: i.canvasOffset.y
|
|
6564
6621
|
};
|
|
6565
6622
|
let r = t;
|
|
6566
|
-
|
|
6623
|
+
Z.startDrag(e, a, (l, c, d) => {
|
|
6567
6624
|
this.onCanvasDragStop(l, c, d);
|
|
6568
6625
|
}, (l, c, d, h, f) => {
|
|
6569
6626
|
r ? n(l, c, d, h, f) : Math.abs(l) + Math.abs(c) > 4 && (this.emitEvent(D.onCanvasDragStart, d, h, f), r = !0);
|
|
@@ -6628,7 +6685,7 @@ class oi extends ei {
|
|
|
6628
6685
|
creatingSelection: !0
|
|
6629
6686
|
}), this._canvasMovingTimer && cancelAnimationFrame(this._canvasMovingTimer), this._canvasMovingTimer = requestAnimationFrame(l)), this._dataUpdated();
|
|
6630
6687
|
};
|
|
6631
|
-
|
|
6688
|
+
Z.startDrag(e, { x: 0, y: 0 }, (...d) => {
|
|
6632
6689
|
a = !0, this._canvasMovingTimer && cancelAnimationFrame(this._canvasMovingTimer), this.onCanvasDragStop(...d);
|
|
6633
6690
|
}, c);
|
|
6634
6691
|
}
|
|
@@ -6695,7 +6752,7 @@ class si extends oi {
|
|
|
6695
6752
|
for (const t of this.getNodes()) {
|
|
6696
6753
|
if (!(t.rgShouldRender !== !1 && t.rgCalcedVisibility && t.opacity !== 0))
|
|
6697
6754
|
continue;
|
|
6698
|
-
const i =
|
|
6755
|
+
const i = Pe(t.nodeShape, e);
|
|
6699
6756
|
this.evDrawNode(t, i);
|
|
6700
6757
|
}
|
|
6701
6758
|
}
|
|
@@ -6902,8 +6959,8 @@ class ai extends si {
|
|
|
6902
6959
|
if (!r.showReferenceLine)
|
|
6903
6960
|
return;
|
|
6904
6961
|
if (!r.editingReferenceLine.show) {
|
|
6905
|
-
const M = Math.abs(i),
|
|
6906
|
-
M +
|
|
6962
|
+
const M = Math.abs(i), C = Math.abs(a);
|
|
6963
|
+
M + C > 2 && this.dataProvider.updateOptions({
|
|
6907
6964
|
editingReferenceLine: {
|
|
6908
6965
|
...r.editingReferenceLine,
|
|
6909
6966
|
show: !0
|
|
@@ -6916,67 +6973,67 @@ class ai extends si {
|
|
|
6916
6973
|
x: h,
|
|
6917
6974
|
y: u
|
|
6918
6975
|
});
|
|
6919
|
-
let p = !1, v = !1,
|
|
6920
|
-
const
|
|
6921
|
-
|
|
6922
|
-
const E =
|
|
6976
|
+
let p = !1, v = !1, L = 0, N = 0;
|
|
6977
|
+
const O = this.getNodes().filter((M) => this._nodeXYMappingBeforeDrag[M.id] ? !1 : Math.abs(M.x - h) < 600 && Math.abs(M.y - u) < 600);
|
|
6978
|
+
O.sort((M, C) => {
|
|
6979
|
+
const E = Le(
|
|
6923
6980
|
h,
|
|
6924
6981
|
u,
|
|
6925
6982
|
M.x + M.el_W / 2,
|
|
6926
6983
|
M.y + M.el_H / 2
|
|
6927
|
-
),
|
|
6984
|
+
), V = Le(
|
|
6928
6985
|
h,
|
|
6929
6986
|
u,
|
|
6930
|
-
|
|
6931
|
-
|
|
6987
|
+
C.x + C.el_W / 2,
|
|
6988
|
+
C.y + C.el_H / 2
|
|
6932
6989
|
);
|
|
6933
|
-
return E <
|
|
6990
|
+
return E < V ? -1 : 1;
|
|
6934
6991
|
});
|
|
6935
|
-
let { v_x: b, v_y:
|
|
6936
|
-
for (const M of
|
|
6937
|
-
const
|
|
6938
|
-
if (te < 800 &&
|
|
6939
|
-
if (!v && te <
|
|
6940
|
-
const
|
|
6941
|
-
x:
|
|
6992
|
+
let { v_x: b, v_y: T, v_height: S, h_x: R, h_y: k, h_width: P } = r.editingReferenceLine;
|
|
6993
|
+
for (const M of O) {
|
|
6994
|
+
const C = M.x, E = M.el_W, V = M.el_H, X = M.x + E / 2, B = M.x + E, I = M.y, W = M.y + V / 2, U = M.y + V, ie = Math.abs(l - C), te = Math.abs(h - X), de = Math.abs(f - B), ae = Math.abs(y - I), oe = Math.abs(u - W), he = Math.abs(g - U), ne = 5;
|
|
6995
|
+
if (te < 800 && oe < 800) {
|
|
6996
|
+
if (!v && te < ne) {
|
|
6997
|
+
const G = this.getViewXyByCanvasXy({
|
|
6998
|
+
x: X,
|
|
6942
6999
|
y: W
|
|
6943
7000
|
});
|
|
6944
|
-
b =
|
|
7001
|
+
b = G.x, T = m.y > G.y ? G.y : m.y, S = Math.round(Math.abs(m.y - G.y)), v = !0, L = X - c / 2;
|
|
6945
7002
|
}
|
|
6946
|
-
if (!v &&
|
|
6947
|
-
const
|
|
6948
|
-
x:
|
|
7003
|
+
if (!v && ie < ne) {
|
|
7004
|
+
const G = this.getViewXyByCanvasXy({
|
|
7005
|
+
x: C,
|
|
6949
7006
|
y: W
|
|
6950
7007
|
});
|
|
6951
|
-
b =
|
|
7008
|
+
b = G.x, T = m.y > G.y ? G.y : m.y, S = Math.round(Math.abs(m.y - G.y)), v = !0, L = C;
|
|
6952
7009
|
}
|
|
6953
|
-
if (!v &&
|
|
6954
|
-
const
|
|
6955
|
-
x:
|
|
7010
|
+
if (!v && de < ne) {
|
|
7011
|
+
const G = this.getViewXyByCanvasXy({
|
|
7012
|
+
x: B,
|
|
6956
7013
|
y: W
|
|
6957
7014
|
});
|
|
6958
|
-
b =
|
|
7015
|
+
b = G.x, T = m.y > G.y ? G.y : m.y, S = Math.round(Math.abs(m.y - G.y)), v = !0, L = B - c;
|
|
6959
7016
|
}
|
|
6960
|
-
if (!p &&
|
|
6961
|
-
const
|
|
6962
|
-
x:
|
|
7017
|
+
if (!p && oe < ne) {
|
|
7018
|
+
const G = this.getViewXyByCanvasXy({
|
|
7019
|
+
x: X,
|
|
6963
7020
|
y: W
|
|
6964
7021
|
});
|
|
6965
|
-
k =
|
|
7022
|
+
k = G.y, R = m.x > G.x ? G.x : m.x, P = Math.round(Math.abs(m.x - G.x)), p = !0, N = W - d / 2;
|
|
6966
7023
|
}
|
|
6967
|
-
if (!p &&
|
|
6968
|
-
const
|
|
6969
|
-
x:
|
|
7024
|
+
if (!p && ae < ne) {
|
|
7025
|
+
const G = this.getViewXyByCanvasXy({
|
|
7026
|
+
x: X,
|
|
6970
7027
|
y: I
|
|
6971
7028
|
});
|
|
6972
|
-
k =
|
|
7029
|
+
k = G.y, R = m.x > G.x ? G.x : m.x, P = Math.round(Math.abs(m.x - G.x)), p = !0, N = I;
|
|
6973
7030
|
}
|
|
6974
|
-
if (!p &&
|
|
6975
|
-
const
|
|
6976
|
-
x:
|
|
7031
|
+
if (!p && he < ne) {
|
|
7032
|
+
const G = this.getViewXyByCanvasXy({
|
|
7033
|
+
x: X,
|
|
6977
7034
|
y: U
|
|
6978
7035
|
});
|
|
6979
|
-
k =
|
|
7036
|
+
k = G.y, R = m.x > G.x ? G.x : m.x, P = Math.abs(m.x - G.x), p = !0, N = U - d;
|
|
6980
7037
|
}
|
|
6981
7038
|
if (p && v)
|
|
6982
7039
|
break;
|
|
@@ -6986,18 +7043,18 @@ class ai extends si {
|
|
|
6986
7043
|
editingReferenceLine: {
|
|
6987
7044
|
...r.editingReferenceLine,
|
|
6988
7045
|
v_x: b,
|
|
6989
|
-
v_y:
|
|
6990
|
-
v_height:
|
|
7046
|
+
v_y: T,
|
|
7047
|
+
v_height: S,
|
|
6991
7048
|
h_x: R,
|
|
6992
7049
|
h_y: k,
|
|
6993
|
-
h_width:
|
|
7050
|
+
h_width: P,
|
|
6994
7051
|
directionH: p,
|
|
6995
7052
|
directionV: v
|
|
6996
7053
|
}
|
|
6997
7054
|
}), r.referenceLineAdsorption)
|
|
6998
7055
|
return {
|
|
6999
7056
|
showV: v,
|
|
7000
|
-
fixedX:
|
|
7057
|
+
fixedX: L,
|
|
7001
7058
|
showH: p,
|
|
7002
7059
|
fixedY: N
|
|
7003
7060
|
};
|
|
@@ -7039,52 +7096,52 @@ class ai extends si {
|
|
|
7039
7096
|
});
|
|
7040
7097
|
return;
|
|
7041
7098
|
}
|
|
7042
|
-
if (t.lineShape ===
|
|
7099
|
+
if (t.lineShape === F.StandardOrthogonal) {
|
|
7043
7100
|
let {
|
|
7044
7101
|
textPosition: N,
|
|
7045
|
-
pathData:
|
|
7102
|
+
pathData: O,
|
|
7046
7103
|
points: b,
|
|
7047
|
-
startDirection:
|
|
7048
|
-
endDirection:
|
|
7104
|
+
startDirection: T,
|
|
7105
|
+
endDirection: S
|
|
7049
7106
|
} = l;
|
|
7050
7107
|
r = N, i = b[0], a = b[b.length - 1];
|
|
7051
7108
|
const R = [];
|
|
7052
7109
|
for (let k = 0; k < b.length - 1; k++) {
|
|
7053
|
-
const
|
|
7110
|
+
const P = b[k], M = b[k + 1], C = {
|
|
7054
7111
|
pIndex: k,
|
|
7055
7112
|
optionName: "cp-" + k,
|
|
7056
7113
|
x: 0,
|
|
7057
7114
|
y: 0,
|
|
7058
7115
|
direction: "v",
|
|
7059
|
-
startDirection:
|
|
7060
|
-
endDirection:
|
|
7116
|
+
startDirection: T,
|
|
7117
|
+
endDirection: S
|
|
7061
7118
|
};
|
|
7062
|
-
|
|
7119
|
+
P.x !== M.x && (C.direction = "h");
|
|
7063
7120
|
const E = this.getViewXyByCanvasXy({
|
|
7064
|
-
x: (
|
|
7065
|
-
y: (
|
|
7121
|
+
x: (P.x + M.x) / 2,
|
|
7122
|
+
y: (P.y + M.y) / 2
|
|
7066
7123
|
});
|
|
7067
|
-
|
|
7124
|
+
C.x = E.x, C.y = E.y, R.push(C);
|
|
7068
7125
|
}
|
|
7069
7126
|
if (R.length !== 1) {
|
|
7070
7127
|
if (R.length !== 2)
|
|
7071
7128
|
if (R.length === 3) {
|
|
7072
|
-
const k = b[0],
|
|
7129
|
+
const k = b[0], P = b[1], M = b[3];
|
|
7073
7130
|
if (R[1].direction === "v") {
|
|
7074
|
-
const
|
|
7075
|
-
if (Math.max(
|
|
7131
|
+
const C = k.x, E = P.x, V = M.x;
|
|
7132
|
+
if (Math.max(C, E, V) !== E && Math.min(C, E, V) !== E)
|
|
7076
7133
|
R[1].optionName = "cx";
|
|
7077
7134
|
else {
|
|
7078
|
-
const
|
|
7079
|
-
|
|
7135
|
+
const B = Math.abs(E - C), I = Math.abs(E - V);
|
|
7136
|
+
B >= I ? R[1].optionName = "td" : B < I && (R[1].optionName = "fd");
|
|
7080
7137
|
}
|
|
7081
7138
|
} else {
|
|
7082
|
-
const
|
|
7083
|
-
if (Math.max(
|
|
7139
|
+
const C = k.y, E = P.y, V = M.y;
|
|
7140
|
+
if (Math.max(C, E, V) !== E && Math.min(C, E, V) !== E)
|
|
7084
7141
|
R[1].optionName = "cy";
|
|
7085
7142
|
else {
|
|
7086
|
-
const
|
|
7087
|
-
|
|
7143
|
+
const B = Math.abs(E - C), I = Math.abs(E - V);
|
|
7144
|
+
B >= I ? R[1].optionName = "td" : B < I && (R[1].optionName = "fd");
|
|
7088
7145
|
}
|
|
7089
7146
|
}
|
|
7090
7147
|
} else
|
|
@@ -7097,38 +7154,38 @@ class ai extends si {
|
|
|
7097
7154
|
line49Points: b
|
|
7098
7155
|
}
|
|
7099
7156
|
});
|
|
7100
|
-
} else if (t.lineShape ===
|
|
7157
|
+
} else if (t.lineShape === F.HardOrthogonal) {
|
|
7101
7158
|
let {
|
|
7102
7159
|
textPosition: N,
|
|
7103
|
-
pathData:
|
|
7160
|
+
pathData: O,
|
|
7104
7161
|
points: b,
|
|
7105
|
-
startDirection:
|
|
7106
|
-
endDirection:
|
|
7162
|
+
startDirection: T,
|
|
7163
|
+
endDirection: S
|
|
7107
7164
|
} = l;
|
|
7108
7165
|
r = N;
|
|
7109
7166
|
const R = [];
|
|
7110
7167
|
b = t.ctrlPointsFor49, i = b[0], a = b[b.length - 1];
|
|
7111
7168
|
const k = b;
|
|
7112
|
-
for (let
|
|
7113
|
-
const M = k[
|
|
7114
|
-
pIndex:
|
|
7115
|
-
optionName: "cp-" +
|
|
7169
|
+
for (let P = 0; P < k.length - 1; P++) {
|
|
7170
|
+
const M = k[P], C = k[P + 1], E = {
|
|
7171
|
+
pIndex: P,
|
|
7172
|
+
optionName: "cp-" + P,
|
|
7116
7173
|
x: 0,
|
|
7117
7174
|
y: 0,
|
|
7118
7175
|
direction: "v",
|
|
7119
|
-
startDirection:
|
|
7120
|
-
endDirection:
|
|
7176
|
+
startDirection: T,
|
|
7177
|
+
endDirection: S
|
|
7121
7178
|
};
|
|
7122
|
-
M.x !==
|
|
7123
|
-
const
|
|
7124
|
-
x: (M.x +
|
|
7125
|
-
y: (M.y +
|
|
7179
|
+
M.x !== C.x ? (E.direction = "h", Math.abs(M.x - C.x) < 15 && (E.hide = !0)) : Math.abs(M.y - C.y) < 15 && (E.hide = !0);
|
|
7180
|
+
const V = this.getViewXyByCanvasXy({
|
|
7181
|
+
x: (M.x + C.x) / 2,
|
|
7182
|
+
y: (M.y + C.y) / 2
|
|
7126
7183
|
});
|
|
7127
|
-
E.x =
|
|
7184
|
+
E.x = V.x, E.y = V.y, R.push(E);
|
|
7128
7185
|
}
|
|
7129
|
-
for (let
|
|
7130
|
-
const M = R[
|
|
7131
|
-
|
|
7186
|
+
for (let P = 0; P < R.length; P++) {
|
|
7187
|
+
const M = R[P - 1], C = R[P], E = R[P + 1];
|
|
7188
|
+
P === 0 && C.direction === E.direction && (C.hide = !0), P === R.length - 1 && C.direction === M.direction && (C.hide = !0);
|
|
7132
7189
|
}
|
|
7133
7190
|
this.dataProvider.updateOptions({
|
|
7134
7191
|
editingLineController: {
|
|
@@ -7139,19 +7196,19 @@ class ai extends si {
|
|
|
7139
7196
|
});
|
|
7140
7197
|
} else if (t.lineShape !== 1) {
|
|
7141
7198
|
r = l.textPosition;
|
|
7142
|
-
const N =
|
|
7143
|
-
let
|
|
7144
|
-
t.isReverse ? (i = N.endPoint, a = N.startPoint,
|
|
7199
|
+
const N = it(l.pathData);
|
|
7200
|
+
let O, b;
|
|
7201
|
+
t.isReverse ? (i = N.endPoint, a = N.startPoint, O = this.getViewXyByCanvasXy(N.ctrl1), b = this.getViewXyByCanvasXy(N.ctrl2)) : (i = N.startPoint, a = N.endPoint, O = this.getViewXyByCanvasXy(N.ctrl1), b = this.getViewXyByCanvasXy(N.ctrl2)), this.dataProvider.updateOptions({
|
|
7145
7202
|
editingLineController: {
|
|
7146
7203
|
...this.getOptions().editingLineController,
|
|
7147
|
-
ctrlPoint1:
|
|
7204
|
+
ctrlPoint1: O,
|
|
7148
7205
|
ctrlPoint2: b
|
|
7149
7206
|
}
|
|
7150
7207
|
});
|
|
7151
7208
|
} else {
|
|
7152
7209
|
r = l.textPosition;
|
|
7153
|
-
const N = l.pathData,
|
|
7154
|
-
i =
|
|
7210
|
+
const N = l.pathData, O = it(N);
|
|
7211
|
+
i = O.startPoint, a = O.endPoint;
|
|
7155
7212
|
}
|
|
7156
7213
|
const c = this.getViewXyByCanvasXy(t.isReverse ? a : i), d = this.getViewXyByCanvasXy(t.isReverse ? i : a);
|
|
7157
7214
|
this.dataProvider.updateOptions({
|
|
@@ -7164,22 +7221,22 @@ class ai extends si {
|
|
|
7164
7221
|
const h = this.getViewXyByCanvasXy(r), f = this.$canvasDom.querySelector(`g[data-id='${t.id}']`);
|
|
7165
7222
|
let y = 0, u = 0, g = t.textOffset_x || 0, m = t.textOffset_y || 0;
|
|
7166
7223
|
const p = this.dataProvider.getCanvasScale();
|
|
7167
|
-
let v = 20,
|
|
7224
|
+
let v = 20, L = 20;
|
|
7168
7225
|
if (f) {
|
|
7169
7226
|
const N = f.querySelector("text.rg-line-text");
|
|
7170
7227
|
if (N) {
|
|
7171
7228
|
g = Math.floor(parseFloat(N.getAttribute("x") || "0")), m = Math.floor(parseFloat(N.getAttribute("y") || "0"));
|
|
7172
|
-
const
|
|
7173
|
-
v =
|
|
7229
|
+
const O = N.clientWidth, b = N.clientHeight;
|
|
7230
|
+
v = O, L = b;
|
|
7174
7231
|
}
|
|
7175
7232
|
}
|
|
7176
|
-
v += 40,
|
|
7233
|
+
v += 40, L += 10, v > 120 && (v = 120), L > 20 && (L = 20), this.dataProvider.updateOptions({
|
|
7177
7234
|
editingLineController: {
|
|
7178
7235
|
...this.getOptions().editingLineController,
|
|
7179
7236
|
text: {
|
|
7180
7237
|
...this.getOptions().editingLineController.text,
|
|
7181
7238
|
width: v,
|
|
7182
|
-
height:
|
|
7239
|
+
height: L,
|
|
7183
7240
|
x: h.x + y + g * p,
|
|
7184
7241
|
y: h.y + u + m * p
|
|
7185
7242
|
}
|
|
@@ -7199,7 +7256,7 @@ class ai extends si {
|
|
|
7199
7256
|
let c = r;
|
|
7200
7257
|
this.dataProvider.setEditingLine(null), a ? this.removeLine(i) : this.removeFakeLine(i), console.log("DragLine start:", e, i.isReverse);
|
|
7201
7258
|
let d = !1;
|
|
7202
|
-
i.lineShape ===
|
|
7259
|
+
i.lineShape === F.HardOrthogonal && (i.lineShape = F.StandardOrthogonal), e === "start" ? (i.fromJuctionPointOffsetX = 0, i.fromJuctionPointOffsetY = 0, c = l, d = !0) : (i.toJuctionPointOffsetX = 0, i.toJuctionPointOffsetY = 0), this.startCreatingLinePlot(t, {
|
|
7203
7260
|
template: i,
|
|
7204
7261
|
fromNode: c,
|
|
7205
7262
|
isReverse: d,
|
|
@@ -7298,7 +7355,7 @@ class ai extends si {
|
|
|
7298
7355
|
}
|
|
7299
7356
|
}
|
|
7300
7357
|
startMoveLineText(e, t) {
|
|
7301
|
-
if (
|
|
7358
|
+
if (Te(e))
|
|
7302
7359
|
return;
|
|
7303
7360
|
const n = this.getViewXyByEvent(e), a = this.getOptions().editingLineController.line;
|
|
7304
7361
|
console.log("startMoveLineText:", a.id);
|
|
@@ -7320,7 +7377,7 @@ class ai extends si {
|
|
|
7320
7377
|
const c = this.dataProvider.getCanvasScale(), d = l[e], { x: h, y: f } = d, y = () => {
|
|
7321
7378
|
n(r), this._dataUpdated();
|
|
7322
7379
|
};
|
|
7323
|
-
|
|
7380
|
+
Z.startDrag(t, { x: 0, y: 0 }, y, (u, g) => {
|
|
7324
7381
|
d.x = h + u / c, d.y = f + g / c, this.dataProvider.updateLine(r.id, {
|
|
7325
7382
|
ctrlPoints: l
|
|
7326
7383
|
}), this._updateEditingLineView(), this._dataUpdated();
|
|
@@ -7339,7 +7396,7 @@ class ai extends si {
|
|
|
7339
7396
|
const f = (u, g) => {
|
|
7340
7397
|
console.log("lineSplitCtrlMoving:", r == null ? void 0 : r.lineShape, e.optionName);
|
|
7341
7398
|
const m = this.dataProvider.getCanvasScale();
|
|
7342
|
-
if (r.lineShape ===
|
|
7399
|
+
if (r.lineShape === F.StandardOrthogonal) {
|
|
7343
7400
|
if (e.optionName === "cx") {
|
|
7344
7401
|
const v = c + u / m * 1;
|
|
7345
7402
|
l.cx = v, this.dataProvider.updateLine(r.id, {
|
|
@@ -7365,10 +7422,10 @@ class ai extends si {
|
|
|
7365
7422
|
h = JSON.parse(JSON.stringify(p)), console.log(":startCtrlPointsFor49:::", h), this.dataProvider.updateLine(r.id, {
|
|
7366
7423
|
ctrlPointsFor49: h
|
|
7367
7424
|
}), this.dataProvider.updateLine(r.id, {
|
|
7368
|
-
lineShape:
|
|
7425
|
+
lineShape: F.HardOrthogonal
|
|
7369
7426
|
});
|
|
7370
7427
|
}
|
|
7371
|
-
} else if (r.lineShape ===
|
|
7428
|
+
} else if (r.lineShape === F.HardOrthogonal) {
|
|
7372
7429
|
const { newPoints: p, pointsChanged: v } = Nn(
|
|
7373
7430
|
r.ctrlPointsFor49,
|
|
7374
7431
|
h,
|
|
@@ -7383,7 +7440,7 @@ class ai extends si {
|
|
|
7383
7440
|
});
|
|
7384
7441
|
}
|
|
7385
7442
|
}, y = () => {
|
|
7386
|
-
if (r.lineShape ===
|
|
7443
|
+
if (r.lineShape === F.HardOrthogonal) {
|
|
7387
7444
|
const u = Ae(r.ctrlPointsFor49);
|
|
7388
7445
|
this.dataProvider.updateLine(r.id, {
|
|
7389
7446
|
ctrlPointsFor49: u
|
|
@@ -7391,7 +7448,7 @@ class ai extends si {
|
|
|
7391
7448
|
}
|
|
7392
7449
|
this._updateEditingLineView(), n && n(r), this._dataUpdated();
|
|
7393
7450
|
};
|
|
7394
|
-
|
|
7451
|
+
Z.startDrag(t, { x: 0, y: 0 }, y, (u, g) => {
|
|
7395
7452
|
f(u, g), this._updateEditingLineView(), this._dataUpdated();
|
|
7396
7453
|
});
|
|
7397
7454
|
}
|
|
@@ -7406,8 +7463,8 @@ class ai extends si {
|
|
|
7406
7463
|
if (e)
|
|
7407
7464
|
f = e, f === ge.top || f === ge.bottom ? y.x = a.clientX - h.x : f === ge.right ? y.y = a.clientY - d.y : y.y = a.clientY - l.y;
|
|
7408
7465
|
else {
|
|
7409
|
-
const g =
|
|
7410
|
-
|
|
7466
|
+
const g = Le(a.clientX, a.clientY, l.x, l.y), m = Le(a.clientX, a.clientY, c.x, c.y), p = Le(a.clientX, a.clientY, d.x, d.y), v = Le(a.clientX, a.clientY, h.x, h.y), L = Math.min(g, m, p, v);
|
|
7467
|
+
L === g ? (f = ge.left, y.x = a.clientX - l.x, y.y = a.clientY - l.y) : L === m ? (f = ge.top, y.x = a.clientX - c.x, y.y = a.clientY - c.y) : L === p ? (f = ge.right, y.x = a.clientX - d.x, y.y = a.clientY - d.y) : L === v && (f = ge.bottom, y.x = a.clientX - h.x, y.y = a.clientY - h.y);
|
|
7411
7468
|
}
|
|
7412
7469
|
const u = this.dataProvider.getCanvasScale();
|
|
7413
7470
|
y.x = y.x / u, y.y = y.y / u, x("onMouseUpWithOffset:", e, y), this.onLineVertexBeDropped(f, t, y, i);
|
|
@@ -7453,8 +7510,8 @@ class ri extends ai {
|
|
|
7453
7510
|
for (const v of this.getNodes())
|
|
7454
7511
|
if (v.rgCalcedVisibility && v.opacity !== 0) {
|
|
7455
7512
|
v.x < e && (e = v.x), v.y < t && (t = v.y);
|
|
7456
|
-
const
|
|
7457
|
-
|
|
7513
|
+
const L = v.x + v.el_W, N = v.y + v.el_H;
|
|
7514
|
+
L > n && (n = L), N > i && (i = N), a++;
|
|
7458
7515
|
}
|
|
7459
7516
|
const r = 1, l = 50, c = 50;
|
|
7460
7517
|
a === 0 ? (this.miniViewBox.canvas_start_x = -100 - l, this.miniViewBox.canvas_start_y = -100 - c, this.miniViewBox.canvas_end_x = 100 + l, this.miniViewBox.canvas_end_y = 100 + c, this.miniViewBox.canvas_width = this.miniViewBox.canvas_end_x - this.miniViewBox.canvas_start_x, this.miniViewBox.canvas_height = this.miniViewBox.canvas_end_y - this.miniViewBox.canvas_start_y) : (this.miniViewBox.canvas_start_x = e - l, this.miniViewBox.canvas_start_y = t - c, this.miniViewBox.canvas_end_x = n + l, this.miniViewBox.canvas_end_y = i + c, this.miniViewBox.canvas_width = this.miniViewBox.canvas_end_x - this.miniViewBox.canvas_start_x, this.miniViewBox.canvas_height = this.miniViewBox.canvas_end_y - this.miniViewBox.canvas_start_y);
|
|
@@ -7489,7 +7546,7 @@ class ri extends ai {
|
|
|
7489
7546
|
if (n.rgCalcedVisibility && n.opacity !== 0) {
|
|
7490
7547
|
let i = n.el_W, a = n.el_H;
|
|
7491
7548
|
e * i < this._canvasItemMiniSizeLimit && (i = this._canvasItemMiniSizeLimit / this._canvasDomScale), e * a < this._canvasItemMiniSizeLimit && (a = this._canvasItemMiniSizeLimit / this._canvasDomScale);
|
|
7492
|
-
const r =
|
|
7549
|
+
const r = Pe(n.nodeShape, t);
|
|
7493
7550
|
this.mvDrawNode(n, r, i, a);
|
|
7494
7551
|
}
|
|
7495
7552
|
}
|
|
@@ -7557,7 +7614,7 @@ class ri extends ai {
|
|
|
7557
7614
|
c && clearInterval(c), this.onCanvasDragEnd(m);
|
|
7558
7615
|
};
|
|
7559
7616
|
let h = !1, f = 0, y = 0;
|
|
7560
|
-
|
|
7617
|
+
Z.startDrag(e, { x: 0, y: 0 }, d, (u, g) => {
|
|
7561
7618
|
f = u, y = g, console.log("onVisibleViewHandleDragStart:move:", u, g), !h && Math.abs(u) + Math.abs(g) > 3 && (console.log("onVisibleViewHandleDragStart:start"), h = !0, c = setInterval(() => {
|
|
7562
7619
|
l();
|
|
7563
7620
|
}, 50));
|
|
@@ -7667,9 +7724,9 @@ class di extends li {
|
|
|
7667
7724
|
}
|
|
7668
7725
|
addKeyboardListener() {
|
|
7669
7726
|
this.onKeyDownHanlder = (e) => {
|
|
7670
|
-
|
|
7727
|
+
Te(e) || (e.code === "Space" && (e.preventDefault(), this.getOptions().canvasMoveMode === !1 && this.setCanvasMoveMode(!0)), this.emitEvent(D.onKeyboardDown, e));
|
|
7671
7728
|
}, this.onKeyUpHanlder = (e) => {
|
|
7672
|
-
|
|
7729
|
+
Te(e) || (e.code === "Space" && (e.preventDefault(), this.getOptions().canvasMoveMode === !0 && this.setCanvasMoveMode(!1)), this.emitEvent(D.onKeyboardUp, e));
|
|
7673
7730
|
}, this.$dom.addEventListener("keydown", this.onKeyDownHanlder), this.$dom.addEventListener("keyup", this.onKeyUpHanlder);
|
|
7674
7731
|
}
|
|
7675
7732
|
removeKeyboardListener() {
|
|
@@ -7766,7 +7823,7 @@ class ci extends di {
|
|
|
7766
7823
|
return Ee(o);
|
|
7767
7824
|
}
|
|
7768
7825
|
transRGLinkToJsonObject(o) {
|
|
7769
|
-
return
|
|
7826
|
+
return je(o);
|
|
7770
7827
|
}
|
|
7771
7828
|
transRGLineToJsonObject(o) {
|
|
7772
7829
|
return Ie(o);
|
|
@@ -7833,16 +7890,16 @@ function Et(s, o = !1) {
|
|
|
7833
7890
|
const e = s ? Reflect.construct(s, []) : new It();
|
|
7834
7891
|
return e._rgAsConnectArea = o, console.log("[RGProvider]Creating new graphInstance", e.instanceId, o), e;
|
|
7835
7892
|
}
|
|
7836
|
-
function
|
|
7837
|
-
const e =
|
|
7893
|
+
function Ke(s, o = !1) {
|
|
7894
|
+
const e = se(Be);
|
|
7838
7895
|
return e || (console.log("[RGProvider]No parent RGProvider found, creating new graphInstance"), Et(s, o));
|
|
7839
7896
|
}
|
|
7840
7897
|
const Dt = ({ graphInstance: s, children: o }) => {
|
|
7841
7898
|
const [e, t] = pe(0), { data: n, dataStores: i } = pi(), a = ee(0), r = zt((l) => {
|
|
7842
7899
|
a.current++, t(a.current);
|
|
7843
7900
|
}, []);
|
|
7844
|
-
return a.current === 0 && s.setReactiveData4React(i, r), /* @__PURE__ */
|
|
7845
|
-
},
|
|
7901
|
+
return a.current === 0 && s.setReactiveData4React(i, r), /* @__PURE__ */ w(hi, { value: s, children: /* @__PURE__ */ w(ui, { value: r, children: /* @__PURE__ */ w(fi, { value: e, children: /* @__PURE__ */ w(gi, { value: n, children: o }) }) }) });
|
|
7902
|
+
}, et = ({ graphInstance: s, children: o }) => se(Be) ? /* @__PURE__ */ w(le, { children: o }) : /* @__PURE__ */ w(Dt, { graphInstance: s, children: o }), pi = () => {
|
|
7846
7903
|
const [s, o] = pe(Me({})), [e, t] = pe([]), [n, i] = pe([]), [a, r] = pe([]);
|
|
7847
7904
|
return {
|
|
7848
7905
|
data: {
|
|
@@ -8088,7 +8145,7 @@ Initialize using the onReady event of the RelationGraph component. then use grap
|
|
|
8088
8145
|
|
|
8089
8146
|
###### More Method: ######
|
|
8090
8147
|
https://www.relation-graph.com/docs.'
|
|
8091
|
-
`,
|
|
8148
|
+
`, Li = `Please Initialize the graph using the new method:
|
|
8092
8149
|
|
|
8093
8150
|
###### Method 1: ######
|
|
8094
8151
|
// Use graphInstance to set the data.
|
|
@@ -8116,30 +8173,34 @@ Initialize using the onReady event of the RelationGraph component. then use grap
|
|
|
8116
8173
|
|
|
8117
8174
|
###### More Method: ######
|
|
8118
8175
|
https://www.relation-graph.com/docs.'
|
|
8119
|
-
`,
|
|
8176
|
+
`, at = {
|
|
8120
8177
|
Vue3GetInstance: Ne(mi),
|
|
8121
8178
|
ReactGetInstance: Ne(vi),
|
|
8122
8179
|
Vue2GetInstance: Ne(yi),
|
|
8123
8180
|
setJsonData: Ne(xi),
|
|
8124
|
-
setJsonData4Vue2: Ne(
|
|
8125
|
-
},
|
|
8126
|
-
const e =
|
|
8181
|
+
setJsonData4Vue2: Ne(Li)
|
|
8182
|
+
}, Ci = (s, o) => {
|
|
8183
|
+
const e = Ke(s.relationGraphCore);
|
|
8127
8184
|
return Bt(o, () => ({
|
|
8128
8185
|
getInstance() {
|
|
8129
8186
|
var t;
|
|
8130
|
-
return (t = s.options) != null && t.definitelyNoDataProviderNeeded || console.warn("[relation-graph]",
|
|
8187
|
+
return (t = s.options) != null && t.definitelyNoDataProviderNeeded || console.warn("[relation-graph]", at.ReactGetInstance), e;
|
|
8131
8188
|
},
|
|
8132
8189
|
async setJsonData() {
|
|
8133
|
-
throw new Error(
|
|
8134
|
-
}
|
|
8135
|
-
}), []),
|
|
8136
|
-
|
|
8190
|
+
throw new Error(at.setJsonData);
|
|
8191
|
+
}
|
|
8192
|
+
}), []), q(() => {
|
|
8193
|
+
e.updateOptions(s.options);
|
|
8194
|
+
}, [s.options]), q(() => {
|
|
8195
|
+
e.setListeners(Ue(s));
|
|
8196
|
+
}, [s]), /* @__PURE__ */ w(et, { graphInstance: e, children: /* @__PURE__ */ w(Nt, { ...s }) });
|
|
8197
|
+
}, wi = Ce.forwardRef(Ci);
|
|
8137
8198
|
function _i(s = {}) {
|
|
8138
|
-
const o =
|
|
8199
|
+
const o = Ke(s.relationGraphCore);
|
|
8139
8200
|
return {
|
|
8140
8201
|
RelationGraph: K(() => {
|
|
8141
8202
|
console.log("Creating a MemoizedRelationGraph...");
|
|
8142
|
-
const t = (n) => /* @__PURE__ */
|
|
8203
|
+
const t = (n) => /* @__PURE__ */ w(et, { graphInstance: o, children: /* @__PURE__ */ w(Nt, { ...n, children: n.children }) });
|
|
8143
8204
|
return t.displayName = "RelationGraph", t;
|
|
8144
8205
|
}, []),
|
|
8145
8206
|
graphInstance: o
|
|
@@ -8148,7 +8209,7 @@ function _i(s = {}) {
|
|
|
8148
8209
|
const Ni = {
|
|
8149
8210
|
useRelationGraph: _i,
|
|
8150
8211
|
useGraphInstance: $,
|
|
8151
|
-
useAutoUpdateView:
|
|
8212
|
+
useAutoUpdateView: ce,
|
|
8152
8213
|
useCreatingLine: tn,
|
|
8153
8214
|
useCreatingNode: nn,
|
|
8154
8215
|
useEditingNodes: on,
|
|
@@ -8157,11 +8218,11 @@ const Ni = {
|
|
|
8157
8218
|
useSelection: ln,
|
|
8158
8219
|
useConnectingNode: an,
|
|
8159
8220
|
useCheckedItem: dn,
|
|
8160
|
-
useGraphStore:
|
|
8221
|
+
useGraphStore: J
|
|
8161
8222
|
}, bi = ({ children: s }) => {
|
|
8162
8223
|
const o = $();
|
|
8163
|
-
|
|
8164
|
-
const { options: e } =
|
|
8224
|
+
ce();
|
|
8225
|
+
const { options: e } = J(), [t, n] = pe(!1), i = () => {
|
|
8165
8226
|
n(!t);
|
|
8166
8227
|
}, a = () => {
|
|
8167
8228
|
o.printOptions();
|
|
@@ -8171,14 +8232,14 @@ const Ni = {
|
|
|
8171
8232
|
o.enableDebugLog(!e.debug), x("debugLog:", e.debug), updateView();
|
|
8172
8233
|
};
|
|
8173
8234
|
return /* @__PURE__ */ H("div", { children: [
|
|
8174
|
-
/* @__PURE__ */
|
|
8235
|
+
/* @__PURE__ */ w("div", { className: "rg-setting-panel-button", onClick: () => {
|
|
8175
8236
|
i();
|
|
8176
8237
|
}, children: "Debug" }),
|
|
8177
8238
|
t && /* @__PURE__ */ H("div", { className: "rg-setting-panel", children: [
|
|
8178
|
-
/* @__PURE__ */
|
|
8239
|
+
/* @__PURE__ */ w("div", { className: "c-debug-tools-row", children: /* @__PURE__ */ w("button", { onClick: () => {
|
|
8179
8240
|
a();
|
|
8180
8241
|
}, children: "print options in console" }) }),
|
|
8181
|
-
/* @__PURE__ */
|
|
8242
|
+
/* @__PURE__ */ w("div", { className: "c-debug-tools-row", children: /* @__PURE__ */ w("button", { onClick: () => {
|
|
8182
8243
|
r();
|
|
8183
8244
|
}, children: "print json data in console" }) }),
|
|
8184
8245
|
/* @__PURE__ */ H("div", { className: "c-debug-tools-row", children: [
|
|
@@ -8195,7 +8256,7 @@ const Ni = {
|
|
|
8195
8256
|
] })
|
|
8196
8257
|
] });
|
|
8197
8258
|
}, Oi = ({ children: s, direction: o, positionH: e, positionV: t }) => {
|
|
8198
|
-
const n = $(), { options: i } =
|
|
8259
|
+
const n = $(), { options: i } = J(), a = async () => {
|
|
8199
8260
|
await n.refresh(), n.dataUpdated();
|
|
8200
8261
|
}, r = () => {
|
|
8201
8262
|
n.toggleAutoLayout();
|
|
@@ -8218,24 +8279,24 @@ const Ni = {
|
|
|
8218
8279
|
"rg-toolbar-" + (o || i.toolBarDirection)
|
|
8219
8280
|
].join(" "),
|
|
8220
8281
|
children: [
|
|
8221
|
-
/* @__PURE__ */
|
|
8282
|
+
/* @__PURE__ */ w("div", { className: "rg-mb-button", onClick: () => {
|
|
8222
8283
|
l();
|
|
8223
|
-
}, children: /* @__PURE__ */
|
|
8224
|
-
/* @__PURE__ */ H(
|
|
8225
|
-
/* @__PURE__ */
|
|
8284
|
+
}, children: /* @__PURE__ */ w(re, { iconName: "icon-quanping" }) }),
|
|
8285
|
+
/* @__PURE__ */ H(Ce.Fragment, { children: [
|
|
8286
|
+
/* @__PURE__ */ w("div", { className: "rg-mb-button", onClick: () => {
|
|
8226
8287
|
d(20);
|
|
8227
|
-
}, children: /* @__PURE__ */
|
|
8288
|
+
}, children: /* @__PURE__ */ w(re, { iconName: "icon-fangda" }) }),
|
|
8228
8289
|
/* @__PURE__ */ H("div", { className: "rg-current-zoom", onClick: () => {
|
|
8229
8290
|
c();
|
|
8230
8291
|
}, children: [
|
|
8231
8292
|
Math.round(i.canvasZoom),
|
|
8232
8293
|
"%"
|
|
8233
8294
|
] }),
|
|
8234
|
-
/* @__PURE__ */
|
|
8295
|
+
/* @__PURE__ */ w("div", { className: "rg-mb-button", onClick: () => {
|
|
8235
8296
|
d(-20);
|
|
8236
|
-
}, children: /* @__PURE__ */
|
|
8297
|
+
}, children: /* @__PURE__ */ w(re, { iconName: "icon-suoxiao" }) })
|
|
8237
8298
|
] }),
|
|
8238
|
-
i.layout.supportAutoLayout && /* @__PURE__ */
|
|
8299
|
+
i.layout.supportAutoLayout && /* @__PURE__ */ w(
|
|
8239
8300
|
"div",
|
|
8240
8301
|
{
|
|
8241
8302
|
title: i.layout.autoLayouting ? "Stop force" : "Start force",
|
|
@@ -8246,22 +8307,22 @@ const Ni = {
|
|
|
8246
8307
|
onClick: () => {
|
|
8247
8308
|
r();
|
|
8248
8309
|
},
|
|
8249
|
-
children: i.layout.autoLayouting ? /* @__PURE__ */
|
|
8310
|
+
children: i.layout.autoLayouting ? /* @__PURE__ */ w(re, { iconName: "icon-lianjiezhong", className: "rg-loading-icon" }) : /* @__PURE__ */ w(re, { iconName: "icon-zidong" })
|
|
8250
8311
|
}
|
|
8251
8312
|
),
|
|
8252
|
-
/* @__PURE__ */
|
|
8313
|
+
/* @__PURE__ */ w("div", { className: "rg-mb-button", onClick: () => {
|
|
8253
8314
|
a();
|
|
8254
|
-
}, children: /* @__PURE__ */
|
|
8315
|
+
}, children: /* @__PURE__ */ w(re, { iconName: "icon-ico_reset" }) }),
|
|
8255
8316
|
s,
|
|
8256
|
-
/* @__PURE__ */
|
|
8317
|
+
/* @__PURE__ */ w("div", { style: { clear: "both" } })
|
|
8257
8318
|
]
|
|
8258
8319
|
}
|
|
8259
8320
|
);
|
|
8260
|
-
},
|
|
8321
|
+
}, Ti = ({ node: s, children: o }) => {
|
|
8261
8322
|
const e = ee(null), t = $();
|
|
8262
|
-
|
|
8263
|
-
const { options: n } =
|
|
8264
|
-
|
|
8323
|
+
ce();
|
|
8324
|
+
const { options: n } = J(), i = s.borderWidth === void 0 ? void 0 : `${s.borderWidth}px`, a = s.width ? s.width + "px" : void 0, r = s.height ? s.height + "px" : void 0;
|
|
8325
|
+
q(() => (t.addNodeResizeListener(e.current, s), () => {
|
|
8265
8326
|
e.current && t.removeNodeResizeListener(e.current);
|
|
8266
8327
|
}), []);
|
|
8267
8328
|
const l = (h) => {
|
|
@@ -8288,26 +8349,26 @@ const Ni = {
|
|
|
8288
8349
|
"--rg-node-border-radius": s.borderRadius ? `${s.borderRadius}px` : void 0,
|
|
8289
8350
|
"--rg-node-border-color": s.borderColor
|
|
8290
8351
|
};
|
|
8291
|
-
return /* @__PURE__ */
|
|
8352
|
+
return /* @__PURE__ */ w(
|
|
8292
8353
|
"div",
|
|
8293
8354
|
{
|
|
8294
8355
|
ref: e,
|
|
8295
8356
|
style: d,
|
|
8296
8357
|
className: c,
|
|
8297
8358
|
"data-id": s.id,
|
|
8298
|
-
children: /* @__PURE__ */
|
|
8359
|
+
children: /* @__PURE__ */ w(
|
|
8299
8360
|
"div",
|
|
8300
8361
|
{
|
|
8301
8362
|
className: "rg-node",
|
|
8302
8363
|
onMouseDown: l,
|
|
8303
8364
|
onTouchStart: l,
|
|
8304
|
-
children: o || /* @__PURE__ */
|
|
8365
|
+
children: o || /* @__PURE__ */ w("div", { className: "rg-node-text", children: /* @__PURE__ */ w("span", { children: s.text }) })
|
|
8305
8366
|
}
|
|
8306
8367
|
)
|
|
8307
8368
|
}
|
|
8308
8369
|
);
|
|
8309
|
-
},
|
|
8310
|
-
const { options: o } =
|
|
8370
|
+
}, Pi = ({ children: s }) => /* @__PURE__ */ w(le, {}), Si = ({ children: s }) => {
|
|
8371
|
+
const { options: o } = J();
|
|
8311
8372
|
if (!o.editingController.show)
|
|
8312
8373
|
return null;
|
|
8313
8374
|
const e = {
|
|
@@ -8315,62 +8376,62 @@ const Ni = {
|
|
|
8315
8376
|
height: o.editingController.height + "px",
|
|
8316
8377
|
transform: `translate(${o.editingController.x}px, ${o.editingController.y}px)`
|
|
8317
8378
|
};
|
|
8318
|
-
return /* @__PURE__ */
|
|
8379
|
+
return /* @__PURE__ */ w("div", { className: "rg-editing-ctrl", style: e, children: s });
|
|
8319
8380
|
}, Mi = ({ disableResizeWidth: s, disableResizeHeight: o, beforeResizeStart: e }) => {
|
|
8320
|
-
const t = $(), { options: n } =
|
|
8381
|
+
const t = $(), { options: n } = J(), i = (a, r) => {
|
|
8321
8382
|
r.stopPropagation(), e && e(), t.onResizeStart(a, r.nativeEvent);
|
|
8322
8383
|
};
|
|
8323
8384
|
return /* @__PURE__ */ H("div", { className: "rg-resize-ctl", children: [
|
|
8324
|
-
n.editingController.width > 30 && !s && !o && /* @__PURE__ */
|
|
8385
|
+
n.editingController.width > 30 && !s && !o && /* @__PURE__ */ w(
|
|
8325
8386
|
"div",
|
|
8326
8387
|
{
|
|
8327
8388
|
className: "rg-resize-ctl-handler rg-resize-ctl-tl",
|
|
8328
8389
|
onMouseDown: (a) => i("tl", a)
|
|
8329
8390
|
}
|
|
8330
8391
|
),
|
|
8331
|
-
n.editingController.width > 30 && !s && !o && /* @__PURE__ */
|
|
8392
|
+
n.editingController.width > 30 && !s && !o && /* @__PURE__ */ w(
|
|
8332
8393
|
"div",
|
|
8333
8394
|
{
|
|
8334
8395
|
className: "rg-resize-ctl-handler rg-resize-ctl-tr",
|
|
8335
8396
|
onMouseDown: (a) => i("tr", a)
|
|
8336
8397
|
}
|
|
8337
8398
|
),
|
|
8338
|
-
n.editingController.width > 30 && !s && !o && /* @__PURE__ */
|
|
8399
|
+
n.editingController.width > 30 && !s && !o && /* @__PURE__ */ w(
|
|
8339
8400
|
"div",
|
|
8340
8401
|
{
|
|
8341
8402
|
className: "rg-resize-ctl-handler rg-resize-ctl-bl",
|
|
8342
8403
|
onMouseDown: (a) => i("bl", a)
|
|
8343
8404
|
}
|
|
8344
8405
|
),
|
|
8345
|
-
!s && !o && /* @__PURE__ */
|
|
8406
|
+
!s && !o && /* @__PURE__ */ w(
|
|
8346
8407
|
"div",
|
|
8347
8408
|
{
|
|
8348
8409
|
className: "rg-resize-ctl-handler rg-resize-ctl-br",
|
|
8349
8410
|
onMouseDown: (a) => i("br", a)
|
|
8350
8411
|
}
|
|
8351
8412
|
),
|
|
8352
|
-
(n.editingController.width > 60 || s) && !o && /* @__PURE__ */
|
|
8413
|
+
(n.editingController.width > 60 || s) && !o && /* @__PURE__ */ w(
|
|
8353
8414
|
"div",
|
|
8354
8415
|
{
|
|
8355
8416
|
className: "rg-resize-ctl-handler rg-resize-ctl-t",
|
|
8356
8417
|
onMouseDown: (a) => i("t", a)
|
|
8357
8418
|
}
|
|
8358
8419
|
),
|
|
8359
|
-
(n.editingController.width > 60 || s) && !o && /* @__PURE__ */
|
|
8420
|
+
(n.editingController.width > 60 || s) && !o && /* @__PURE__ */ w(
|
|
8360
8421
|
"div",
|
|
8361
8422
|
{
|
|
8362
8423
|
className: "rg-resize-ctl-handler rg-resize-ctl-b",
|
|
8363
8424
|
onMouseDown: (a) => i("b", a)
|
|
8364
8425
|
}
|
|
8365
8426
|
),
|
|
8366
|
-
(n.editingController.height > 60 || o) && !s && /* @__PURE__ */
|
|
8427
|
+
(n.editingController.height > 60 || o) && !s && /* @__PURE__ */ w(
|
|
8367
8428
|
"div",
|
|
8368
8429
|
{
|
|
8369
8430
|
className: "rg-resize-ctl-handler rg-resize-ctl-l",
|
|
8370
8431
|
onMouseDown: (a) => i("l", a)
|
|
8371
8432
|
}
|
|
8372
8433
|
),
|
|
8373
|
-
(n.editingController.height > 60 || o) && !s && /* @__PURE__ */
|
|
8434
|
+
(n.editingController.height > 60 || o) && !s && /* @__PURE__ */ w(
|
|
8374
8435
|
"div",
|
|
8375
8436
|
{
|
|
8376
8437
|
className: "rg-resize-ctl-handler rg-resize-ctl-r",
|
|
@@ -8380,9 +8441,9 @@ const Ni = {
|
|
|
8380
8441
|
] });
|
|
8381
8442
|
}, Ri = ({ className: s, style: o, position: e = "br", width: t, height: n }) => {
|
|
8382
8443
|
const i = $();
|
|
8383
|
-
|
|
8384
|
-
const { options: a } =
|
|
8385
|
-
|
|
8444
|
+
ce();
|
|
8445
|
+
const { options: a } = J(), r = ee(null), l = ee(null);
|
|
8446
|
+
q(() => (i.onMiniViewMounted(), i.setMiniViewCanvas(l.current), () => {
|
|
8386
8447
|
i.onMiniViewUnMounted();
|
|
8387
8448
|
}), []);
|
|
8388
8449
|
const c = (h) => {
|
|
@@ -8390,7 +8451,7 @@ const Ni = {
|
|
|
8390
8451
|
}, d = async (h) => {
|
|
8391
8452
|
i.resetByVisiableView(h.nativeEvent);
|
|
8392
8453
|
};
|
|
8393
|
-
return /* @__PURE__ */
|
|
8454
|
+
return /* @__PURE__ */ w(
|
|
8394
8455
|
"div",
|
|
8395
8456
|
{
|
|
8396
8457
|
className: `rg-miniview rg-miniview-${e} ${s || ""}`,
|
|
@@ -8401,7 +8462,7 @@ const Ni = {
|
|
|
8401
8462
|
"--miniview-height": n
|
|
8402
8463
|
},
|
|
8403
8464
|
children: /* @__PURE__ */ H("div", { className: "rg-miniview-container", children: [
|
|
8404
|
-
/* @__PURE__ */
|
|
8465
|
+
/* @__PURE__ */ w(
|
|
8405
8466
|
"canvas",
|
|
8406
8467
|
{
|
|
8407
8468
|
ref: l,
|
|
@@ -8409,7 +8470,7 @@ const Ni = {
|
|
|
8409
8470
|
onClick: d
|
|
8410
8471
|
}
|
|
8411
8472
|
),
|
|
8412
|
-
/* @__PURE__ */
|
|
8473
|
+
/* @__PURE__ */ w(
|
|
8413
8474
|
"div",
|
|
8414
8475
|
{
|
|
8415
8476
|
className: "rg-mv-visible-area",
|
|
@@ -8426,13 +8487,13 @@ const Ni = {
|
|
|
8426
8487
|
);
|
|
8427
8488
|
}, ki = ({ children: s, forDisplay: o, forImage: e, position: t, width: n, height: i }) => {
|
|
8428
8489
|
const a = $();
|
|
8429
|
-
|
|
8430
|
-
const { options: r } =
|
|
8431
|
-
|
|
8490
|
+
ce();
|
|
8491
|
+
const { options: r } = J(), l = ee(null);
|
|
8492
|
+
q(() => (a.setWatermarkDom(l.current, e, o, t), () => {
|
|
8432
8493
|
a.setWatermarkDom(null, o, e);
|
|
8433
8494
|
}), [n, i]);
|
|
8434
8495
|
let c = !1;
|
|
8435
|
-
return r.snapshotting ? e === !1 ? c = !1 : c = !0 : o === !0 ? c = !0 : c = !1, /* @__PURE__ */
|
|
8496
|
+
return r.snapshotting ? e === !1 ? c = !1 : c = !0 : o === !0 ? c = !0 : c = !1, /* @__PURE__ */ w(
|
|
8436
8497
|
"div",
|
|
8437
8498
|
{
|
|
8438
8499
|
className: `rg-watermark rg-watermark-${t || "br"}`,
|
|
@@ -8447,9 +8508,9 @@ const Ni = {
|
|
|
8447
8508
|
);
|
|
8448
8509
|
}, Ii = ({ children: s, forDisplay: o, forImage: e }) => {
|
|
8449
8510
|
const t = $(), n = ee(null);
|
|
8450
|
-
return
|
|
8511
|
+
return q(() => (t.setBackgroundDom(n.current, o, e), () => {
|
|
8451
8512
|
t.setBackgroundDom(null, o, e);
|
|
8452
|
-
}), []), /* @__PURE__ */
|
|
8513
|
+
}), []), /* @__PURE__ */ w(
|
|
8453
8514
|
"div",
|
|
8454
8515
|
{
|
|
8455
8516
|
className: "rg-background",
|
|
@@ -8457,7 +8518,7 @@ const Ni = {
|
|
|
8457
8518
|
children: s
|
|
8458
8519
|
}
|
|
8459
8520
|
);
|
|
8460
|
-
}, Ei = ({ position: s, children: o }) => /* @__PURE__ */
|
|
8521
|
+
}, Ei = ({ position: s, children: o }) => /* @__PURE__ */ w(
|
|
8461
8522
|
"div",
|
|
8462
8523
|
{
|
|
8463
8524
|
className: `rg-editing-bar rg-editing-bar-${s || "top"}`,
|
|
@@ -8473,26 +8534,26 @@ const Ni = {
|
|
|
8473
8534
|
children: a
|
|
8474
8535
|
}) => {
|
|
8475
8536
|
const r = $();
|
|
8476
|
-
|
|
8477
|
-
const { options: l } =
|
|
8478
|
-
|
|
8537
|
+
ce();
|
|
8538
|
+
const { options: l } = J(), c = l.editingLineController, d = c.line, h = c.show, f = d && d.text, [y, u] = pe(!1), [g, m] = pe(""), p = ee(0), v = ee(null);
|
|
8539
|
+
q(() => {
|
|
8479
8540
|
h || u(!1);
|
|
8480
|
-
}, [h]),
|
|
8541
|
+
}, [h]), q(() => {
|
|
8481
8542
|
f !== g && m(f || "");
|
|
8482
|
-
}, [f]),
|
|
8543
|
+
}, [f]), q(() => {
|
|
8483
8544
|
r.updateEditingLineView();
|
|
8484
|
-
}, [g, d == null ? void 0 : d.lineShape]),
|
|
8545
|
+
}, [g, d == null ? void 0 : d.lineShape]), q(() => {
|
|
8485
8546
|
y && v.current && v.current.focus();
|
|
8486
8547
|
}, [y]);
|
|
8487
|
-
const
|
|
8488
|
-
!d || (o && o(I, d), r.startMoveLineVertex(I, W.nativeEvent, (U,
|
|
8489
|
-
e && e(U,
|
|
8548
|
+
const L = (I, W) => {
|
|
8549
|
+
!d || (o && o(I, d), r.startMoveLineVertex(I, W.nativeEvent, (U, ie, te) => {
|
|
8550
|
+
e && e(U, ie, te), r.defaultLineVertexBeChangedHandler(U, ie, te);
|
|
8490
8551
|
}));
|
|
8491
8552
|
}, N = (I, W) => {
|
|
8492
8553
|
r.startMoveLine6CtrlPoint(I, W.nativeEvent, (U) => {
|
|
8493
8554
|
i && i(U, I);
|
|
8494
8555
|
});
|
|
8495
|
-
},
|
|
8556
|
+
}, O = (I, W) => {
|
|
8496
8557
|
r.startMoveLine44CtrlPoint(I, W.nativeEvent, (U) => {
|
|
8497
8558
|
i && i(U, I);
|
|
8498
8559
|
});
|
|
@@ -8500,23 +8561,23 @@ const Ni = {
|
|
|
8500
8561
|
r.startMoveLineText(I.nativeEvent, () => {
|
|
8501
8562
|
d && t && t(d);
|
|
8502
8563
|
});
|
|
8503
|
-
},
|
|
8564
|
+
}, T = () => {
|
|
8504
8565
|
p.current && Date.now() - p.current < 500 && u(!0), p.current = Date.now();
|
|
8505
|
-
},
|
|
8566
|
+
}, S = (I) => {
|
|
8506
8567
|
d && d.text !== I.target.value && (r.updateLine(d.id, {
|
|
8507
8568
|
text: I.target.value
|
|
8508
8569
|
}), m(I.target.value), n && n(d)), u(!1);
|
|
8509
8570
|
};
|
|
8510
8571
|
if (!h || !d)
|
|
8511
8572
|
return null;
|
|
8512
|
-
const { startPoint: R, endPoint: k, ctrlPoint1:
|
|
8573
|
+
const { startPoint: R, endPoint: k, ctrlPoint1: P, ctrlPoint2: M, line44Splits: C, text: E } = c, { lineShape: V } = d, X = `M ${R.x} ${R.y} L ${(P == null ? void 0 : P.x) || 0} ${(P == null ? void 0 : P.y) || 0}`, B = `M ${k.x} ${k.y} L ${(M == null ? void 0 : M.x) || 0} ${(M == null ? void 0 : M.y) || 0}`;
|
|
8513
8574
|
return /* @__PURE__ */ H("div", { className: "rg-editing-line-ctrl", children: [
|
|
8514
8575
|
a,
|
|
8515
|
-
/* @__PURE__ */
|
|
8516
|
-
|
|
8517
|
-
|
|
8576
|
+
/* @__PURE__ */ w("svg", { className: "rg-edt-ctrl-svg", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ H("g", { children: [
|
|
8577
|
+
V === 6 && P && /* @__PURE__ */ w("path", { d: X }),
|
|
8578
|
+
V === 6 && M && /* @__PURE__ */ w("path", { d: B })
|
|
8518
8579
|
] }) }),
|
|
8519
|
-
/* @__PURE__ */
|
|
8580
|
+
/* @__PURE__ */ w(
|
|
8520
8581
|
"div",
|
|
8521
8582
|
{
|
|
8522
8583
|
className: "rg-line-ctrl-dot start-dot",
|
|
@@ -8524,10 +8585,10 @@ const Ni = {
|
|
|
8524
8585
|
"--rg-ctl-x": R.x + "px",
|
|
8525
8586
|
"--rg-ctl-y": R.y + "px"
|
|
8526
8587
|
},
|
|
8527
|
-
onMouseDown: (I) =>
|
|
8588
|
+
onMouseDown: (I) => L("start", I)
|
|
8528
8589
|
}
|
|
8529
8590
|
),
|
|
8530
|
-
/* @__PURE__ */
|
|
8591
|
+
/* @__PURE__ */ w(
|
|
8531
8592
|
"div",
|
|
8532
8593
|
{
|
|
8533
8594
|
className: "rg-line-ctrl-dot end-dot",
|
|
@@ -8535,21 +8596,21 @@ const Ni = {
|
|
|
8535
8596
|
"--rg-ctl-x": k.x + "px",
|
|
8536
8597
|
"--rg-ctl-y": k.y + "px"
|
|
8537
8598
|
},
|
|
8538
|
-
onMouseDown: (I) =>
|
|
8599
|
+
onMouseDown: (I) => L("end", I)
|
|
8539
8600
|
}
|
|
8540
8601
|
),
|
|
8541
|
-
|
|
8602
|
+
V === 6 && P && /* @__PURE__ */ w(
|
|
8542
8603
|
"div",
|
|
8543
8604
|
{
|
|
8544
8605
|
className: "rg-line-ctrl-dot ctrl-dot",
|
|
8545
8606
|
style: {
|
|
8546
|
-
"--rg-ctl-x":
|
|
8547
|
-
"--rg-ctl-y":
|
|
8607
|
+
"--rg-ctl-x": P.x + "px",
|
|
8608
|
+
"--rg-ctl-y": P.y + "px"
|
|
8548
8609
|
},
|
|
8549
8610
|
onMouseDown: (I) => N(0, I)
|
|
8550
8611
|
}
|
|
8551
8612
|
),
|
|
8552
|
-
|
|
8613
|
+
V === 6 && M && /* @__PURE__ */ w(
|
|
8553
8614
|
"div",
|
|
8554
8615
|
{
|
|
8555
8616
|
className: "rg-line-ctrl-dot ctrl-dot",
|
|
@@ -8560,7 +8621,7 @@ const Ni = {
|
|
|
8560
8621
|
onMouseDown: (I) => N(1, I)
|
|
8561
8622
|
}
|
|
8562
8623
|
),
|
|
8563
|
-
(
|
|
8624
|
+
(V === 44 || V === 49) && C.map((I) => !I.hide && /* @__PURE__ */ w(
|
|
8564
8625
|
"div",
|
|
8565
8626
|
{
|
|
8566
8627
|
className: `rg-line-ctrl-dot ctrl-split ${I.optionName.startsWith("cp-") ? "" : "ctrl-split-core"} ${I.direction === "v" ? "ctrl-split-v" : ""} ${I.direction === "h" ? "ctrl-split-h" : ""}`,
|
|
@@ -8568,11 +8629,11 @@ const Ni = {
|
|
|
8568
8629
|
"--rg-ctl-x": I.x + "px",
|
|
8569
8630
|
"--rg-ctl-y": I.y + "px"
|
|
8570
8631
|
},
|
|
8571
|
-
onMouseDown: (W) =>
|
|
8632
|
+
onMouseDown: (W) => O(I, W)
|
|
8572
8633
|
},
|
|
8573
8634
|
I.optionName
|
|
8574
8635
|
)),
|
|
8575
|
-
s && d && /* @__PURE__ */
|
|
8636
|
+
s && d && /* @__PURE__ */ w(
|
|
8576
8637
|
"div",
|
|
8577
8638
|
{
|
|
8578
8639
|
className: ["rg-line-ctrl-text", y && "rg-line-ctrl-text-editing"].filter(Boolean).join(" "),
|
|
@@ -8580,18 +8641,18 @@ const Ni = {
|
|
|
8580
8641
|
"--rg-ctl-x": c.text.x + "px",
|
|
8581
8642
|
"--rg-ctl-y": c.text.y + "px"
|
|
8582
8643
|
},
|
|
8583
|
-
onClick:
|
|
8644
|
+
onClick: T,
|
|
8584
8645
|
onMouseDown: b,
|
|
8585
|
-
children: y ? /* @__PURE__ */
|
|
8646
|
+
children: y ? /* @__PURE__ */ w(
|
|
8586
8647
|
"input",
|
|
8587
8648
|
{
|
|
8588
8649
|
ref: v,
|
|
8589
8650
|
className: "rg-line-text-input",
|
|
8590
8651
|
value: g,
|
|
8591
8652
|
onChange: (I) => m(I.target.value),
|
|
8592
|
-
onBlur:
|
|
8653
|
+
onBlur: S
|
|
8593
8654
|
}
|
|
8594
|
-
) : g ? /* @__PURE__ */
|
|
8655
|
+
) : g ? /* @__PURE__ */ w("p", { children: g }) : /* @__PURE__ */ w("p", { className: "empty-text", children: "Add Text..." })
|
|
8595
8656
|
}
|
|
8596
8657
|
)
|
|
8597
8658
|
] });
|
|
@@ -8602,7 +8663,7 @@ const Ni = {
|
|
|
8602
8663
|
onMouseUp: (e) => o("", e),
|
|
8603
8664
|
onTouchEnd: (e) => o("", e),
|
|
8604
8665
|
children: [
|
|
8605
|
-
/* @__PURE__ */
|
|
8666
|
+
/* @__PURE__ */ w(
|
|
8606
8667
|
"div",
|
|
8607
8668
|
{
|
|
8608
8669
|
className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-t",
|
|
@@ -8611,7 +8672,7 @@ const Ni = {
|
|
|
8611
8672
|
onTouchEnd: (e) => o("top", e)
|
|
8612
8673
|
}
|
|
8613
8674
|
),
|
|
8614
|
-
/* @__PURE__ */
|
|
8675
|
+
/* @__PURE__ */ w(
|
|
8615
8676
|
"div",
|
|
8616
8677
|
{
|
|
8617
8678
|
className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-b",
|
|
@@ -8620,7 +8681,7 @@ const Ni = {
|
|
|
8620
8681
|
onTouchEnd: (e) => o("bottom", e)
|
|
8621
8682
|
}
|
|
8622
8683
|
),
|
|
8623
|
-
/* @__PURE__ */
|
|
8684
|
+
/* @__PURE__ */ w(
|
|
8624
8685
|
"div",
|
|
8625
8686
|
{
|
|
8626
8687
|
className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-center",
|
|
@@ -8629,7 +8690,7 @@ const Ni = {
|
|
|
8629
8690
|
onTouchEnd: (e) => o("border", e)
|
|
8630
8691
|
}
|
|
8631
8692
|
),
|
|
8632
|
-
/* @__PURE__ */
|
|
8693
|
+
/* @__PURE__ */ w(
|
|
8633
8694
|
"div",
|
|
8634
8695
|
{
|
|
8635
8696
|
className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-l",
|
|
@@ -8638,7 +8699,7 @@ const Ni = {
|
|
|
8638
8699
|
onTouchEnd: (e) => o("left", e)
|
|
8639
8700
|
}
|
|
8640
8701
|
),
|
|
8641
|
-
/* @__PURE__ */
|
|
8702
|
+
/* @__PURE__ */ w(
|
|
8642
8703
|
"div",
|
|
8643
8704
|
{
|
|
8644
8705
|
className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-r",
|
|
@@ -8647,7 +8708,7 @@ const Ni = {
|
|
|
8647
8708
|
onTouchEnd: (e) => o("right", e)
|
|
8648
8709
|
}
|
|
8649
8710
|
),
|
|
8650
|
-
/* @__PURE__ */
|
|
8711
|
+
/* @__PURE__ */ w(
|
|
8651
8712
|
"div",
|
|
8652
8713
|
{
|
|
8653
8714
|
className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-lr",
|
|
@@ -8656,7 +8717,7 @@ const Ni = {
|
|
|
8656
8717
|
onTouchEnd: (e) => o("lr", e)
|
|
8657
8718
|
}
|
|
8658
8719
|
),
|
|
8659
|
-
/* @__PURE__ */
|
|
8720
|
+
/* @__PURE__ */ w(
|
|
8660
8721
|
"div",
|
|
8661
8722
|
{
|
|
8662
8723
|
className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-tb",
|
|
@@ -8665,18 +8726,18 @@ const Ni = {
|
|
|
8665
8726
|
onTouchEnd: (e) => o("tb", e)
|
|
8666
8727
|
}
|
|
8667
8728
|
),
|
|
8668
|
-
/* @__PURE__ */
|
|
8669
|
-
/* @__PURE__ */
|
|
8670
|
-
/* @__PURE__ */
|
|
8671
|
-
/* @__PURE__ */
|
|
8729
|
+
/* @__PURE__ */ w("div", { className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-bottom-bar", "data-point": "bottom", "data-innode": "true", onMouseUp: (e) => s("bottom", e), onTouchEnd: (e) => onMouseUpWithOffset("bottom", e) }),
|
|
8730
|
+
/* @__PURE__ */ w("div", { className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-top-bar", "data-point": "top", "data-innode": "true", onMouseUp: (e) => s("top", e), onTouchEnd: (e) => onMouseUpWithOffset("top", e) }),
|
|
8731
|
+
/* @__PURE__ */ w("div", { className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-left-bar", "data-point": "left", "data-innode": "true", onMouseUp: (e) => s("left", e), onTouchEnd: (e) => onMouseUpWithOffset("left", e) }),
|
|
8732
|
+
/* @__PURE__ */ w("div", { className: "rg-connect-ctl-handler rg-connect-ctl-handler-style rg-connect-ctl-right-bar", "data-point": "right", "data-innode": "true", onMouseUp: (e) => s("right", e), onTouchEnd: (e) => onMouseUpWithOffset("right", e) })
|
|
8672
8733
|
]
|
|
8673
8734
|
}
|
|
8674
8735
|
), Ai = ({ children: s }) => {
|
|
8675
8736
|
const o = $();
|
|
8676
|
-
|
|
8677
|
-
const e = ee(), { options: t } =
|
|
8737
|
+
ce();
|
|
8738
|
+
const e = ee(), { options: t } = J();
|
|
8678
8739
|
if (!t.nodeConnectController.show)
|
|
8679
|
-
return /* @__PURE__ */
|
|
8740
|
+
return /* @__PURE__ */ w(le, {});
|
|
8680
8741
|
const n = (a, r) => {
|
|
8681
8742
|
o.onLineVertexBeDroppedOnConnectController(a, r, void 0, (l, c, d) => {
|
|
8682
8743
|
x("onLineVertexBeDropped:callback:", d);
|
|
@@ -8686,7 +8747,7 @@ const Ni = {
|
|
|
8686
8747
|
x("onLineVertexBeDropped:callback:", d);
|
|
8687
8748
|
});
|
|
8688
8749
|
};
|
|
8689
|
-
return /* @__PURE__ */
|
|
8750
|
+
return /* @__PURE__ */ w(
|
|
8690
8751
|
"div",
|
|
8691
8752
|
{
|
|
8692
8753
|
className: "rg-editing-connect-ctrl",
|
|
@@ -8696,7 +8757,7 @@ const Ni = {
|
|
|
8696
8757
|
width: t.nodeConnectController.width + "px",
|
|
8697
8758
|
height: t.nodeConnectController.height + "px"
|
|
8698
8759
|
},
|
|
8699
|
-
children: s || /* @__PURE__ */
|
|
8760
|
+
children: s || /* @__PURE__ */ w(
|
|
8700
8761
|
At,
|
|
8701
8762
|
{
|
|
8702
8763
|
mouseUpOnJunctionPoint: n,
|
|
@@ -8711,7 +8772,7 @@ const Ni = {
|
|
|
8711
8772
|
e && e(c, d, h), a.defaultLineConnectEndHandler(c, d, h);
|
|
8712
8773
|
});
|
|
8713
8774
|
};
|
|
8714
|
-
return /* @__PURE__ */
|
|
8775
|
+
return /* @__PURE__ */ w(
|
|
8715
8776
|
"div",
|
|
8716
8777
|
{
|
|
8717
8778
|
className: `rg-connect-source-handle ${n || ""}`,
|
|
@@ -8739,22 +8800,22 @@ const Ni = {
|
|
|
8739
8800
|
onDragConnectEnd: f
|
|
8740
8801
|
}) => {
|
|
8741
8802
|
const y = $(), u = ee(null);
|
|
8742
|
-
|
|
8803
|
+
q(() => (y.registerConnectTarget(u.current, n, i || A.CanvasPoint, t, a), () => {
|
|
8743
8804
|
y.unregisterConnectTarget(n);
|
|
8744
8805
|
}), []);
|
|
8745
8806
|
const g = (p, v) => {
|
|
8746
|
-
v.stopPropagation(), !l && y.onLineVertexBeDropped(p, v.nativeEvent, void 0, (
|
|
8747
|
-
d && d(
|
|
8807
|
+
v.stopPropagation(), !l && y.onLineVertexBeDropped(p, v.nativeEvent, void 0, (L, N, O) => {
|
|
8808
|
+
d && d(L, N, O);
|
|
8748
8809
|
});
|
|
8749
8810
|
}, m = (p) => {
|
|
8750
8811
|
if (p.stopPropagation(), c || y.options.creatingLinePlot)
|
|
8751
8812
|
return;
|
|
8752
8813
|
const v = Object.assign({}, r || {});
|
|
8753
|
-
v.from || (v.from = n), v.fromType || (v.fromType = i ||
|
|
8754
|
-
f && f(
|
|
8814
|
+
v.from || (v.from = n), v.fromType || (v.fromType = i || A.NodePoint), v.fromJunctionPoint || (v.fromJunctionPoint = t), h && h(v, p.nativeEvent), y.startCreateLineFromNode(null, v, p.nativeEvent, (L, N, O) => {
|
|
8815
|
+
f && f(L, N, O);
|
|
8755
8816
|
});
|
|
8756
8817
|
};
|
|
8757
|
-
return /* @__PURE__ */
|
|
8818
|
+
return /* @__PURE__ */ w(
|
|
8758
8819
|
"div",
|
|
8759
8820
|
{
|
|
8760
8821
|
ref: u,
|
|
@@ -8762,7 +8823,7 @@ const Ni = {
|
|
|
8762
8823
|
style: e,
|
|
8763
8824
|
"data-point": t,
|
|
8764
8825
|
"data-target-id": n,
|
|
8765
|
-
"data-target-type": i ||
|
|
8826
|
+
"data-target-type": i || A.CanvasPoint,
|
|
8766
8827
|
"data-target-data": JSON.stringify(a),
|
|
8767
8828
|
onMouseDown: (p) => m(p),
|
|
8768
8829
|
onMouseUp: (p) => g(t, p),
|
|
@@ -8773,8 +8834,8 @@ const Ni = {
|
|
|
8773
8834
|
}
|
|
8774
8835
|
);
|
|
8775
8836
|
}, zi = ({ showText: s, adsorption: o }) => {
|
|
8776
|
-
const e = $(), { options: t } =
|
|
8777
|
-
return
|
|
8837
|
+
const e = $(), { options: t } = J();
|
|
8838
|
+
return q(() => (e.onReferenceLineMounted(o), () => {
|
|
8778
8839
|
e.onReferenceLineUnMounted();
|
|
8779
8840
|
}), [t]), /* @__PURE__ */ H(
|
|
8780
8841
|
"div",
|
|
@@ -8784,7 +8845,7 @@ const Ni = {
|
|
|
8784
8845
|
display: t.editingReferenceLine.show ? "block" : "none"
|
|
8785
8846
|
},
|
|
8786
8847
|
children: [
|
|
8787
|
-
t.editingReferenceLine.directionV && /* @__PURE__ */
|
|
8848
|
+
t.editingReferenceLine.directionV && /* @__PURE__ */ w(
|
|
8788
8849
|
"div",
|
|
8789
8850
|
{
|
|
8790
8851
|
className: "rg-referline rg-referline-v",
|
|
@@ -8792,13 +8853,13 @@ const Ni = {
|
|
|
8792
8853
|
transform: `translate(var(--rg-refer-offset), 0px) translate(${t.editingReferenceLine.v_x}px, ${t.editingReferenceLine.v_y}px)`,
|
|
8793
8854
|
height: t.editingReferenceLine.v_height + "px"
|
|
8794
8855
|
},
|
|
8795
|
-
children: /* @__PURE__ */
|
|
8856
|
+
children: /* @__PURE__ */ w("div", { className: "referline", children: s !== !1 && /* @__PURE__ */ H("div", { children: [
|
|
8796
8857
|
Math.round(t.editingReferenceLine.v_height),
|
|
8797
8858
|
"px"
|
|
8798
8859
|
] }) })
|
|
8799
8860
|
}
|
|
8800
8861
|
),
|
|
8801
|
-
t.editingReferenceLine.directionH && /* @__PURE__ */
|
|
8862
|
+
t.editingReferenceLine.directionH && /* @__PURE__ */ w(
|
|
8802
8863
|
"div",
|
|
8803
8864
|
{
|
|
8804
8865
|
className: "rg-referline rg-referline-h",
|
|
@@ -8806,7 +8867,7 @@ const Ni = {
|
|
|
8806
8867
|
transform: `translate(0px, var(--rg-refer-offset)) translate(${t.editingReferenceLine.h_x}px, ${t.editingReferenceLine.h_y}px)`,
|
|
8807
8868
|
width: t.editingReferenceLine.h_width + "px"
|
|
8808
8869
|
},
|
|
8809
|
-
children: /* @__PURE__ */
|
|
8870
|
+
children: /* @__PURE__ */ w("div", { className: "referline", children: s !== !1 && /* @__PURE__ */ H("div", { children: [
|
|
8810
8871
|
Math.round(t.editingReferenceLine.h_width),
|
|
8811
8872
|
"px"
|
|
8812
8873
|
] }) })
|
|
@@ -8817,37 +8878,37 @@ const Ni = {
|
|
|
8817
8878
|
);
|
|
8818
8879
|
}, Bi = (s) => {
|
|
8819
8880
|
const o = $();
|
|
8820
|
-
return
|
|
8821
|
-
|
|
8822
|
-
const e =
|
|
8881
|
+
return q(() => {
|
|
8882
|
+
lt("React-Linker"), o.setOptions(s.options);
|
|
8883
|
+
const e = Ue(s);
|
|
8823
8884
|
x("[RelationGraph]mounted:listeners:", e), o.setListeners(e), o.ready(), o.dataUpdated();
|
|
8824
|
-
}, []),
|
|
8885
|
+
}, []), q(() => {
|
|
8825
8886
|
o.setOptions(s.options || {}), o.dataUpdated();
|
|
8826
|
-
}, [s.options]),
|
|
8887
|
+
}, [s.options]), q(() => {
|
|
8827
8888
|
s.lines && (x("[RelationGraph] apply data"), (async () => (o.clearGraph(), o.addFakeLines(s.lines), o.dataUpdated()))());
|
|
8828
|
-
}, [s.lines]), /* @__PURE__ */
|
|
8889
|
+
}, [s.lines]), /* @__PURE__ */ w(_t, { ...s });
|
|
8829
8890
|
}, Gi = (s) => {
|
|
8830
|
-
const o =
|
|
8831
|
-
return /* @__PURE__ */
|
|
8891
|
+
const o = Ke(s.relationGraphCore, !0);
|
|
8892
|
+
return /* @__PURE__ */ w(et, { graphInstance: o, children: /* @__PURE__ */ w(Bi, { ...s, children: s.children }) });
|
|
8832
8893
|
}, Fi = (s) => {
|
|
8833
8894
|
const o = Et(s.relationGraphCore);
|
|
8834
|
-
return /* @__PURE__ */
|
|
8835
|
-
}, qi =
|
|
8895
|
+
return /* @__PURE__ */ w(Dt, { graphInstance: o, children: s.children });
|
|
8896
|
+
}, qi = rt, Ji = It, Zi = {
|
|
8836
8897
|
BaseLayout: ve,
|
|
8837
8898
|
BidirectionalTreeLayout: bt,
|
|
8838
8899
|
CenterLayout: Ot,
|
|
8839
|
-
CircleLayout:
|
|
8840
|
-
FixedLayout:
|
|
8900
|
+
CircleLayout: Tt,
|
|
8901
|
+
FixedLayout: Pt,
|
|
8841
8902
|
ForceLayout: Re,
|
|
8842
|
-
RGFolderLayout:
|
|
8903
|
+
RGFolderLayout: St
|
|
8843
8904
|
}, Qi = {
|
|
8844
8905
|
RGOptionsDataUtils: Kt,
|
|
8845
8906
|
RGLineDataUtils: jt,
|
|
8846
8907
|
RGNodeDataUtils: Zt,
|
|
8847
8908
|
RGGraphMath: Q,
|
|
8848
|
-
RGNodesAnalyticUtils:
|
|
8849
|
-
RGEffectUtils:
|
|
8850
|
-
}, Ki =
|
|
8909
|
+
RGNodesAnalyticUtils: z,
|
|
8910
|
+
RGEffectUtils: Z
|
|
8911
|
+
}, Ki = Ti, eo = ut, to = ht, no = bi, io = Oi, oo = yt, so = xt, ao = Ri, ro = Ii, lo = ki, co = Si, ho = Mi, uo = Ei, fo = Di, go = Ai, po = Vi, yo = Xi, mo = At, vo = zi, xo = Qe, Lo = Qe, Co = wt, wo = Ct, Yi = Pi, _o = Lt, No = Gi, Hi = Ni, bo = Hi.useRelationGraph, Oo = Fi, To = wi;
|
|
8851
8912
|
export {
|
|
8852
8913
|
ro as RGBackground,
|
|
8853
8914
|
po as RGConnectSource,
|
|
@@ -8864,36 +8925,36 @@ export {
|
|
|
8864
8925
|
D as RGEventNames,
|
|
8865
8926
|
Ki as RGFakeNode,
|
|
8866
8927
|
Hi as RGHooks,
|
|
8867
|
-
|
|
8928
|
+
A as RGInnerConnectTargetType,
|
|
8868
8929
|
Be as RGInstanceContext,
|
|
8869
8930
|
j as RGJunctionPoint,
|
|
8870
8931
|
Zi as RGLayouts,
|
|
8871
8932
|
eo as RGLinePath,
|
|
8872
|
-
|
|
8933
|
+
F as RGLineShape,
|
|
8873
8934
|
to as RGLineText,
|
|
8874
8935
|
so as RGMiniToolBar,
|
|
8875
8936
|
ao as RGMiniView,
|
|
8876
8937
|
oo as RGNodeExpandHolder,
|
|
8877
8938
|
ze as RGNodeShape,
|
|
8878
8939
|
Oo as RGProvider,
|
|
8879
|
-
|
|
8880
|
-
|
|
8940
|
+
wo as RGSlotOnCanvas,
|
|
8941
|
+
Co as RGSlotOnCanvasAbove,
|
|
8881
8942
|
xo as RGSlotOnGraph,
|
|
8882
8943
|
_o as RGSlotOnLine,
|
|
8883
8944
|
Yi as RGSlotOnNode,
|
|
8884
|
-
|
|
8945
|
+
Lo as RGSlotOnView,
|
|
8885
8946
|
io as RGToolBar,
|
|
8886
8947
|
en as RGUpdateContext,
|
|
8887
8948
|
dt as RGUpdateSignalContext,
|
|
8888
8949
|
dt as RGUpdateSingalContext,
|
|
8889
8950
|
Qi as RGUtils,
|
|
8890
8951
|
lo as RGWatermark,
|
|
8891
|
-
|
|
8952
|
+
To as RelationGraph,
|
|
8892
8953
|
Ji as RelationGraphCore,
|
|
8893
8954
|
Be as RelationGraphStoreContext,
|
|
8894
8955
|
No as RelationLinker,
|
|
8895
8956
|
Ni as _RGHooks,
|
|
8896
|
-
|
|
8957
|
+
wi as default,
|
|
8897
8958
|
bo as useRelationGraph,
|
|
8898
8959
|
qi as version
|
|
8899
8960
|
};
|