@relation-graph/vue3 3.0.7 → 3.0.9
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 +13 -1
- package/relation-graph.js +7 -7
- package/relation-graph.mjs +795 -822
- package/relation-graph.umd.js +8 -8
- package/style.css +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/WebComponentStyleVariables.d.ts +4 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/WebComponentUtils.d.ts +3 -2
- package/types/packages/platforms/svelte/src/index.d.ts +2 -229
- package/types/packages/platforms/svelte/src/index.shared.d.ts +229 -0
- package/types/packages/platforms/svelte/src/index.wc.d.ts +2 -0
package/relation-graph.mjs
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
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:200px;min-height:200px;--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-map-background{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}.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 .15s ease}.relation-graph.rg-enable-node-xy-animation .rg-line-peel{transition:none}.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-on-path{--rg-line-text-bg-color: #ffffff}.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;white-space:nowrap;background-color:var(--rg-line-text-bg-color)}.relation-graph .rg-linetext-container .rg-line-checked .rg-line-label{background-color:var(--rg-checked-line-text-bg-color);color:#0f172a}.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:#fff;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(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:50%;transform:translate(-50%)}.relation-graph .rg-resize-ctl .rg-resize-ctl-b{cursor:s-resize;bottom:var(--resize-handler-offset);left:50%;transform:translate(-50%)}.relation-graph .rg-resize-ctl .rg-resize-ctl-l{cursor:w-resize;left:var(--resize-handler-offset);top:50%;transform:translateY(-50%)}.relation-graph .rg-resize-ctl .rg-resize-ctl-r{cursor:e-resize;right:var(--resize-handler-offset);top:50%;transform:translateY(-50%)}.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{pointer-events:auto}.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;color:#000}.relation-graph .rg-node-expand-holder .rg-node-expand-button{width:16px;height:16px;border-radius:15px;cursor:pointer;pointer-events:all;border:#666 solid 1px;background-color:#fff;display:flex;align-items:center;justify-content:center}.relation-graph .rg-node-expand-holder .rg-icon{width:14px;height:14px}.relation-graph .c-expand-positon-hide{display:none}.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:#ffffffe6}.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;padding:2px 15px;text-align:center;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:5px;font-size:12px;background-color:#fff;border:#666 solid 1px;color:#666;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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4Ij48aW1hZ2UgeGxpbms6aHJlZj0iZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFFQUFBQUJBQ0FZQUFBQ3FhWEhlQUFBQUFYTlNSMElBcnM0YzZRQUFDWlpKUkVGVWVGN3RXZ3RNVk5rWi9xYThabkZ4QkVIQWlCV3lFa0drUEcwRW1paWdGVVZzcFZxTmlsSmZRVEV4c2k2eDFqZHRMVnVEeGpoTlJDc0JzeHBOZktEV0J4Q05QTFFpaUNoRzBTQkxKZHBTYUFWNXlHaW4rOTNjdzQ2enVEc0Rkd1lUT01uSm5XRXU5NTcvKy8vLyt4L25xRERJaDJxUXk0OGhBSVlzWUpBak1PUUNnOXdBaGtod3lBV0dYR0NRSXpEa0FnTmtBQUo0UXdYbzViV0lxMVdXWm0wTDRQdCtCTUJHdnZJN0o0WG0vQitBZC9MVktrQllBd0FocEJEY3RyS3lNc3pYMTNlcG5aMWRvTDI5ZlhoM2QzZTVUcWVycnEydHpRc0pDYmtENEswUkVCWUR3NUlBR0dxYkdyY0ZZSGYvL3YxWkV5Wk0rTE90cmEyN3NZMi9mZnYybjQ4ZVBmcDgwcVJKZndPZ2s0RWdHTFFNVHNXQnNBUUFRdU1VMkxhc3JDekF6ODh2U2ExV0I2dlY2Z2doOUtWTGw4QjU0TUFCckYrL0huRnhjZElVUTZmVFBlN3M3THgyK1BEaFA2U2xwZjNieUNvVTR3ZExBRUJ0YzlxM3RMUnNkWFoyL3NKNHRRME5EUWdNRE1TclY2OTZmdEpvTktpdXJzYllzV1BmdTEybjB6MjRjZVBHNnRqWTJHb0EzUWF1b1FnSVNnUEE1OWxSZUsxVzY1T1NrbktQcXp4eTVBaU9IajJLMHRKU1RKMDZGY09HRGNQRml4ZXhZOGNPYk4rK0hUdDM3cFErejU0OUcrM3Q3YmgrL1RvaUl5T1JuSnlNRlN0V29MdTd1elkzTjNmK3FsV3I2bVFRaEZ2MEd3U2xBYURtSFFBNHZuang0azhlSGg2L29URFRwazNyZGFGNi9iY3VyVkwxdnBScjE2NUpvTDE4K2ZLdm5wNmV2d1hRQ2VDTjdCTDk1Z1dsQWFEMkhRRTR0YmEyWG5CeWN2cEpSRVFFYnQ2OCtSMXRFNUhlQURDMmlpbFRwcUNzckV3Q3NLT2o0MjVYVjFkNWZuNStWbkp5Y29OTWxDSnM5c2thbEFTQXo2TDJod0VZb2Rmcm4zSkZRck85Q2R1WHYvR1pPcDN1SC9YMTllbSt2cjc1QnRHQzFtRDJVQklBeG5rMXRRL0FSYS9YUDFRS2dISGp4cUcrdnY0N3ZKQ2Vudjd6ZmZ2Mk5SbndndGxoVWtrQTZQK2ZBQmdPWUtSZXJ5ZHJLMklCeG1vVnZORFkyTGh2ekpneHUyVmVFQkhDTEN0UUVnREdmZnEvUmdiZ3JsSUFmSWdYMnRyYWJnOGZQdnlYQU5vQWRNbnVZSFVBYVBvRTB0NElnTnRLQWZCOVhLRlNxWHdBTUtGb2wxM0JMRGZvandWUWNKSGYyeFFWRlFXTUh6OStiazFOemRkeGNYRVA5WHA5c1pVQThBUFFBdUMxYkFWbWtXRmZBYURnVXFwYlYxY1g3Kzd1L2l0SFI4ZjV2ZG1lMGxIQStIa3FsU29RUURPQVZwa0xHQlpOSG4wQlFBaHZYMUZSTVRVa0pPUVUyWjhzZmV2V0xYUjFkU0VoSVFFdUxpN1NJcXdBUUpBTUFOMmdRMDZWTFFZQUFaT3l2ZFRVMUZGNzkrNHR0TGUzOThuSnlVRnFhcXFVeG5Jd245KzBhWlAwTnlzQUVBS0F4WklBZ0dteXljTmNDNkQyU1hhZkZCY1h4MGRGUmVVMk5UVmg4dVRKVXB4ZXVIQWgzcjE3aDFPbmFCVEF5Wk1uc1dEQkF1bXpJWkd4NkhuOCtESG16Ly9XYTBTNnpCQW5oaW5ncVZTcVVBRE1CYXdDQUxYUFpPZlR1cnE2MzNsN2U2ZHF0VnFzVzdjT3k1Y3Zsd29lamtPSERtSE5talVZT1hJa21wdnBudThEWUtwNkJKQ0dRUFhDQVFTQUZ2QmYyUVVzYWdITTlhVmtwN2k0ZUZsVVZGVEdpUk1uc0dqUklrbjd4NDhmNzVHTkdtVWhKSWFoQlpnS2dDbWtLbHVBVlFGZ3JxODVkdXhZM09MRmkvOUMwdzhJQ0lDTmpRMEtDd3NSSGg3ZXMrNVpzMlpKVFErUnlQUkg4QSs1eFlBQkFNQzFvYUhob0plWDEwODNidHlJckt3c1RKOCtIVmV2WGxWQ3pnOCs0d011WURVT0VPa3U4MzNYN096c09TdFhydHoxK3ZWclJFZEhvN3k4SEZ1M2JzV3VYYnNzQnNKQUF5QklrQldmTTRCUnQyL2Yvanc4UER6K3lwVXJtRGx6cGlUNGhRc1hwTzZPMHFPcXFnckJ3Y0VZUFhvMEdoc2I4ZWJObTFkcXRacmRGcXVIUVJZOUkxajBCQVVGalNzb0tQalMxZFgxeDl1MmJjUHUzYnVsUmJLSm9WWXpZQ2czbUcrd1RSWWFHb283ZCs2Z3RiWDFhNDFHOHdzREFOZ3RzbWdVb0RTTUJHeDhTSFUvWFVHcjFjYWxwS1NrODBmMjhpaDhSa1lHdG16Wm9wejAzK1M1NmVucHlNek14TnExYTNIdzRFRTBOVFhkR3pWcVZKSkJKa2dBckpJS2k5WVhTMStDNEZaWldmbEZjSEJ3OUprelp6QnYzanhKOEljUEg4TFBqN1dLTW1QdTNMbkl6OC9IK2ZQbkVSOGZqOU9uVC84eE1USHhLNk5hd0NyRkVNbVFWdkNwY0lVTkd6Wk16c3pNM0dOblorZVFsSlNFdkx3OGFaRmNyQkpEY0F6OW44QTZPanAyUmtkSEx5Z3BLV0hyamRVZ2V3SnNsbG9GQU5IK1psTFU0d3FGaFlXclkySmlmczFVbDY3QTZFQ056Wmt6cDk4WWVIbDU0Zm56NXowNVJVMU56WldBZ0lDZEFQNGxaNEVzaDlrVnNtby9RR3FCaXk2UWs1T1RlMjF0YlphSGg4ZG5vdGRQeWZ1YkJTNWJ0Z3k1dWJtWU9IRWlDZ29LNE9ucGljMmJONi9mczJkUHFVeUFMSVZaQ1hJN3pheGhiakZrK0hCUkdZcEdLS09DSU1UTnZKRmNRRTVnVkNncEthSFptclU0M2h3Ykc0dWlvaUpKZUJaWC92Nyt1SGZ2WGtGUVVGQ0dYQVFaTmtQTUlrQSt2ejhBOFA5WkhmYlVCd3lMbktXbHBlc2pJaUlTZUFQMyt5NWZ2Z3huWjJka1oyY2pNVEhSSkJBWTh0TFMwdERTMHZLZThNM056UTJ1cnE1clpPRlphWWtxMEd6elZ3SUFQa1BzQmtrMWdnQ2hycTd1OTk3ZTNteFc5R3g5OFhOWVdCaVdMbDBLYm5pNHVibEprMXRsRHg0OGtHWk5UWTEwUFh2MnJBU1VvZWFsQmF0VWpQc1VYQlJBb2hWbVZ2d1hXdWl2QlFnUUdSV2tNbGxFQlliSGtwS1NsTWpJU0NrOUpDZWNPM2NPZCs5S3plSWZIR1Q3MWF0WFM1TSsvK3paczJvZkh4K1NIazJlOHo4eTh6UDIwL2ZOWW44bEFUQjJCVVlGa1IrTXlNdkxTMWl5Wk1rSzhVSUN3TWp3NU1rVFBIMzZWTHJTekNrd0JRMEtDcEtLcWhrelpraHV3L0ZONisxNldGallBWm50S1RocmYwRjhmZG9QVUJvQTRRcFN0MGkyQklKQVl0UmtabWIrTENZbVpvcS92MytvV3EwMmlRbDFPdDJicXFxcXYrZms1RnpWYXJYM1pZSHA3NXlNK1dSOUNrL1ROeXYwR1RQNUQ1cWppVGVJcUVBUWhEdlFHbGc1OGtyM1VPL2Z2ejh5SkNURTE4M056ZFhaMmRsVm85RzRPRGc0T0haMmRyWjFkSFMwdGJlM3R4VVhGNWRuWldXVlZWUlVNTWF6MFVpQk9hbDFmaGZDOTJ0alZDa1NOQVpVT2h3aHRzbmx6VklLVDVLa2RSQWNSZzd5aGpnc3hXZUlRMUxVS0RYTHJJNkNVbUF4K1owN1FJb2RsRkNDQkkwTlJGaUNTSmVaTEZGd0lUeS9Fd0FCQWtPcEFJQWFGUUJRVUU2U25EZ1RRRkFFNGZXSjlIcGJySWtXYnRadGhnZWtwQk1qOGhTZnBVMFZPWThRQVBBRkJJQ1RRbkpTWUdwYmZCY25RL3JzODlZQ1FMem52ZTB6c1p0a1lQcmlkMkVCRkV5QVFHSEZGTDZ1aU5ZdFJZTGZaeUxDSW9UQVlrTlZhSisvaThPU3ZSMllWRnh3UzRSQlUzMUU4STQ0VG1mOGY0WkFtUHJNUHQ5bkNSTHM4MklHNGgrSEFCZ0kxRCttZHc1WndNZWtqWUZZeTVBRkRBVHFIOU03QjcwRi9COEJrUXA5WU5iRzJRQUFBQUJKUlU1RXJrSmdnZz09IiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiLz48L3N2Zz4=) 16 16,auto!important;cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAACZZJREFUeF7tWgtMVNkZ/qa8ZnFxBEHAiBWyEkGkPG0EmiigFUVspVqNilJfQTExsi6x1jdtLVuDxjhNRCsBsxpNfKDWBxCNPLQiiChG0SBLJdpSaAV5yGin+93cw46zuDsDdwYTOMnJnWEu957/+///+x/nqDDIh2qQy48hAIYsYJAjMOQCg9wAhkhwyAWGXGCQIzDkAgNkAAJ4QwXo5bWIq1WWZm0L4Pt+BMBGvvI7J4Xm/B+Ad/LVKkBYAwAhpBDctrKyMszX13epnZ1doL29fXh3d3e5Tqerrq2tzQsJCbkD4K0REBYDw5IAGGqbGrcFYHf//v1ZEyZM+LOtra27sY2/ffv2n48ePfp80qRJfwOgk4EgGLQMTsWBsAQAQuMU2LasrCzAz88vSa1WB6vV6ggh9KVLl8B54MABrF+/HnFxcdIUQ6fTPe7s7Lx2+PDhP6Slpf3byCoU4wdLAEBtc9q3tLRsdXZ2/sJ4tQ0NDQgMDMSrV696ftJoNKiursbYsWPfu12n0z24cePG6tjY2GoA3QauoQgISgPA59lReK1W65OSknKPqzxy5AiOHj2K0tJSTJ06FcOGDcPFixexY8cObN++HTt37pQ+z549G+3t7bh+/ToiIyORnJyMFStWoLu7uzY3N3f+qlWr6mQQhFv0GwSlAaDmHQA4vnjx4k8eHh6/oTDTpk3rdaF6/bcurVL1vpRr165JoL18+fKvnp6evwXQCeCN7BL95gWlAaD2HQE4tba2XnBycvpJREQEbt68+R1tE5HeADC2iilTpqCsrEwCsKOj425XV1d5fn5+VnJycoNMlCJs9skalASAz6L2hwEYodfrn3JFQrO9CduXv/GZOp3uH/X19em+vr75BtGC1mD2UBIAxnk1tQ/ARa/XP1QKgHHjxqG+vv47vJCenv7zffv2NRnwgtlhUkkA6P+fABgOYKRerydrK2IBxmoVvNDY2LhvzJgxu2VeEBHCLCtQEgDGffq/RgbgrlIAfIgX2trabg8fPvyXANoAdMnuYHUAaPoE0t4IgNtKAfB9XKFSqXwAMKFol13BLDfojwVQcJHf2xQVFQWMHz9+bk1NzddxcXEP9Xp9sZUA8APQAuC1bAVmkWFfAaDgUqpbV1cX7+7u/itHR8f5vdme0lHA+HkqlSoQQDOAVpkLGBZNHn0BQAhvX1FRMTUkJOQU2Z8sfevWLXR1dSEhIQEuLi7SIqwAQJAMAN2gQ06VLQYAAZOyvdTU1FF79+4ttLe398nJyUFqaqqUxnIwn9+0aZP0NysAEAKAxZIAgGmyycNcC6D2SXafFBcXx0dFReU2NTVh8uTJUpxeuHAh3r17h1OnaBTAyZMnsWDBAumzIZGx6Hn8+DHmz//Wa0S6zBAnhingqVSqUADMBawCALXPZOfTurq633l7e6dqtVqsW7cOy5cvlwoejkOHDmHNmjUYOXIkmpvpnu8DYKp6BJCGQPXCAQSAFvBf2QUsagHM9aVkp7i4eFlUVFTGiRMnsGjRIkn7x48f75GNGmUhJIahBZgKgCmkKluAVQFgrq85duxY3OLFi/9C0w8ICICNjQ0KCwsRHh7es+5Zs2ZJTQ+RyPRH8A+5xYABAMC1oaHhoJeX1083btyIrKwsTJ8+HVevXlVCzg8+4wMuYDUOEOku833X7OzsOStXrtz1+vVrREdHo7y8HFu3bsWuXbssBsJAAyBIkBWfM4BRt2/f/jw8PDz+ypUrmDlzpiT4hQsXpO6O0qOqqgrBwcEYPXo0Ghsb8ebNm1dqtZrdFquHQRY9I1j0BAUFjSsoKPjS1dX1x9u2bcPu3bulRbKJoVYzYCg3mG+wTRYaGoo7d+6gtbX1a41G8wsDANgtsmgUoDSMBGx8SHU/XUGr1calpKSk80f28ih8RkYGtmzZopz03+S56enpyMzMxNq1a3Hw4EE0NTXdGzVqVJJBJkgArJIKi9YXS1+C4FZZWflFcHBw9JkzZzBv3jxJ8IcPH8LPj7WKMmPu3LnIz8/H+fPnER8fj9OnT/8xMTHxK6NawCrFEMmQVvCpcIUNGzZMzszM3GNnZ+eQlJSEvLw8aZFcrBJDcAz9n8A6Ojp2RkdHLygpKWHrjdUgewJslloFANH+ZlLU4wqFhYWrY2Jifs1Ul67A6ECNzZkzp98YeHl54fnz5z05RU1NzZWAgICdAP4lZ4Esh9kVsmo/QGqBiy6Qk5OTe21tbZaHh8dnotdPyfubBS5btgy5ubmYOHEiCgoK4Onpic2bN6/fs2dPqUyALIVZCXI7zaxhbjFk+HBRGYpGKKOCIMTNvJFcQE5gVCgpKaHZmrU43hwbG4uioiJJeBZX/v7+uHfvXkFQUFCGXAQZNkPMIkA+vz8A8P9ZHfbUBwyLnKWlpesjIiISeAP3+y5fvgxnZ2dkZ2cjMTHRJBAY8tLS0tDS0vKe8M3NzQ2urq5rZOFZaYkq0GzzVwIAPkPsBkk1ggChrq7u997e3mxW9Gx98XNYWBiWLl0Kbni4ublJk1tlDx48kGZNTY10PXv2rASUoealBatUjPsUXBRAohVmVvwXWuivBQgQGRWkMllEBYbHkpKSlMjISCk9JCecO3cOd+9KzeIfHGT71atXS5M+/+zZs2ofHx+SHk2e8z8y8zP20/fNYn8lATB2BUYFkR+MyMvLS1iyZMkK8UICwMjw5MkTPH36VLrSzCkwBQ0KCpKKqhkzZkhuw/FN6+16WFjYAZntKThrf0F8fdoPUBoA4QpSt0i2BIJAYtRkZmb+LCYmZoq/v3+oWq02iQl1Ot2bqqqqv+fk5FzVarX3ZYHp75yM+WR9Ck/TNyv0GTP5D5qjiTeIqEAQhDvQGlg58kr3UO/fvz8yJCTE183NzdXZ2dlVo9G4ODg4OHZ2drZ1dHS0tbe3txUXF5dnZWWVVVRUMMaz0UiBOal1fhfC92tjVCkSNAZUOhwhtsnlzVIKT5KkdRAcRg7yhjgsxWeIQ1LUKDXLrI6CUmAx+Z07QIodlFCCBI0NRFiCSJeZLFFwITy/EwABAkOpAIAaFQBQUE6SnDgTQFAE4fWJ9HpbrIkWbtZthgekpBMj8hSfpU0VOY8QAPAFBICTQnJSYGpbfBcnQ/rs89YCQLznve0zsZtkYPrid2EBFEyAQGHFFL6uiNYtRYLfZyLCIoTAYkNVaJ+/i8OSvR2YVFxwS4RBU31E8I44Tmf8f4ZAmPrMPt9nCRLs82IG4h+HABgI1D+mdw5ZwMekjYFYy5AFDATqH9M7B70F/B8BkQp9YNbG2QAAAABJRU5ErkJggg==) 2x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAACZZJREFUeF7tWgtMVNkZ/qa8ZnFxBEHAiBWyEkGkPG0EmiigFUVspVqNilJfQTExsi6x1jdtLVuDxjhNRCsBsxpNfKDWBxCNPLQiiChG0SBLJdpSaAV5yGin+93cw46zuDsDdwYTOMnJnWEu957/+///+x/nqDDIh2qQy48hAIYsYJAjMOQCg9wAhkhwyAWGXGCQIzDkAgNkAAJ4QwXo5bWIq1WWZm0L4Pt+BMBGvvI7J4Xm/B+Ad/LVKkBYAwAhpBDctrKyMszX13epnZ1doL29fXh3d3e5Tqerrq2tzQsJCbkD4K0REBYDw5IAGGqbGrcFYHf//v1ZEyZM+LOtra27sY2/ffv2n48ePfp80qRJfwOgk4EgGLQMTsWBsAQAQuMU2LasrCzAz88vSa1WB6vV6ggh9KVLl8B54MABrF+/HnFxcdIUQ6fTPe7s7Lx2+PDhP6Slpf3byCoU4wdLAEBtc9q3tLRsdXZ2/sJ4tQ0NDQgMDMSrV696ftJoNKiursbYsWPfu12n0z24cePG6tjY2GoA3QauoQgISgPA59lReK1W65OSknKPqzxy5AiOHj2K0tJSTJ06FcOGDcPFixexY8cObN++HTt37pQ+z549G+3t7bh+/ToiIyORnJyMFStWoLu7uzY3N3f+qlWr6mQQhFv0GwSlAaDmHQA4vnjx4k8eHh6/oTDTpk3rdaF6/bcurVL1vpRr165JoL18+fKvnp6evwXQCeCN7BL95gWlAaD2HQE4tba2XnBycvpJREQEbt68+R1tE5HeADC2iilTpqCsrEwCsKOj425XV1d5fn5+VnJycoNMlCJs9skalASAz6L2hwEYodfrn3JFQrO9CduXv/GZOp3uH/X19em+vr75BtGC1mD2UBIAxnk1tQ/ARa/XP1QKgHHjxqG+vv47vJCenv7zffv2NRnwgtlhUkkA6P+fABgOYKRerydrK2IBxmoVvNDY2LhvzJgxu2VeEBHCLCtQEgDGffq/RgbgrlIAfIgX2trabg8fPvyXANoAdMnuYHUAaPoE0t4IgNtKAfB9XKFSqXwAMKFol13BLDfojwVQcJHf2xQVFQWMHz9+bk1NzddxcXEP9Xp9sZUA8APQAuC1bAVmkWFfAaDgUqpbV1cX7+7u/itHR8f5vdme0lHA+HkqlSoQQDOAVpkLGBZNHn0BQAhvX1FRMTUkJOQU2Z8sfevWLXR1dSEhIQEuLi7SIqwAQJAMAN2gQ06VLQYAAZOyvdTU1FF79+4ttLe398nJyUFqaqqUxnIwn9+0aZP0NysAEAKAxZIAgGmyycNcC6D2SXafFBcXx0dFReU2NTVh8uTJUpxeuHAh3r17h1OnaBTAyZMnsWDBAumzIZGx6Hn8+DHmz//Wa0S6zBAnhingqVSqUADMBawCALXPZOfTurq633l7e6dqtVqsW7cOy5cvlwoejkOHDmHNmjUYOXIkmpvpnu8DYKp6BJCGQPXCAQSAFvBf2QUsagHM9aVkp7i4eFlUVFTGiRMnsGjRIkn7x48f75GNGmUhJIahBZgKgCmkKluAVQFgrq85duxY3OLFi/9C0w8ICICNjQ0KCwsRHh7es+5Zs2ZJTQ+RyPRH8A+5xYABAMC1oaHhoJeX1083btyIrKwsTJ8+HVevXlVCzg8+4wMuYDUOEOku833X7OzsOStXrtz1+vVrREdHo7y8HFu3bsWuXbssBsJAAyBIkBWfM4BRt2/f/jw8PDz+ypUrmDlzpiT4hQsXpO6O0qOqqgrBwcEYPXo0Ghsb8ebNm1dqtZrdFquHQRY9I1j0BAUFjSsoKPjS1dX1x9u2bcPu3bulRbKJoVYzYCg3mG+wTRYaGoo7d+6gtbX1a41G8wsDANgtsmgUoDSMBGx8SHU/XUGr1calpKSk80f28ih8RkYGtmzZopz03+S56enpyMzMxNq1a3Hw4EE0NTXdGzVqVJJBJkgArJIKi9YXS1+C4FZZWflFcHBw9JkzZzBv3jxJ8IcPH8LPj7WKMmPu3LnIz8/H+fPnER8fj9OnT/8xMTHxK6NawCrFEMmQVvCpcIUNGzZMzszM3GNnZ+eQlJSEvLw8aZFcrBJDcAz9n8A6Ojp2RkdHLygpKWHrjdUgewJslloFANH+ZlLU4wqFhYWrY2Jifs1Ul67A6ECNzZkzp98YeHl54fnz5z05RU1NzZWAgICdAP4lZ4Esh9kVsmo/QGqBiy6Qk5OTe21tbZaHh8dnotdPyfubBS5btgy5ubmYOHEiCgoK4Onpic2bN6/fs2dPqUyALIVZCXI7zaxhbjFk+HBRGYpGKKOCIMTNvJFcQE5gVCgpKaHZmrU43hwbG4uioiJJeBZX/v7+uHfvXkFQUFCGXAQZNkPMIkA+vz8A8P9ZHfbUBwyLnKWlpesjIiISeAP3+y5fvgxnZ2dkZ2cjMTHRJBAY8tLS0tDS0vKe8M3NzQ2urq5rZOFZaYkq0GzzVwIAPkPsBkk1ggChrq7u997e3mxW9Gx98XNYWBiWLl0Kbni4ublJk1tlDx48kGZNTY10PXv2rASUoealBatUjPsUXBRAohVmVvwXWuivBQgQGRWkMllEBYbHkpKSlMjISCk9JCecO3cOd+9KzeIfHGT71atXS5M+/+zZs2ofHx+SHk2e8z8y8zP20/fNYn8lATB2BUYFkR+MyMvLS1iyZMkK8UICwMjw5MkTPH36VLrSzCkwBQ0KCpKKqhkzZkhuw/FN6+16WFjYAZntKThrf0F8fdoPUBoA4QpSt0i2BIJAYtRkZmb+LCYmZoq/v3+oWq02iQl1Ot2bqqqqv+fk5FzVarX3ZYHp75yM+WR9Ck/TNyv0GTP5D5qjiTeIqEAQhDvQGlg58kr3UO/fvz8yJCTE183NzdXZ2dlVo9G4ODg4OHZ2drZ1dHS0tbe3txUXF5dnZWWVVVRUMMaz0UiBOal1fhfC92tjVCkSNAZUOhwhtsnlzVIKT5KkdRAcRg7yhjgsxWeIQ1LUKDXLrI6CUmAx+Z07QIodlFCCBI0NRFiCSJeZLFFwITy/EwABAkOpAIAaFQBQUE6SnDgTQFAE4fWJ9HpbrIkWbtZthgekpBMj8hSfpU0VOY8QAPAFBICTQnJSYGpbfBcnQ/rs89YCQLznve0zsZtkYPrid2EBFEyAQGHFFL6uiNYtRYLfZyLCIoTAYkNVaJ+/i8OSvR2YVFxwS4RBU31E8I44Tmf8f4ZAmPrMPt9nCRLs82IG4h+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{left: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 tn = Object.defineProperty;
|
|
1
|
+
var tn = Object.defineProperty;
|
|
2
2
|
var nn = (r, i, e) => i in r ? tn(r, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[i] = e;
|
|
3
3
|
var w = (r, i, e) => (nn(r, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
-
import
|
|
4
|
+
import "./style.css";
|
|
5
|
+
import { defineComponent as G, computed as D, openBlock as R, createElementBlock as E, normalizeClass as Q, createElementVNode as I, withModifiers as ge, createBlock as re, inject as ut, ref as ee, onMounted as ae, onBeforeUnmount as De, withDirectives as Se, normalizeStyle as te, renderSlot as B, createVNode as oe, createCommentVNode as Y, toDisplayString as ue, vShow as Ie, Fragment as xe, renderList as tt, withCtx as ne, mergeProps as je, Teleport as on, withMemo as mt, normalizeProps as le, guardReactiveProps as de, createTextVNode as Ot, markRaw as Pt, provide as sn, h as Ee, defineEmits as an, watch as lt, unref as Me, onUnmounted as He, nextTick as ot } from "vue";
|
|
5
6
|
/*!
|
|
6
|
-
* relation-graph v3.0.
|
|
7
|
+
* relation-graph v3.0.9
|
|
7
8
|
* (c) 2026 WanLian <seeksdream@qq.com>
|
|
8
9
|
* Released under the MIT License.
|
|
9
10
|
* Repository: https://github.com/seeksdream/relation-graph
|
|
10
11
|
*/
|
|
11
|
-
const Tt = "3.0.
|
|
12
|
+
const Tt = "3.0.9", Os = Symbol("INSTALLED_KEY"), qe = "RelationGraphProvideKey", be = (r) => {
|
|
12
13
|
try {
|
|
13
14
|
if ("touches" in r && r.touches || "targetTouches" in r && r.targetTouches)
|
|
14
15
|
return !0;
|
|
15
16
|
} catch {
|
|
16
17
|
}
|
|
17
18
|
return !1;
|
|
18
|
-
},
|
|
19
|
+
}, Be = (r) => {
|
|
19
20
|
if (be(r)) {
|
|
20
21
|
const i = r.touches || r.targetTouches;
|
|
21
22
|
if (!i)
|
|
@@ -52,7 +53,7 @@ const Tt = "3.0.7", Ns = Symbol("INSTALLED_KEY"), qe = "RelationGraphProvideKey"
|
|
|
52
53
|
}, ln = () => {
|
|
53
54
|
const r = "c", i = "o", e = "n", t = "s", n = "o", o = "l", s = "e", a = new Date().getFullYear(), l = [];
|
|
54
55
|
return a > 1 && l.push(r), a > 21 && l.push(i), a > 35 && l.push(e), a > 55 && l.push(t), a > 189 && l.push(n), a > 231 && l.push(o), a > 1234 && l.push(s), l.join("");
|
|
55
|
-
}, xt = (r) => r.replace(/-/g, "").replace(/\*/g, "-"),
|
|
56
|
+
}, xt = (r) => r.replace(/-/g, "").replace(/\*/g, "-"), kt = (r) => {
|
|
56
57
|
const i = ln(), e = rn(), 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";
|
|
57
58
|
window && window[i] && window[i][e](
|
|
58
59
|
`%c ${xt(t)} %c Version v${Tt}(${r}) %c More info: ${xt(n)} %c`,
|
|
@@ -167,16 +168,16 @@ const Tt = "3.0.7", Ns = Symbol("INSTALLED_KEY"), qe = "RelationGraphProvideKey"
|
|
|
167
168
|
className: {}
|
|
168
169
|
},
|
|
169
170
|
setup(r) {
|
|
170
|
-
const i = r, e =
|
|
171
|
-
return (t, n) => (
|
|
172
|
-
class:
|
|
171
|
+
const i = r, e = D(() => cn[i.iconName]);
|
|
172
|
+
return (t, n) => (R(), E("svg", {
|
|
173
|
+
class: Q(["rg-icon", t.className]),
|
|
173
174
|
viewBox: "0 0 1024 1024",
|
|
174
175
|
version: "1.1",
|
|
175
176
|
xmlns: "http://www.w3.org/2000/svg",
|
|
176
177
|
innerHTML: e.value.data
|
|
177
178
|
}, null, 10, hn));
|
|
178
179
|
}
|
|
179
|
-
}),
|
|
180
|
+
}), Rt = /* @__PURE__ */ G({
|
|
180
181
|
__name: "RGNodeExpandHolder",
|
|
181
182
|
props: {
|
|
182
183
|
node: {},
|
|
@@ -184,12 +185,12 @@ const Tt = "3.0.7", Ns = Symbol("INSTALLED_KEY"), qe = "RelationGraphProvideKey"
|
|
|
184
185
|
expandHolderPosition: {}
|
|
185
186
|
},
|
|
186
187
|
setup(r) {
|
|
187
|
-
const i = r, e =
|
|
188
|
-
return (t, n) => (
|
|
189
|
-
class:
|
|
188
|
+
const i = r, e = D(() => i.node.expanded === !1 ? "c-expanded" : "c-collapsed");
|
|
189
|
+
return (t, n) => (R(), E("div", {
|
|
190
|
+
class: Q(["rg-node-expand-holder", "c-expand-positon-" + t.expandHolderPosition])
|
|
190
191
|
}, [
|
|
191
192
|
I("div", {
|
|
192
|
-
class:
|
|
193
|
+
class: Q(["rg-node-expand-button", e.value]),
|
|
193
194
|
onClick: n[0] || (n[0] = ge(
|
|
194
195
|
(...o) => t.expandOrCollapseNode && t.expandOrCollapseNode(...o),
|
|
195
196
|
["stop"]
|
|
@@ -199,10 +200,10 @@ const Tt = "3.0.7", Ns = Symbol("INSTALLED_KEY"), qe = "RelationGraphProvideKey"
|
|
|
199
200
|
["stop"]
|
|
200
201
|
))
|
|
201
202
|
}, [
|
|
202
|
-
t.node.expanded === !1 ? (
|
|
203
|
+
t.node.expanded === !1 ? (R(), re(he, {
|
|
203
204
|
key: 0,
|
|
204
205
|
iconName: "icon-fangda"
|
|
205
|
-
})) : (
|
|
206
|
+
})) : (R(), re(he, {
|
|
206
207
|
key: 1,
|
|
207
208
|
iconName: "icon-suoxiao"
|
|
208
209
|
}))
|
|
@@ -225,16 +226,16 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
225
226
|
checked: { type: Boolean }
|
|
226
227
|
},
|
|
227
228
|
setup(r) {
|
|
228
|
-
const i = W(), e = r, t = ee(), n =
|
|
229
|
+
const i = W(), e = r, t = ee(), n = D(() => e.nodeProps.borderColor), o = D(() => e.nodeProps.borderWidth === void 0 ? void 0 : e.nodeProps.borderWidth + "px"), s = D(() => e.nodeProps.width ? e.nodeProps.width + "px" : void 0), a = D(() => e.nodeProps.height ? e.nodeProps.height + "px" : void 0), l = D(() => e.nodeProps.expandHolderPosition ? e.nodeProps.expandHolderPosition !== "hide" : e.defaultExpandHolderPosition && e.defaultExpandHolderPosition !== "hide" && e.nodeProps.rgChildrenSize > 0), c = D(() => e.nodeProps.rgCalcedVisibility), d = (u) => {
|
|
229
230
|
i.expandOrCollapseNode(e.nodeProps, u);
|
|
230
231
|
}, h = (u) => {
|
|
231
232
|
i.onNodeDragStart(e.nodeProps, u);
|
|
232
233
|
};
|
|
233
234
|
return ae(() => {
|
|
234
235
|
i.addNodeResizeListener(t.value, e.nodeProps);
|
|
235
|
-
}),
|
|
236
|
+
}), De(() => {
|
|
236
237
|
i.removeNodeResizeListener(t.value);
|
|
237
|
-
}), (u, g) => Se((
|
|
238
|
+
}), (u, g) => Se((R(), E("div", {
|
|
238
239
|
ref_key: "nodePeelRef",
|
|
239
240
|
ref: t,
|
|
240
241
|
style: te({
|
|
@@ -250,7 +251,7 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
250
251
|
"--rg-node-height": a.value,
|
|
251
252
|
"--rg-node-opacity": u.nodeProps.opacity === void 0 ? void 0 : u.nodeProps.opacity
|
|
252
253
|
}),
|
|
253
|
-
class:
|
|
254
|
+
class: Q([
|
|
254
255
|
"rg-node-peel",
|
|
255
256
|
u.nodeProps.selected && "rg-node-selected",
|
|
256
257
|
u.dragging && "rg-node-dragging",
|
|
@@ -262,13 +263,13 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
262
263
|
]),
|
|
263
264
|
"data-id": u.nodeProps.id
|
|
264
265
|
}, [
|
|
265
|
-
l.value ?
|
|
266
|
+
l.value ? B(u.$slots, "node-expand-button", {
|
|
266
267
|
key: 0,
|
|
267
268
|
node: u.nodeProps,
|
|
268
269
|
expandOrCollapseNode: d,
|
|
269
270
|
expandHolderPosition: u.nodeProps.expandHolderPosition || u.defaultExpandHolderPosition
|
|
270
271
|
}, () => [
|
|
271
|
-
oe(
|
|
272
|
+
oe(Rt, {
|
|
272
273
|
node: u.nodeProps,
|
|
273
274
|
checked: u.checked,
|
|
274
275
|
expandOrCollapseNode: d,
|
|
@@ -280,7 +281,7 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
280
281
|
onMousedown: ge(h, ["left", "stop"]),
|
|
281
282
|
onTouchstart: ge(h, ["stop"])
|
|
282
283
|
}, [
|
|
283
|
-
|
|
284
|
+
B(u.$slots, "node", {
|
|
284
285
|
node: u.nodeProps,
|
|
285
286
|
checked: u.checked,
|
|
286
287
|
dragging: u.dragging
|
|
@@ -302,11 +303,11 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
302
303
|
checkedNodeId: {}
|
|
303
304
|
},
|
|
304
305
|
setup(r) {
|
|
305
|
-
const i = W(), e =
|
|
306
|
+
const i = W(), e = D(() => i.getShouldRenderNodes(i.dataStores.shouldRenderNodesRef.value));
|
|
306
307
|
return ae(() => {
|
|
307
308
|
x("[RGCanvas mounted]");
|
|
308
|
-
}), (t, n) => (
|
|
309
|
-
(
|
|
309
|
+
}), (t, n) => (R(), E("div", pn, [
|
|
310
|
+
(R(!0), E(xe, null, tt(e.value, (o) => (R(), re(Mt, {
|
|
310
311
|
key: o.id,
|
|
311
312
|
"node-props": o,
|
|
312
313
|
"default-expand-holder-position": t.defaultExpandHolderPosition,
|
|
@@ -314,10 +315,10 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
314
315
|
checked: o.id === t.checkedNodeId
|
|
315
316
|
}, {
|
|
316
317
|
node: ne((s) => [
|
|
317
|
-
|
|
318
|
+
B(t.$slots, "node", je({ ref_for: !0 }, s))
|
|
318
319
|
]),
|
|
319
320
|
"node-expand-button": ne((s) => [
|
|
320
|
-
|
|
321
|
+
B(t.$slots, "node-expand-button", je({ ref_for: !0 }, s))
|
|
321
322
|
]),
|
|
322
323
|
_: 2
|
|
323
324
|
}, 1032, ["node-props", "default-expand-holder-position", "dragging", "checked"]))), 128))
|
|
@@ -329,8 +330,8 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
329
330
|
forElementLines: { type: Boolean }
|
|
330
331
|
},
|
|
331
332
|
setup(r) {
|
|
332
|
-
const i = W(), e =
|
|
333
|
-
return (t, n) => (
|
|
333
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value);
|
|
334
|
+
return (t, n) => (R(), E("defs", null, [
|
|
334
335
|
I("marker", {
|
|
335
336
|
id: e.value.instanceId + "-arrow-default",
|
|
336
337
|
markerWidth: e.value.defaultLineMarker.markerWidth,
|
|
@@ -361,7 +362,7 @@ const un = ["data-id"], fn = { class: "rg-node-text" }, Mt = /* @__PURE__ */ G({
|
|
|
361
362
|
d: e.value.defaultLineMarker.data
|
|
362
363
|
}, null, 8, xn)
|
|
363
364
|
], 8, mn),
|
|
364
|
-
|
|
365
|
+
B(t.$slots, "default")
|
|
365
366
|
]));
|
|
366
367
|
}
|
|
367
368
|
});
|
|
@@ -374,14 +375,14 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
374
375
|
checked: { type: Boolean }
|
|
375
376
|
},
|
|
376
377
|
setup(r) {
|
|
377
|
-
const i = W(), e =
|
|
378
|
+
const i = W(), e = D(() => {
|
|
378
379
|
var n;
|
|
379
380
|
return (n = r.lineConfig) == null ? void 0 : n.line;
|
|
380
|
-
}), t =
|
|
381
|
-
return (n, o) => e.value && t.value ? (
|
|
382
|
-
(
|
|
381
|
+
}), t = D(() => e.value.isFakeLine ? i.dataStores.textContainer4FakeLineRef.value : i.dataStores.textContainer4NormalRef.value);
|
|
382
|
+
return (n, o) => e.value && t.value ? (R(), E("foreignObject", Cn, [
|
|
383
|
+
(R(), re(on, { to: t.value }, [
|
|
383
384
|
I("div", {
|
|
384
|
-
class:
|
|
385
|
+
class: Q([
|
|
385
386
|
"rg-line-peel",
|
|
386
387
|
e.value.className,
|
|
387
388
|
n.checked && "rg-line-checked",
|
|
@@ -397,14 +398,14 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
397
398
|
...e.value.cssVars || {}
|
|
398
399
|
})
|
|
399
400
|
}, [
|
|
400
|
-
|
|
401
|
+
B(n.$slots, "default")
|
|
401
402
|
], 14, wn)
|
|
402
403
|
], 8, ["to"]))
|
|
403
|
-
])) : (
|
|
404
|
+
])) : (R(), E("g", _n, [
|
|
404
405
|
I("text", null, "Null-text-" + ue(!!e.value) + "-" + ue(!!t.value), 1)
|
|
405
406
|
]));
|
|
406
407
|
}
|
|
407
|
-
}), bn = ["data-id"], Nn = ["d"], On = ["id", "d"], Pn = { key: 0 }, Tn = ["dx", "dy"],
|
|
408
|
+
}), bn = ["data-id"], Nn = ["d"], On = ["id", "d"], Pn = { key: 0 }, Tn = ["dx", "dy"], kn = ["xlink:href", "startOffset", "text-anchor"], Et = /* @__PURE__ */ G({
|
|
408
409
|
__name: "RGLinePath",
|
|
409
410
|
props: {
|
|
410
411
|
lineConfig: {},
|
|
@@ -415,11 +416,11 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
415
416
|
},
|
|
416
417
|
emits: ["onLineClick"],
|
|
417
418
|
setup(r, { emit: i }) {
|
|
418
|
-
const e = W(), t = i, n =
|
|
419
|
+
const e = W(), t = i, n = D(() => r.lineConfig.line), o = D(() => e.getArrowMarkerId(r.lineConfig.line, !0)), s = D(() => e.getArrowMarkerId(r.lineConfig.line, !1)), a = D(() => e.generateLineTextStyle4TextOnPath(r.lineConfig)), l = D(() => r.lineConfig.line.lineWidth ? r.lineConfig.line.lineWidth + "px" : void 0), c = D(() => r.graphInstanceId + "-" + r.lineConfig.line.id), d = (h) => {
|
|
419
420
|
t("onLineClick", h);
|
|
420
421
|
};
|
|
421
|
-
return (h, u) => (
|
|
422
|
-
class:
|
|
422
|
+
return (h, u) => (R(), E("g", {
|
|
423
|
+
class: Q([
|
|
423
424
|
"rg-line-peel",
|
|
424
425
|
n.value.className,
|
|
425
426
|
n.value.selected && "rg-line-selected",
|
|
@@ -446,12 +447,12 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
446
447
|
I("path", {
|
|
447
448
|
id: c.value,
|
|
448
449
|
d: h.linePathInfo.pathData,
|
|
449
|
-
class:
|
|
450
|
+
class: Q(["rg-line", [
|
|
450
451
|
n.value.dashType ? "rg-line-dashtype-" + n.value.dashType : void 0,
|
|
451
452
|
n.value.animation ? "rg-line-anm-" + n.value.animation : void 0
|
|
452
453
|
]])
|
|
453
454
|
}, null, 10, On),
|
|
454
|
-
h.useTextOnPath && a.value ? (
|
|
455
|
+
h.useTextOnPath && a.value ? (R(), E("g", Pn, [
|
|
455
456
|
I("text", {
|
|
456
457
|
class: "rg-line-text rg-line-text-on-path",
|
|
457
458
|
dx: a.value.textOffset.x + "px",
|
|
@@ -465,13 +466,13 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
465
466
|
"text-anchor": a.value.textAnchor,
|
|
466
467
|
method: "align",
|
|
467
468
|
spacing: "auto"
|
|
468
|
-
}, ue(a.value.text), 9,
|
|
469
|
+
}, ue(a.value.text), 9, kn)
|
|
469
470
|
], 40, Tn)
|
|
470
471
|
])) : Y("", !0),
|
|
471
|
-
|
|
472
|
+
B(h.$slots, "default")
|
|
472
473
|
], 14, bn));
|
|
473
474
|
}
|
|
474
|
-
}),
|
|
475
|
+
}), Dt = /* @__PURE__ */ G({
|
|
475
476
|
__name: "RGLineContent",
|
|
476
477
|
props: {
|
|
477
478
|
lineConfig: {},
|
|
@@ -480,11 +481,11 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
480
481
|
graphInstanceId: {}
|
|
481
482
|
},
|
|
482
483
|
setup(r) {
|
|
483
|
-
const i = W(), e =
|
|
484
|
+
const i = W(), e = D(() => i.generateLinePath(r.lineConfig)), t = D(() => i.generateLineTextStyle(r.lineConfig, e.value)), n = D(() => r.lineConfig.line.useTextOnPath || r.defaultLineTextOnPath), o = D(() => n.value && r.lineConfig.line.lineShape !== j.StandardStraight), s = (a) => {
|
|
484
485
|
i.onLineClick(r.lineConfig.line, a);
|
|
485
486
|
};
|
|
486
|
-
return (a, l) => (
|
|
487
|
-
oe(
|
|
487
|
+
return (a, l) => (R(), E(xe, null, [
|
|
488
|
+
oe(Et, {
|
|
488
489
|
lineConfig: a.lineConfig,
|
|
489
490
|
linePathInfo: e.value,
|
|
490
491
|
useTextOnPath: o.value,
|
|
@@ -492,7 +493,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
492
493
|
checked: a.checked,
|
|
493
494
|
onOnLineClick: s
|
|
494
495
|
}, null, 8, ["lineConfig", "linePathInfo", "useTextOnPath", "graph-instance-id", "checked"]),
|
|
495
|
-
a.lineConfig.line.text && !o.value ? (
|
|
496
|
+
a.lineConfig.line.text && !o.value ? (R(), re(It, {
|
|
496
497
|
key: 0,
|
|
497
498
|
lineConfig: a.lineConfig,
|
|
498
499
|
linePathInfo: e.value,
|
|
@@ -500,7 +501,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
500
501
|
}, {
|
|
501
502
|
default: ne(() => [
|
|
502
503
|
I("div", {
|
|
503
|
-
class:
|
|
504
|
+
class: Q(`rg-line-label ${n.value ? "rg-line-label-on-path" : ""}`),
|
|
504
505
|
style: te({
|
|
505
506
|
...t.value.cssStyles
|
|
506
507
|
}),
|
|
@@ -512,7 +513,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
512
513
|
}, 8, ["lineConfig", "linePathInfo", "checked"])) : Y("", !0)
|
|
513
514
|
], 64));
|
|
514
515
|
}
|
|
515
|
-
}),
|
|
516
|
+
}), Rn = { key: 0 }, At = /* @__PURE__ */ G({
|
|
516
517
|
__name: "RGLinePeel",
|
|
517
518
|
props: {
|
|
518
519
|
line: {},
|
|
@@ -521,15 +522,15 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
521
522
|
graphInstanceId: {}
|
|
522
523
|
},
|
|
523
524
|
setup(r) {
|
|
524
|
-
const i = W(), e =
|
|
525
|
-
return (t, n) => e.value ? (
|
|
526
|
-
|
|
525
|
+
const i = W(), e = D(() => r.line.isFakeLine ? i.generateFakeLineConfig(r.line) : i.generateLineConfig(r.line));
|
|
526
|
+
return (t, n) => e.value ? (R(), E("g", Rn, [
|
|
527
|
+
B(t.$slots, "line", {
|
|
527
528
|
lineConfig: e.value,
|
|
528
529
|
defaultLineTextOnPath: t.defaultLineTextOnPath,
|
|
529
530
|
graphInstanceId: t.graphInstanceId,
|
|
530
531
|
checked: t.checked
|
|
531
532
|
}, () => [
|
|
532
|
-
oe(
|
|
533
|
+
oe(Dt, {
|
|
533
534
|
"line-config": e.value,
|
|
534
535
|
defaultLineTextOnPath: t.defaultLineTextOnPath,
|
|
535
536
|
"graph-instance-id": t.graphInstanceId,
|
|
@@ -550,17 +551,17 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
550
551
|
graphInstanceId: {}
|
|
551
552
|
},
|
|
552
553
|
setup(r) {
|
|
553
|
-
const i = W(), e =
|
|
554
|
+
const i = W(), e = D(() => i.getShouldRenderFakeLines(i.dataStores.shouldRenderFakeLinesRef.value));
|
|
554
555
|
return ae(() => {
|
|
555
556
|
x("[RGCanvas mounted]");
|
|
556
|
-
}), (t, n) => (
|
|
557
|
+
}), (t, n) => (R(), E("div", Mn, [
|
|
557
558
|
n[0] || (n[0] = I("div", { class: "rg-linetext-container" }, null, -1)),
|
|
558
|
-
(
|
|
559
|
+
(R(), E("svg", Sn, [
|
|
559
560
|
oe(St, { "for-element-lines": !0 }),
|
|
560
|
-
t.showEasyView ? Y("", !0) : (
|
|
561
|
+
t.showEasyView ? Y("", !0) : (R(!0), E(xe, { key: 0 }, tt(e.value, (o) => (R(), E(xe, {
|
|
561
562
|
key: o.id
|
|
562
563
|
}, [
|
|
563
|
-
o.hidden !== !0 ? (
|
|
564
|
+
o.hidden !== !0 ? (R(), re(At, {
|
|
564
565
|
key: 0,
|
|
565
566
|
line: o,
|
|
566
567
|
defaultLineTextOnPath: t.defaultLineTextOnPath,
|
|
@@ -568,7 +569,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
568
569
|
"graph-instance-id": t.graphInstanceId
|
|
569
570
|
}, {
|
|
570
571
|
line: ne((s) => [
|
|
571
|
-
|
|
572
|
+
B(t.$slots, "line", je({ ref_for: !0 }, s))
|
|
572
573
|
]),
|
|
573
574
|
_: 2
|
|
574
575
|
}, 1032, ["line", "defaultLineTextOnPath", "checked", "graph-instance-id"])) : Y("", !0)
|
|
@@ -576,7 +577,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
576
577
|
]))
|
|
577
578
|
]));
|
|
578
579
|
}
|
|
579
|
-
}),
|
|
580
|
+
}), En = { class: "rg-lines-container rg-lines-container-el-lines" }, Dn = {
|
|
580
581
|
class: "rg-lines-svg rg-lines-svg-el-lines",
|
|
581
582
|
xmlns: "http://www.w3.org/2000/svg"
|
|
582
583
|
}, An = /* @__PURE__ */ G({
|
|
@@ -587,14 +588,14 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
587
588
|
graphInstanceId: {}
|
|
588
589
|
},
|
|
589
590
|
setup(r) {
|
|
590
|
-
const i = W(), e =
|
|
591
|
+
const i = W(), e = D(() => i.generateCreatingLineConfig(i.dataStores.optionsRef.value));
|
|
591
592
|
return ae(() => {
|
|
592
593
|
x("[RGCanvas mounted]");
|
|
593
|
-
}), (t, n) => (
|
|
594
|
+
}), (t, n) => (R(), E("div", En, [
|
|
594
595
|
n[0] || (n[0] = I("div", { class: "rg-linetext-container" }, null, -1)),
|
|
595
|
-
(
|
|
596
|
-
|
|
597
|
-
oe(
|
|
596
|
+
(R(), E("svg", Dn, [
|
|
597
|
+
B(t.$slots, "line", { lineConfig: e.value }, () => [
|
|
598
|
+
oe(Dt, {
|
|
598
599
|
"line-config": e.value,
|
|
599
600
|
defaultLineTextOnPath: t.defaultLineTextOnPath,
|
|
600
601
|
"graph-instance-id": t.graphInstanceId
|
|
@@ -606,7 +607,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
606
607
|
}), Vn = { class: "rg-lines-container rg-lines-container-normal-lines" }, zn = {
|
|
607
608
|
class: "rg-lines-svg",
|
|
608
609
|
xmlns: "http://www.w3.org/2000/svg"
|
|
609
|
-
},
|
|
610
|
+
}, Bn = /* @__PURE__ */ G({
|
|
610
611
|
__name: "RGCanvasContent4Lines",
|
|
611
612
|
props: {
|
|
612
613
|
showEasyView: { type: Boolean },
|
|
@@ -615,17 +616,17 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
615
616
|
graphInstanceId: {}
|
|
616
617
|
},
|
|
617
618
|
setup(r) {
|
|
618
|
-
const i = W(), e =
|
|
619
|
+
const i = W(), e = D(() => i.getShouldRenderLines(i.dataStores.shouldRenderLinesRef.value));
|
|
619
620
|
return ae(() => {
|
|
620
621
|
x("[RGCanvas mounted]");
|
|
621
|
-
}), (t, n) => (
|
|
622
|
+
}), (t, n) => (R(), E("div", Vn, [
|
|
622
623
|
n[0] || (n[0] = I("div", { class: "rg-linetext-container" }, null, -1)),
|
|
623
|
-
(
|
|
624
|
+
(R(), E("svg", zn, [
|
|
624
625
|
oe(St),
|
|
625
|
-
t.showEasyView ? Y("", !0) : (
|
|
626
|
+
t.showEasyView ? Y("", !0) : (R(!0), E(xe, { key: 0 }, tt(e.value, (o) => (R(), E(xe, {
|
|
626
627
|
key: o.id
|
|
627
628
|
}, [
|
|
628
|
-
o.hidden !== !0 ? (
|
|
629
|
+
o.hidden !== !0 ? (R(), re(At, {
|
|
629
630
|
key: "l-" + o.id,
|
|
630
631
|
line: o,
|
|
631
632
|
defaultLineTextOnPath: t.defaultLineTextOnPath,
|
|
@@ -633,7 +634,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
633
634
|
"graph-instance-id": t.graphInstanceId
|
|
634
635
|
}, {
|
|
635
636
|
line: ne((s) => [
|
|
636
|
-
|
|
637
|
+
B(t.$slots, "line", je({ ref_for: !0 }, s))
|
|
637
638
|
]),
|
|
638
639
|
_: 2
|
|
639
640
|
}, 1032, ["line", "defaultLineTextOnPath", "checked", "graph-instance-id"])) : Y("", !0)
|
|
@@ -641,7 +642,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
641
642
|
]))
|
|
642
643
|
]));
|
|
643
644
|
}
|
|
644
|
-
}),
|
|
645
|
+
}), Xn = { class: "rg-single-graph" }, Fn = { class: "rg-nodes-container-wrapper" }, Vt = /* @__PURE__ */ G({
|
|
645
646
|
__name: "RGCanvasContent",
|
|
646
647
|
props: {
|
|
647
648
|
showEasyView: { type: Boolean },
|
|
@@ -654,30 +655,30 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
654
655
|
defaultLineTextOnPath: { type: Boolean }
|
|
655
656
|
},
|
|
656
657
|
setup(r) {
|
|
657
|
-
return (i, e) => (
|
|
658
|
-
mt([i.defaultLineTextOnPath, i.checkedLineId], () => oe(
|
|
658
|
+
return (i, e) => (R(), E("div", Xn, [
|
|
659
|
+
mt([i.defaultLineTextOnPath, i.checkedLineId], () => oe(Bn, {
|
|
659
660
|
showEasyView: i.showEasyView,
|
|
660
661
|
defaultLineTextOnPath: i.defaultLineTextOnPath,
|
|
661
662
|
"checked-line-id": i.checkedLineId,
|
|
662
663
|
"graph-instance-id": i.graphInstanceId
|
|
663
664
|
}, {
|
|
664
665
|
line: ne((t) => [
|
|
665
|
-
|
|
666
|
+
B(i.$slots, "line", le(de(t)))
|
|
666
667
|
]),
|
|
667
668
|
_: 3
|
|
668
669
|
}, 8, ["showEasyView", "defaultLineTextOnPath", "checked-line-id", "graph-instance-id"]), e, 0),
|
|
669
670
|
I("div", Fn, [
|
|
670
|
-
i.showEasyView ? Y("", !0) : mt([i.draggingNodeId, i.checkedNodeId, i.defaultExpandHolderPosition], () => (
|
|
671
|
+
i.showEasyView ? Y("", !0) : mt([i.draggingNodeId, i.checkedNodeId, i.defaultExpandHolderPosition], () => (R(), re(gn, {
|
|
671
672
|
key: 0,
|
|
672
673
|
"default-expand-holder-position": i.defaultExpandHolderPosition,
|
|
673
674
|
draggingNodeId: i.draggingNodeId,
|
|
674
675
|
checkedNodeId: i.checkedNodeId
|
|
675
676
|
}, {
|
|
676
677
|
node: ne((t) => [
|
|
677
|
-
|
|
678
|
+
B(i.$slots, "node", le(de(t)))
|
|
678
679
|
]),
|
|
679
680
|
"node-expand-button": ne((t) => [
|
|
680
|
-
|
|
681
|
+
B(i.$slots, "node-expand-button", le(de(t)))
|
|
681
682
|
]),
|
|
682
683
|
_: 3
|
|
683
684
|
}, 8, ["default-expand-holder-position", "draggingNodeId", "checkedNodeId"])), e, 1)
|
|
@@ -689,17 +690,17 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
689
690
|
"graph-instance-id": i.graphInstanceId
|
|
690
691
|
}, {
|
|
691
692
|
line: ne((t) => [
|
|
692
|
-
|
|
693
|
+
B(i.$slots, "line", le(de(t)))
|
|
693
694
|
]),
|
|
694
695
|
_: 3
|
|
695
696
|
}, 8, ["showEasyView", "defaultLineTextOnPath", "checked-line-id", "graph-instance-id"]),
|
|
696
|
-
i.creatingLine ? (
|
|
697
|
+
i.creatingLine ? (R(), re(An, {
|
|
697
698
|
key: 0,
|
|
698
699
|
defaultLineTextOnPath: i.defaultLineTextOnPath,
|
|
699
700
|
"checked-line-id": i.checkedLineId
|
|
700
701
|
}, {
|
|
701
702
|
line: ne((t) => [
|
|
702
|
-
|
|
703
|
+
B(i.$slots, "line", le(de(t)))
|
|
703
704
|
]),
|
|
704
705
|
_: 3
|
|
705
706
|
}, 8, ["defaultLineTextOnPath", "checked-line-id"])) : Y("", !0)
|
|
@@ -708,11 +709,11 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
708
709
|
}), Gn = /* @__PURE__ */ G({
|
|
709
710
|
__name: "RGEasyView",
|
|
710
711
|
setup(r) {
|
|
711
|
-
const i = W(), e = ee(), t =
|
|
712
|
+
const i = W(), e = ee(), t = D(() => i.dataStores.optionsRef.value);
|
|
712
713
|
return ae(() => {
|
|
713
714
|
x("[RGEasyView mounted]"), i.setEasyViewCanvas && i.setEasyViewCanvas(e.value);
|
|
714
|
-
}), (n, o) => (
|
|
715
|
-
class:
|
|
715
|
+
}), (n, o) => (R(), E("div", {
|
|
716
|
+
class: Q(["rg-easy-view", { "rg-easy-view-active": t.value.showEasyView }])
|
|
716
717
|
}, [
|
|
717
718
|
I("canvas", {
|
|
718
719
|
ref_key: "$rgEasyCanvas",
|
|
@@ -724,11 +725,11 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
724
725
|
}), $n = { class: "rg-map-background" }, Yn = { class: "rg-canvas-slot rg-canvas-slot-behind" }, Hn = { class: "rg-canvas-slot rg-canvas-slot-above" }, Wn = /* @__PURE__ */ G({
|
|
725
726
|
__name: "RGCanvas",
|
|
726
727
|
setup(r) {
|
|
727
|
-
const i = ee(), e = W(), t =
|
|
728
|
+
const i = ee(), e = W(), t = D(() => e.dataStores.optionsRef.value), n = (a) => {
|
|
728
729
|
e.onCanvasDragStart(a);
|
|
729
730
|
}, o = (a) => {
|
|
730
731
|
e.onContextmenu(a);
|
|
731
|
-
}, s =
|
|
732
|
+
}, s = D(() => {
|
|
732
733
|
const a = e.dataStores.optionsRef.value;
|
|
733
734
|
return {
|
|
734
735
|
width: `${a.canvasSize.width}px`,
|
|
@@ -739,8 +740,8 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
739
740
|
});
|
|
740
741
|
return ae(() => {
|
|
741
742
|
x("[RGCanvas mounted]"), e.setCanvasDom(i.value);
|
|
742
|
-
}), (a, l) => (
|
|
743
|
-
class:
|
|
743
|
+
}), (a, l) => (R(), E("div", {
|
|
744
|
+
class: Q(["rg-map", [
|
|
744
745
|
t.value.canvasOpacity === 1 && "rg-map-ready"
|
|
745
746
|
]]),
|
|
746
747
|
onContextmenu: l[0] || (l[0] = ge((c) => o(c), ["prevent"])),
|
|
@@ -748,14 +749,14 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
748
749
|
onTouchstart: l[2] || (l[2] = (c) => n(c))
|
|
749
750
|
}, [
|
|
750
751
|
I("div", $n, [
|
|
751
|
-
|
|
752
|
+
B(a.$slots, "background")
|
|
752
753
|
]),
|
|
753
754
|
I("div", {
|
|
754
755
|
style: te(s.value),
|
|
755
756
|
class: "rg-map-canvas rg-canvas-behind"
|
|
756
757
|
}, [
|
|
757
758
|
I("div", Yn, [
|
|
758
|
-
|
|
759
|
+
B(a.$slots, "canvas-plug-behind")
|
|
759
760
|
])
|
|
760
761
|
], 4),
|
|
761
762
|
oe(Gn),
|
|
@@ -776,13 +777,13 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
776
777
|
"graph-instance-id": t.value.instanceId
|
|
777
778
|
}, {
|
|
778
779
|
line: ne((c) => [
|
|
779
|
-
|
|
780
|
+
B(a.$slots, "line", le(de(c)))
|
|
780
781
|
]),
|
|
781
782
|
node: ne((c) => [
|
|
782
|
-
|
|
783
|
+
B(a.$slots, "node", le(de(c)))
|
|
783
784
|
]),
|
|
784
785
|
"node-expand-button": ne((c) => [
|
|
785
|
-
|
|
786
|
+
B(a.$slots, "node-expand-button", le(de(c)))
|
|
786
787
|
]),
|
|
787
788
|
_: 3
|
|
788
789
|
}, 8, ["show-easy-view", "creating-line", "default-expand-holder-position", "draggingNodeId", "checkedNodeId", "defaultLineTextOnPath", "checked-line-id", "graph-instance-id"])
|
|
@@ -792,7 +793,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
792
793
|
class: "rg-map-canvas rg-canvas-above"
|
|
793
794
|
}, [
|
|
794
795
|
I("div", Hn, [
|
|
795
|
-
|
|
796
|
+
B(a.$slots, "canvas-plug-above")
|
|
796
797
|
])
|
|
797
798
|
], 4)
|
|
798
799
|
], 34));
|
|
@@ -800,11 +801,11 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
800
801
|
}), Un = /* @__PURE__ */ G({
|
|
801
802
|
__name: "GraphMoveOperator",
|
|
802
803
|
setup(r) {
|
|
803
|
-
const i = W(), e =
|
|
804
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value), t = D(() => e.value.canvasMoveMode), n = (o) => {
|
|
804
805
|
i.startMoveCanvas(o, !0);
|
|
805
806
|
};
|
|
806
|
-
return (o, s) => (
|
|
807
|
-
class:
|
|
807
|
+
return (o, s) => (R(), E("div", {
|
|
808
|
+
class: Q(["rg-move-operator", { "rg-move-operator-active": t.value }])
|
|
808
809
|
}, [
|
|
809
810
|
I("div", {
|
|
810
811
|
class: "rg-move-touchpad",
|
|
@@ -816,11 +817,11 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
816
817
|
}), Jn = { class: "rg-graph-loading-message" }, jn = /* @__PURE__ */ G({
|
|
817
818
|
__name: "GraphLoading",
|
|
818
819
|
setup(r) {
|
|
819
|
-
const i = W(), e =
|
|
820
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value), t = (n) => {
|
|
820
821
|
i.clearLoading();
|
|
821
822
|
};
|
|
822
|
-
return (n, o) => (
|
|
823
|
-
class:
|
|
823
|
+
return (n, o) => (R(), E("div", {
|
|
824
|
+
class: Q(["rg-graph-loading", { "rg-graph-loading-hide": !e.value.graphLoading }]),
|
|
824
825
|
onClick: t
|
|
825
826
|
}, [
|
|
826
827
|
I("div", Jn, [
|
|
@@ -838,21 +839,21 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
838
839
|
}, Zn = { class: "rg-creating-container" }, zt = /* @__PURE__ */ G({
|
|
839
840
|
__name: "GraphOperateStuff",
|
|
840
841
|
setup(r) {
|
|
841
|
-
const i = W(), e =
|
|
842
|
-
return (t, n) => e.value ? (
|
|
842
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value);
|
|
843
|
+
return (t, n) => e.value ? (R(), E("div", qn, [
|
|
843
844
|
I("div", Zn, [
|
|
844
|
-
e.value.creatingNodePlot && e.value.showTemplateNode ? (
|
|
845
|
+
e.value.creatingNodePlot && e.value.showTemplateNode ? (R(), re(Mt, {
|
|
845
846
|
key: 0,
|
|
846
847
|
"node-props": e.value.newNodeTemplate
|
|
847
848
|
}, {
|
|
848
849
|
node: ne(() => [
|
|
849
|
-
|
|
850
|
+
B(t.$slots, "node", {
|
|
850
851
|
node: e.value.newNodeTemplate
|
|
851
852
|
})
|
|
852
853
|
]),
|
|
853
854
|
_: 3
|
|
854
855
|
}, 8, ["node-props"])) : Y("", !0),
|
|
855
|
-
e.value.creatingSelection ? (
|
|
856
|
+
e.value.creatingSelection ? (R(), E("div", {
|
|
856
857
|
key: 1,
|
|
857
858
|
class: "rg-selection",
|
|
858
859
|
style: te({
|
|
@@ -866,7 +867,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
866
867
|
oe(jn)
|
|
867
868
|
])) : Y("", !0);
|
|
868
869
|
}
|
|
869
|
-
}),
|
|
870
|
+
}), Qn = ["title"], Bt = /* @__PURE__ */ G({
|
|
870
871
|
__name: "GraphXsToolBar",
|
|
871
872
|
props: {
|
|
872
873
|
direction: {},
|
|
@@ -874,7 +875,7 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
874
875
|
positionV: {}
|
|
875
876
|
},
|
|
876
877
|
setup(r) {
|
|
877
|
-
const i = W(), e =
|
|
878
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value), t = () => {
|
|
878
879
|
i.toggleAutoLayout();
|
|
879
880
|
}, n = async () => {
|
|
880
881
|
i.enableCanvasAnimation(), i.setZoom(100), i.moveToCenter(), i.zoomToFit(), setTimeout(() => {
|
|
@@ -885,8 +886,8 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
885
886
|
}, s = async () => {
|
|
886
887
|
i.fullscreen();
|
|
887
888
|
};
|
|
888
|
-
return (a, l) => (
|
|
889
|
-
class:
|
|
889
|
+
return (a, l) => (R(), E("div", {
|
|
890
|
+
class: Q(["rg-toolbar rg-xs-toolbar", ["rg-toolbar-h-" + (a.positionH || e.value.toolBarPositionH || "left"), "rg-toolbar-v-" + (a.positionV || e.value.toolBarPositionV || "bottom"), "rg-toolbar-" + (a.direction || e.value.toolBarDirection || "h")]])
|
|
890
891
|
}, [
|
|
891
892
|
I("div", {
|
|
892
893
|
title: "Full Screen",
|
|
@@ -913,48 +914,46 @@ const Cn = { key: 0 }, wn = ["data-id"], _n = { key: 1 }, It = /* @__PURE__ */ G
|
|
|
913
914
|
}, [
|
|
914
915
|
oe(he, { "icon-name": "icon-suoxiao" })
|
|
915
916
|
]),
|
|
916
|
-
e.value.layout.supportAutoLayout ? (
|
|
917
|
+
e.value.layout.supportAutoLayout ? (R(), E("div", {
|
|
917
918
|
key: 0,
|
|
918
919
|
title: e.value.layout.autoLayouting ? "Stop Force Layout" : "Start Force Layout",
|
|
919
|
-
class:
|
|
920
|
+
class: Q([{ "rg-mb-button-on": e.value.layout.autoLayouting }, "rg-mb-button"]),
|
|
920
921
|
onClick: t
|
|
921
922
|
}, [
|
|
922
|
-
e.value.layout.autoLayouting ? (
|
|
923
|
+
e.value.layout.autoLayouting ? (R(), re(he, {
|
|
923
924
|
key: 1,
|
|
924
925
|
"icon-name": "icon-lianjiezhong",
|
|
925
926
|
"class-name": "rg-loading-icon"
|
|
926
|
-
})) : (
|
|
927
|
+
})) : (R(), re(he, {
|
|
927
928
|
key: 0,
|
|
928
929
|
"icon-name": "icon-zidong"
|
|
929
930
|
}))
|
|
930
|
-
], 10,
|
|
931
|
-
|
|
931
|
+
], 10, Qn)) : Y("", !0),
|
|
932
|
+
B(a.$slots, "default"),
|
|
932
933
|
l[2] || (l[2] = I("div", { style: { clear: "both" } }, null, -1))
|
|
933
934
|
], 2));
|
|
934
935
|
}
|
|
935
|
-
})
|
|
936
|
-
const Qn = ["id"], eo = { class: "rg-graph-plugs" }, to = { class: "rg-view-slot" }, no = /* @__PURE__ */ G({
|
|
936
|
+
}), Kn = ["id"], eo = { class: "rg-graph-plugs" }, to = { class: "rg-view-slot" }, no = /* @__PURE__ */ G({
|
|
937
937
|
__name: "RelationGraphUI",
|
|
938
938
|
setup(r) {
|
|
939
|
-
const i = W(), e = ee(), t =
|
|
939
|
+
const i = W(), e = ee(), t = D(() => i.dataStores.optionsRef.value), n = ee(!1);
|
|
940
940
|
ae(() => {
|
|
941
941
|
i.setDom(e.value), n.value = !0;
|
|
942
|
-
}),
|
|
942
|
+
}), De(() => {
|
|
943
943
|
i.beforeUnmount();
|
|
944
944
|
});
|
|
945
945
|
const o = (s) => {
|
|
946
946
|
i.onMouseWheel(s);
|
|
947
947
|
};
|
|
948
|
-
return
|
|
949
|
-
console.error("RelationView.vue mounted");
|
|
948
|
+
return ae(() => {
|
|
950
949
|
}), (s, a) => {
|
|
951
950
|
var l, c, d, h, u, g, f, p, y, v, m;
|
|
952
|
-
return
|
|
951
|
+
return R(), E("div", {
|
|
953
952
|
ref_key: "relationGraphRef$",
|
|
954
953
|
ref: e,
|
|
955
954
|
id: "relation-graph-ins-" + ((l = t.value) == null ? void 0 : l.instanceId),
|
|
956
955
|
tabindex: "1",
|
|
957
|
-
class:
|
|
956
|
+
class: Q([
|
|
958
957
|
"relation-graph",
|
|
959
958
|
t.value && t.value.creatingLinePlot ? "rg-creating-line" : "",
|
|
960
959
|
t.value && t.value.dragEventAction === "move" ? "rg-move-mode" : "",
|
|
@@ -976,43 +975,43 @@ const Qn = ["id"], eo = { class: "rg-graph-plugs" }, to = { class: "rg-view-slot
|
|
|
976
975
|
}),
|
|
977
976
|
onWheel: o
|
|
978
977
|
}, [
|
|
979
|
-
t.value && n.value ? (
|
|
980
|
-
t.value.showToolBar ? (
|
|
978
|
+
t.value && n.value ? (R(), E(xe, { key: 0 }, [
|
|
979
|
+
t.value.showToolBar ? (R(), re(Bt, { key: 0 })) : Y("", !0),
|
|
981
980
|
oe(Wn, null, {
|
|
982
|
-
node: ne((
|
|
983
|
-
|
|
981
|
+
node: ne((C) => [
|
|
982
|
+
B(s.$slots, "node", le(de(C)))
|
|
984
983
|
]),
|
|
985
|
-
line: ne((
|
|
986
|
-
|
|
984
|
+
line: ne((C) => [
|
|
985
|
+
B(s.$slots, "line", le(de(C)))
|
|
987
986
|
]),
|
|
988
987
|
"canvas-plug-behind": ne(() => [
|
|
989
|
-
|
|
990
|
-
|
|
988
|
+
B(s.$slots, "canvas"),
|
|
989
|
+
B(s.$slots, "default")
|
|
991
990
|
]),
|
|
992
991
|
"canvas-plug-above": ne(() => [
|
|
993
|
-
|
|
992
|
+
B(s.$slots, "canvas-above")
|
|
994
993
|
]),
|
|
995
|
-
"node-expand-button": ne((
|
|
996
|
-
|
|
994
|
+
"node-expand-button": ne((C) => [
|
|
995
|
+
B(s.$slots, "node-expand-button", le(de(C)))
|
|
997
996
|
]),
|
|
998
997
|
background: ne(() => [
|
|
999
|
-
|
|
998
|
+
B(s.$slots, "background")
|
|
1000
999
|
]),
|
|
1001
1000
|
_: 3
|
|
1002
1001
|
}),
|
|
1003
1002
|
oe(zt, null, {
|
|
1004
|
-
node: ne((
|
|
1005
|
-
|
|
1003
|
+
node: ne((C) => [
|
|
1004
|
+
B(s.$slots, "node", le(de(C)))
|
|
1006
1005
|
]),
|
|
1007
1006
|
_: 3
|
|
1008
1007
|
}),
|
|
1009
1008
|
I("div", eo, [
|
|
1010
1009
|
I("div", to, [
|
|
1011
|
-
|
|
1010
|
+
B(s.$slots, "view")
|
|
1012
1011
|
])
|
|
1013
1012
|
])
|
|
1014
1013
|
], 64)) : Y("", !0)
|
|
1015
|
-
], 46,
|
|
1014
|
+
], 46, Kn);
|
|
1016
1015
|
};
|
|
1017
1016
|
}
|
|
1018
1017
|
});
|
|
@@ -1063,125 +1062,125 @@ class oo {
|
|
|
1063
1062
|
return;
|
|
1064
1063
|
let n = 0, o = 0, s = 0, a = 0, l = 0, c = 0, d = 0, h = 0, u = "";
|
|
1065
1064
|
i.beginPath(), t.forEach((g) => {
|
|
1066
|
-
const f = g.trim(), p = f.charAt(0), v = f.substring(1).trim().split(/[ ,]+/).filter((
|
|
1067
|
-
let m = 0,
|
|
1065
|
+
const f = g.trim(), p = f.charAt(0), v = f.substring(1).trim().split(/[ ,]+/).filter((L) => L !== "").map(parseFloat);
|
|
1066
|
+
let m = 0, C = 0, b = 0, T = 0, O = 0, _ = 0, N = 0, P = 0, M = 0, k = 0, S = 0;
|
|
1068
1067
|
switch (p) {
|
|
1069
1068
|
case "M":
|
|
1070
1069
|
n = v[0], o = v[1], s = n, a = o, i.moveTo(n + this.offset.x, o + this.offset.y);
|
|
1071
|
-
for (let
|
|
1072
|
-
n = v[
|
|
1070
|
+
for (let L = 2; L < v.length; L += 2)
|
|
1071
|
+
n = v[L], o = v[L + 1], i.lineTo(n + this.offset.x, o + this.offset.y);
|
|
1073
1072
|
break;
|
|
1074
1073
|
case "L":
|
|
1075
|
-
for (let
|
|
1076
|
-
n = v[
|
|
1074
|
+
for (let L = 0; L < v.length; L += 2)
|
|
1075
|
+
n = v[L], o = v[L + 1], i.lineTo(n + this.offset.x, o + this.offset.y);
|
|
1077
1076
|
break;
|
|
1078
1077
|
case "l":
|
|
1079
|
-
for (let
|
|
1080
|
-
n += v[
|
|
1078
|
+
for (let L = 0; L < v.length; L += 2)
|
|
1079
|
+
n += v[L], o += v[L + 1], i.lineTo(n + this.offset.x, o + this.offset.y);
|
|
1081
1080
|
break;
|
|
1082
1081
|
case "H":
|
|
1083
|
-
for (let
|
|
1084
|
-
n = v[
|
|
1082
|
+
for (let L = 0; L < v.length; L++)
|
|
1083
|
+
n = v[L], i.lineTo(n + this.offset.x, o + this.offset.y);
|
|
1085
1084
|
break;
|
|
1086
1085
|
case "h":
|
|
1087
|
-
for (let
|
|
1088
|
-
n += v[
|
|
1086
|
+
for (let L = 0; L < v.length; L++)
|
|
1087
|
+
n += v[L], i.lineTo(n + this.offset.x, o + this.offset.y);
|
|
1089
1088
|
break;
|
|
1090
1089
|
case "V":
|
|
1091
|
-
for (let
|
|
1092
|
-
o = v[
|
|
1090
|
+
for (let L = 0; L < v.length; L++)
|
|
1091
|
+
o = v[L], i.lineTo(n + this.offset.x, o + this.offset.y);
|
|
1093
1092
|
break;
|
|
1094
1093
|
case "v":
|
|
1095
|
-
for (let
|
|
1096
|
-
o += v[
|
|
1094
|
+
for (let L = 0; L < v.length; L++)
|
|
1095
|
+
o += v[L], i.lineTo(n + this.offset.x, o + this.offset.y);
|
|
1097
1096
|
break;
|
|
1098
1097
|
case "C":
|
|
1099
|
-
for (let
|
|
1100
|
-
|
|
1101
|
-
|
|
1098
|
+
for (let L = 0; L < v.length; L += 6)
|
|
1099
|
+
b = v[L], T = v[L + 1], O = v[L + 2], _ = v[L + 3], m = v[L + 4], C = v[L + 5], i.bezierCurveTo(
|
|
1100
|
+
b + this.offset.x,
|
|
1102
1101
|
T + this.offset.y,
|
|
1103
1102
|
O + this.offset.x,
|
|
1104
|
-
|
|
1103
|
+
_ + this.offset.y,
|
|
1105
1104
|
m + this.offset.x,
|
|
1106
|
-
|
|
1107
|
-
), n = m, o =
|
|
1105
|
+
C + this.offset.y
|
|
1106
|
+
), n = m, o = C, l = O, c = _;
|
|
1108
1107
|
break;
|
|
1109
1108
|
case "c":
|
|
1110
|
-
for (let
|
|
1111
|
-
|
|
1112
|
-
|
|
1109
|
+
for (let L = 0; L < v.length; L += 6)
|
|
1110
|
+
b = n + v[L], T = o + v[L + 1], O = n + v[L + 2], _ = o + v[L + 3], m = n + v[L + 4], C = o + v[L + 5], i.bezierCurveTo(
|
|
1111
|
+
b + this.offset.x,
|
|
1113
1112
|
T + this.offset.y,
|
|
1114
1113
|
O + this.offset.x,
|
|
1115
|
-
|
|
1114
|
+
_ + this.offset.y,
|
|
1116
1115
|
m + this.offset.x,
|
|
1117
|
-
|
|
1118
|
-
), l = O, c =
|
|
1116
|
+
C + this.offset.y
|
|
1117
|
+
), l = O, c = _, n = m, o = C;
|
|
1119
1118
|
break;
|
|
1120
1119
|
case "S":
|
|
1121
|
-
for (let
|
|
1122
|
-
u.match(/[CS]/i) ? (
|
|
1123
|
-
|
|
1120
|
+
for (let L = 0; L < v.length; L += 4)
|
|
1121
|
+
u.match(/[CS]/i) ? (b = 2 * n - l, T = 2 * o - c) : (b = n, T = o), O = v[L], _ = v[L + 1], m = v[L + 2], C = v[L + 3], i.bezierCurveTo(
|
|
1122
|
+
b + this.offset.x,
|
|
1124
1123
|
T + this.offset.y,
|
|
1125
1124
|
O + this.offset.x,
|
|
1126
|
-
|
|
1125
|
+
_ + this.offset.y,
|
|
1127
1126
|
m + this.offset.x,
|
|
1128
|
-
|
|
1129
|
-
), n = m, o =
|
|
1127
|
+
C + this.offset.y
|
|
1128
|
+
), n = m, o = C, l = O, c = _;
|
|
1130
1129
|
break;
|
|
1131
1130
|
case "s":
|
|
1132
|
-
for (let
|
|
1133
|
-
u.match(/[CS]/i) ? (
|
|
1134
|
-
|
|
1131
|
+
for (let L = 0; L < v.length; L += 4)
|
|
1132
|
+
u.match(/[CS]/i) ? (b = 2 * n - l, T = 2 * o - c) : (b = n, T = o), O = n + v[L], _ = o + v[L + 1], m = n + v[L + 2], C = o + v[L + 3], i.bezierCurveTo(
|
|
1133
|
+
b + this.offset.x,
|
|
1135
1134
|
T + this.offset.y,
|
|
1136
1135
|
O + this.offset.x,
|
|
1137
|
-
|
|
1136
|
+
_ + this.offset.y,
|
|
1138
1137
|
m + this.offset.x,
|
|
1139
|
-
|
|
1140
|
-
), l = O, c =
|
|
1138
|
+
C + this.offset.y
|
|
1139
|
+
), l = O, c = _, n = m, o = C;
|
|
1141
1140
|
break;
|
|
1142
1141
|
case "Q":
|
|
1143
|
-
for (let
|
|
1144
|
-
|
|
1145
|
-
|
|
1142
|
+
for (let L = 0; L < v.length; L += 4)
|
|
1143
|
+
b = v[L], T = v[L + 1], m = v[L + 2], C = v[L + 3], i.quadraticCurveTo(
|
|
1144
|
+
b + this.offset.x,
|
|
1146
1145
|
T + this.offset.y,
|
|
1147
1146
|
m + this.offset.x,
|
|
1148
|
-
|
|
1149
|
-
), n = m, o =
|
|
1147
|
+
C + this.offset.y
|
|
1148
|
+
), n = m, o = C, d = b, h = T;
|
|
1150
1149
|
break;
|
|
1151
1150
|
case "q":
|
|
1152
|
-
for (let
|
|
1153
|
-
|
|
1154
|
-
|
|
1151
|
+
for (let L = 0; L < v.length; L += 4)
|
|
1152
|
+
b = n + v[L], T = o + v[L + 1], m = n + v[L + 2], C = o + v[L + 3], i.quadraticCurveTo(
|
|
1153
|
+
b + this.offset.x,
|
|
1155
1154
|
T + this.offset.y,
|
|
1156
1155
|
m + this.offset.x,
|
|
1157
|
-
|
|
1158
|
-
), d =
|
|
1156
|
+
C + this.offset.y
|
|
1157
|
+
), d = b, h = T, n = m, o = C;
|
|
1159
1158
|
break;
|
|
1160
1159
|
case "T":
|
|
1161
|
-
for (let
|
|
1162
|
-
u.match(/[QT]/i) ? (
|
|
1163
|
-
|
|
1160
|
+
for (let L = 0; L < v.length; L += 2)
|
|
1161
|
+
u.match(/[QT]/i) ? (b = 2 * n - d, T = 2 * o - h) : (b = n, T = o), m = v[L], C = v[L + 1], i.quadraticCurveTo(
|
|
1162
|
+
b + this.offset.x,
|
|
1164
1163
|
T + this.offset.y,
|
|
1165
1164
|
m + this.offset.x,
|
|
1166
|
-
|
|
1167
|
-
), n = m, o =
|
|
1165
|
+
C + this.offset.y
|
|
1166
|
+
), n = m, o = C, d = b, h = T;
|
|
1168
1167
|
break;
|
|
1169
1168
|
case "t":
|
|
1170
|
-
for (let
|
|
1171
|
-
u.match(/[QT]/i) ? (
|
|
1172
|
-
|
|
1169
|
+
for (let L = 0; L < v.length; L += 2)
|
|
1170
|
+
u.match(/[QT]/i) ? (b = 2 * n - d, T = 2 * o - h) : (b = n, T = o), m = n + v[L], C = o + v[L + 1], i.quadraticCurveTo(
|
|
1171
|
+
b + this.offset.x,
|
|
1173
1172
|
T + this.offset.y,
|
|
1174
1173
|
m + this.offset.x,
|
|
1175
|
-
|
|
1176
|
-
), d =
|
|
1174
|
+
C + this.offset.y
|
|
1175
|
+
), d = b, h = T, n = m, o = C;
|
|
1177
1176
|
break;
|
|
1178
1177
|
case "A":
|
|
1179
|
-
for (let
|
|
1180
|
-
N = v[
|
|
1178
|
+
for (let L = 0; L < v.length; L += 7)
|
|
1179
|
+
N = v[L], P = v[L + 1], M = v[L + 2], k = v[L + 3], S = v[L + 4], m = v[L + 5], C = v[L + 6], this.drawArc(i, n, o, N, P, M, k, S, m, C), n = m, o = C;
|
|
1181
1180
|
break;
|
|
1182
1181
|
case "a":
|
|
1183
|
-
for (let
|
|
1184
|
-
N = v[
|
|
1182
|
+
for (let L = 0; L < v.length; L += 7)
|
|
1183
|
+
N = v[L], P = v[L + 1], M = v[L + 2], k = v[L + 3], S = v[L + 4], m = n + v[L + 5], C = o + v[L + 6], this.drawArc(i, n, o, N, P, M, k, S, m, C), n = m, o = C;
|
|
1185
1184
|
break;
|
|
1186
1185
|
case "Z":
|
|
1187
1186
|
case "z":
|
|
@@ -1207,12 +1206,12 @@ class oo {
|
|
|
1207
1206
|
)
|
|
1208
1207
|
);
|
|
1209
1208
|
isNaN(v) && (v = 0);
|
|
1210
|
-
const m = v * n * p / o,
|
|
1211
|
-
let M = Math.atan2(
|
|
1212
|
-
l === 0 &&
|
|
1213
|
-
const S = M +
|
|
1209
|
+
const m = v * n * p / o, C = v * -o * f / n, b = g * m - u * C + (e + c) / 2, T = u * m + g * C + (t + d) / 2, O = (f - m) / n, _ = (p - C) / o, N = (-f - m) / n, P = (-p - C) / o;
|
|
1210
|
+
let M = Math.atan2(_, O), k = Math.atan2(_ * N - O * P, O * N + _ * P);
|
|
1211
|
+
l === 0 && k > 0 ? k -= 2 * Math.PI : l === 1 && k < 0 && (k += 2 * Math.PI);
|
|
1212
|
+
const S = M + k;
|
|
1214
1213
|
i.ellipse ? i.ellipse(
|
|
1215
|
-
|
|
1214
|
+
b + this.offset.x,
|
|
1216
1215
|
T + this.offset.y,
|
|
1217
1216
|
n,
|
|
1218
1217
|
o,
|
|
@@ -1483,7 +1482,7 @@ const at = (r) => {
|
|
|
1483
1482
|
"selected",
|
|
1484
1483
|
"shouldRender",
|
|
1485
1484
|
"rgCalcedVisibility"
|
|
1486
|
-
],
|
|
1485
|
+
], Xe = (r) => {
|
|
1487
1486
|
if (!r)
|
|
1488
1487
|
return;
|
|
1489
1488
|
const i = {};
|
|
@@ -1495,14 +1494,14 @@ const at = (r) => {
|
|
|
1495
1494
|
}), i;
|
|
1496
1495
|
}, gt = (r) => {
|
|
1497
1496
|
if (!!r)
|
|
1498
|
-
return
|
|
1497
|
+
return Xe(r.line);
|
|
1499
1498
|
}, lo = {
|
|
1500
1499
|
json2Line: Pe,
|
|
1501
1500
|
transLinkToJson: gt
|
|
1502
1501
|
}, co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1503
1502
|
__proto__: null,
|
|
1504
1503
|
json2Line: Pe,
|
|
1505
|
-
transLineToJson:
|
|
1504
|
+
transLineToJson: Xe,
|
|
1506
1505
|
transLinkToJson: gt,
|
|
1507
1506
|
default: lo
|
|
1508
1507
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1510,33 +1509,33 @@ function ho(r, i, e, t, n, o, s, a, l) {
|
|
|
1510
1509
|
const c = n - r, d = o - i, h = Math.sqrt(c * c + d * d);
|
|
1511
1510
|
if (h === 0)
|
|
1512
1511
|
return { x: r, y: i };
|
|
1513
|
-
const u = l * d / h, g = -(l * c) / h, f = r + u, p = i + g, y = r - e / 2, v = r + e / 2, m = i - t / 2,
|
|
1514
|
-
let
|
|
1512
|
+
const u = l * d / h, g = -(l * c) / h, f = r + u, p = i + g, y = r - e / 2, v = r + e / 2, m = i - t / 2, C = i + t / 2;
|
|
1513
|
+
let b = [];
|
|
1515
1514
|
if (c !== 0) {
|
|
1516
|
-
let
|
|
1517
|
-
N >= m && N <=
|
|
1515
|
+
let _ = (y - f) / c, N = p + _ * d;
|
|
1516
|
+
N >= m && N <= C && b.push({ x: y, y: N });
|
|
1518
1517
|
let P = (v - f) / c, M = p + P * d;
|
|
1519
|
-
M >= m && M <=
|
|
1518
|
+
M >= m && M <= C && b.push({ x: v, y: M });
|
|
1520
1519
|
}
|
|
1521
1520
|
if (d !== 0) {
|
|
1522
|
-
let
|
|
1523
|
-
N >= y && N <= v &&
|
|
1524
|
-
let P = (
|
|
1525
|
-
M >= y && M <= v &&
|
|
1521
|
+
let _ = (m - p) / d, N = f + _ * c;
|
|
1522
|
+
N >= y && N <= v && b.push({ x: N, y: m });
|
|
1523
|
+
let P = (C - p) / d, M = f + P * c;
|
|
1524
|
+
M >= y && M <= v && b.push({ x: M, y: C });
|
|
1526
1525
|
}
|
|
1527
|
-
if (
|
|
1526
|
+
if (b.length === 0 && c === 0 && d === 0)
|
|
1528
1527
|
return { x: f, y: p };
|
|
1529
1528
|
let T = null, O = 1 / 0;
|
|
1530
|
-
return
|
|
1531
|
-
const N = Math.sqrt((
|
|
1532
|
-
N < O && (O = N, T =
|
|
1529
|
+
return b.forEach((_) => {
|
|
1530
|
+
const N = Math.sqrt((_.x - n) ** 2 + (_.y - o) ** 2);
|
|
1531
|
+
N < O && (O = N, T = _);
|
|
1533
1532
|
}), T;
|
|
1534
1533
|
}
|
|
1535
1534
|
const uo = {
|
|
1536
1535
|
getRectPoint(r, i, e, t, n, o, s, a, l = !1, c = 1, d = 0, h = 14, u = !1) {
|
|
1537
1536
|
const g = r + n / 2, f = i + o / 2, p = e + s / 2, y = t + a / 2;
|
|
1538
1537
|
if (c > 1) {
|
|
1539
|
-
const P = Math.min(h, n, o), M = -P / 2,
|
|
1538
|
+
const P = Math.min(h, n, o), M = -P / 2, k = P / (c - 1), S = l && u || !l && !u ? M * -1 - d * k : M + d * k, L = ho(
|
|
1540
1539
|
g,
|
|
1541
1540
|
f,
|
|
1542
1541
|
n,
|
|
@@ -1547,17 +1546,17 @@ const uo = {
|
|
|
1547
1546
|
a,
|
|
1548
1547
|
S
|
|
1549
1548
|
);
|
|
1550
|
-
if (
|
|
1551
|
-
return
|
|
1549
|
+
if (L)
|
|
1550
|
+
return L;
|
|
1552
1551
|
}
|
|
1553
1552
|
const v = g < p ? 1 : -1, m = f < y ? 1 : -1;
|
|
1554
1553
|
if (y === f)
|
|
1555
1554
|
return { x: g + v * n / 2, y: f };
|
|
1556
|
-
const
|
|
1555
|
+
const C = Math.abs((p - g) / (y - f)), b = n / o;
|
|
1557
1556
|
let T = 0, O = 0;
|
|
1558
|
-
|
|
1559
|
-
const
|
|
1560
|
-
return { x:
|
|
1557
|
+
C < b ? (T = v * o / 2 * C, O = m * o / 2) : (T = v * n / 2, O = m * n / 2 / C);
|
|
1558
|
+
const _ = g + T, N = f + O;
|
|
1559
|
+
return { x: _, y: N };
|
|
1561
1560
|
},
|
|
1562
1561
|
getRectPointBasic(r, i, e, t, n, o, s, a) {
|
|
1563
1562
|
const l = r + n / 2, c = i + o / 2, d = e + s / 2, h = t + a / 2;
|
|
@@ -1665,13 +1664,13 @@ const uo = {
|
|
|
1665
1664
|
const y = i + o / 2;
|
|
1666
1665
|
let v = g - p;
|
|
1667
1666
|
v > -1 && v < 1 && (g = g - 0.5, p = p + 0.5, v = -1);
|
|
1668
|
-
let
|
|
1667
|
+
let C = 0;
|
|
1669
1668
|
if (c > 1) {
|
|
1670
|
-
const S = Math.min(h, n, o),
|
|
1671
|
-
|
|
1669
|
+
const S = Math.min(h, n, o), L = -S / 2, A = S / (c - 1);
|
|
1670
|
+
C = l && u || !l && !u ? L * -1 - d * A : L + d * A;
|
|
1672
1671
|
}
|
|
1673
|
-
const
|
|
1674
|
-
return { x: p - M, y: y -
|
|
1672
|
+
const b = f - y, T = Math.sqrt(v ** 2 + b ** 2) * C / v, O = b / v, _ = n / 2, N = o / 2, P = p < g ? -1 : 1, M = (-1 * _ ** 2 * O * T + _ * N * Math.sqrt(Math.abs(N ** 2 + O ** 2 * _ ** 2 - T ** 2)) / P) / (N ** 2 + _ ** 2 * O ** 2), k = O * M + T;
|
|
1673
|
+
return { x: p - M, y: y - k };
|
|
1675
1674
|
},
|
|
1676
1675
|
getCirclePointBasic(r, i, e, t, n, o, s, a, l) {
|
|
1677
1676
|
const c = r + n / 2, d = i + o / 2, h = e + s / 2, u = t + a / 2, g = h - c, f = u - d, p = Math.sqrt(g * g + f * f), y = p - l, v = y * g / p * -1, m = y * f / p * -1;
|
|
@@ -1712,7 +1711,7 @@ const uo = {
|
|
|
1712
1711
|
let n = Math.atan2(t - i, e - r) * 180 / Math.PI;
|
|
1713
1712
|
return n < 0 && (n += 360), n > 90 && n <= 270 && (n += 180), n >= 360 && (n -= 360), Math.round(n);
|
|
1714
1713
|
}
|
|
1715
|
-
},
|
|
1714
|
+
}, Re = (r, i, e, t) => {
|
|
1716
1715
|
const n = r - e, o = i - t;
|
|
1717
1716
|
return Math.sqrt(n ** 2 + o ** 2);
|
|
1718
1717
|
};
|
|
@@ -2056,7 +2055,7 @@ class yo extends Te {
|
|
|
2056
2055
|
let p = this.getLevelR(l, s) || h + f * d;
|
|
2057
2056
|
s === 1 && d === 1 && (!this.layoutOptions.levelGaps || this.layoutOptions.levelGaps.length === 0) && (p = this.calculateMinimumRadius(e, 10), p = Math.min(Math.max(p, 200), 500));
|
|
2058
2057
|
for (const m of e) {
|
|
2059
|
-
const
|
|
2058
|
+
const C = ((y = m.lot) == null ? void 0 : y.strengthWithChilds) / a, b = o.x + p, T = o.y, O = C * g, _ = u + O / 2, N = se.getRotatedPoint(b, T, o.x, o.y, _);
|
|
2060
2059
|
m.lot.x = N.x, m.lot.y = N.y, m.lot.childs && m.lot.childs.length > 0 && this.placeNodesInFanRegion(m.lot.childs, u, u + O, o, s + 1, (v = m.lot) == null ? void 0 : v.strengthWithChilds, l, c + 1, d, p), u += O;
|
|
2061
2060
|
}
|
|
2062
2061
|
}
|
|
@@ -2066,7 +2065,7 @@ class yo extends Te {
|
|
|
2066
2065
|
o && (o.dragging = !0);
|
|
2067
2066
|
} else if (e === V.onNodeDragging) {
|
|
2068
2067
|
const n = t[0], o = t[1], s = t[2], a = this.calcNodeMap.get(n);
|
|
2069
|
-
|
|
2068
|
+
a && (a.x = o, a.y = s);
|
|
2070
2069
|
} else if (e === V.onNodeDragEnd) {
|
|
2071
2070
|
const n = t[0], o = this.calcNodeMap.get(n);
|
|
2072
2071
|
o && (o.dragging = !1);
|
|
@@ -2130,7 +2129,7 @@ class yo extends Te {
|
|
|
2130
2129
|
}
|
|
2131
2130
|
});
|
|
2132
2131
|
}
|
|
2133
|
-
|
|
2132
|
+
x("Force Layout[" + this.instanceId + "] finished"), this.applyFBuffToNodes(), this.applyPositionToNodes(), this.disConnectToGraphInstance();
|
|
2134
2133
|
try {
|
|
2135
2134
|
this._onFinishCallback && this._onFinishCallback();
|
|
2136
2135
|
} catch (e) {
|
|
@@ -2274,7 +2273,7 @@ class vo extends Te {
|
|
|
2274
2273
|
this.layoutOptions.layoutExpansionDirection = a, this.layoutOptions.levelDistance && console.error("Error: levelDistance is not support\uFF0C Please use levelGaps or treeNodeGapH,treeNodeGapV option in layoutOptions"), this.enableGatherNodes = this.layoutOptions.enableGatherNodes, this.layoutOptions.rotate || (this.layoutOptions.rotate = 0);
|
|
2275
2274
|
}
|
|
2276
2275
|
placeNodes(e, t) {
|
|
2277
|
-
if (
|
|
2276
|
+
if (x("RGTreeLayout:placeNodes"), t)
|
|
2278
2277
|
x("layout by root:", t);
|
|
2279
2278
|
else {
|
|
2280
2279
|
console.error("root is null");
|
|
@@ -2299,9 +2298,7 @@ class vo extends Te {
|
|
|
2299
2298
|
const { tree: d, reverseTree: h } = this.networkAnalyzer.analyzeNetwork(a, this.rootNode, !0);
|
|
2300
2299
|
this.placeNodesPosition(this.rootNode, d.networkNodes, d.analyticResult), this.placeNodesPosition(this.rootNode, h.networkNodes, h.analyticResult);
|
|
2301
2300
|
}
|
|
2302
|
-
const l = this.layoutOptions.rotate || 0;
|
|
2303
|
-
console.log("rotate:", l);
|
|
2304
|
-
const c = { x: t.x, y: t.y };
|
|
2301
|
+
const l = this.layoutOptions.rotate || 0, c = { x: t.x, y: t.y };
|
|
2305
2302
|
this.allNodes.forEach((d) => {
|
|
2306
2303
|
if (d.fixed !== !0 && !!F.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)) {
|
|
2307
2304
|
if (l) {
|
|
@@ -2336,9 +2333,7 @@ class vo extends Te {
|
|
|
2336
2333
|
y.fixed !== !0 && y.lot.level !== 0 && (o === "start" ? y.lot.x = e.lot.x - p * y.lot.strengthWithChilds_from : o === "end" ? y.lot.x = e.lot.x + p * y.lot.strengthWithChilds_from : y.lot.x = e.lot.x + p * (l / -2 + y.lot.strengthWithChilds_from + y.lot.strengthWithChilds / 2));
|
|
2337
2334
|
}), this.applyNodesGap(t, "v"), this.gatherNodes(t, "v", p);
|
|
2338
2335
|
} else {
|
|
2339
|
-
const c = this.layoutOptions.treeNodeGapH || 20, d = this.layoutOptions.treeNodeGapV || 20;
|
|
2340
|
-
console.log("levelNodesMap:", a);
|
|
2341
|
-
const h = /* @__PURE__ */ new Map();
|
|
2336
|
+
const c = this.layoutOptions.treeNodeGapH || 20, d = this.layoutOptions.treeNodeGapV || 20, h = /* @__PURE__ */ new Map();
|
|
2342
2337
|
for (const y of s) {
|
|
2343
2338
|
const v = a.get(y);
|
|
2344
2339
|
h.set(y, Math.max(...v.map((m) => m.el_W || m.width || 50)));
|
|
@@ -2355,7 +2350,7 @@ class vo extends Te {
|
|
|
2355
2350
|
y.fixed !== !0 && y !== e && (this.layoutOptions.from === "right" ? y.lot.x = e.lot.x - this.getLevelDistance(y.lot.level, h, c + 50) : y.lot.x = e.lot.x + this.getLevelDistance(y.lot.level, h, c + 50));
|
|
2356
2351
|
}), t.forEach((y) => {
|
|
2357
2352
|
y.fixed !== !0 && y.lot.level !== 0 && (o === "start" ? y.lot.y = e.lot.y - p * y.lot.strengthWithChilds_from : o === "end" ? y.lot.y = e.lot.y + p * y.lot.strengthWithChilds_from : y.lot.y = e.lot.y + p * (l / -2 + y.lot.strengthWithChilds_from + y.lot.strengthWithChilds / 2));
|
|
2358
|
-
}),
|
|
2353
|
+
}), this.applyNodesGap(t, "h"), this.gatherNodes(t, "h", p);
|
|
2359
2354
|
}
|
|
2360
2355
|
}
|
|
2361
2356
|
getLevelDistance(e, t, n) {
|
|
@@ -2441,85 +2436,84 @@ class vo extends Te {
|
|
|
2441
2436
|
p.rgNode.lot.x = F.getNodeLotXY(y, p).x;
|
|
2442
2437
|
}
|
|
2443
2438
|
}
|
|
2444
|
-
console.log("levelNodes:", u, g);
|
|
2445
2439
|
}
|
|
2446
2440
|
if (t === "h") {
|
|
2447
2441
|
const u = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
2448
|
-
for (const
|
|
2449
|
-
const T = l.get(
|
|
2450
|
-
u.set(
|
|
2442
|
+
for (const C of a) {
|
|
2443
|
+
const T = l.get(C).map((O) => h.get(O.id));
|
|
2444
|
+
u.set(C, Math.max(...T.map((O) => O.width))), g.set(C, Math.min(...T.map((O) => O.x)));
|
|
2451
2445
|
}
|
|
2452
2446
|
const f = this.layoutOptions.treeNodeGapH;
|
|
2453
|
-
let p = a.filter((
|
|
2447
|
+
let p = a.filter((C) => C > 0).sort((C, b) => C - b), y = a.filter((C) => C < 0).sort((C, b) => b - C), v = 1;
|
|
2454
2448
|
this.layoutOptions.from === "right" && ([y, p] = [p, y], v = -1);
|
|
2455
2449
|
let m = 0;
|
|
2456
|
-
for (const
|
|
2457
|
-
const
|
|
2458
|
-
u.get(
|
|
2450
|
+
for (const C of p) {
|
|
2451
|
+
const b = C - v, T = g.get(b), O = u.get(b), _ = g.get(C) + m;
|
|
2452
|
+
u.get(C);
|
|
2459
2453
|
const N = T + O + f;
|
|
2460
|
-
if (N >
|
|
2461
|
-
const P = N -
|
|
2462
|
-
|
|
2463
|
-
const M = l.get(
|
|
2464
|
-
for (const
|
|
2465
|
-
|
|
2466
|
-
g.set(
|
|
2454
|
+
if (N > _) {
|
|
2455
|
+
const P = N - _;
|
|
2456
|
+
m = P;
|
|
2457
|
+
const M = l.get(C);
|
|
2458
|
+
for (const k of M)
|
|
2459
|
+
k.lot.x += m;
|
|
2460
|
+
g.set(C, _ + P);
|
|
2467
2461
|
} else
|
|
2468
|
-
g.set(
|
|
2462
|
+
g.set(C, _);
|
|
2469
2463
|
}
|
|
2470
2464
|
m = 0;
|
|
2471
|
-
for (const
|
|
2472
|
-
const
|
|
2473
|
-
u.get(
|
|
2474
|
-
const O = g.get(
|
|
2475
|
-
if (O +
|
|
2476
|
-
const P = N - (O +
|
|
2465
|
+
for (const C of y) {
|
|
2466
|
+
const b = C + v, T = g.get(b);
|
|
2467
|
+
u.get(b);
|
|
2468
|
+
const O = g.get(C) + m, _ = u.get(C), N = T - f;
|
|
2469
|
+
if (O + _ > N) {
|
|
2470
|
+
const P = N - (O + _);
|
|
2477
2471
|
m = P;
|
|
2478
|
-
const M = l.get(
|
|
2479
|
-
for (const
|
|
2480
|
-
|
|
2481
|
-
g.set(
|
|
2472
|
+
const M = l.get(C);
|
|
2473
|
+
for (const k of M)
|
|
2474
|
+
k.lot.x += m;
|
|
2475
|
+
g.set(C, O + P);
|
|
2482
2476
|
} else
|
|
2483
|
-
g.set(
|
|
2477
|
+
g.set(C, O);
|
|
2484
2478
|
}
|
|
2485
2479
|
} else {
|
|
2486
2480
|
const u = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
2487
|
-
for (const
|
|
2488
|
-
const T = l.get(
|
|
2489
|
-
u.set(
|
|
2481
|
+
for (const C of a) {
|
|
2482
|
+
const T = l.get(C).map((O) => h.get(O.id));
|
|
2483
|
+
u.set(C, Math.max(...T.map((O) => O.height))), g.set(C, Math.min(...T.map((O) => O.y)));
|
|
2490
2484
|
}
|
|
2491
2485
|
const f = this.layoutOptions.treeNodeGapV;
|
|
2492
|
-
let p = a.filter((
|
|
2486
|
+
let p = a.filter((C) => C > 0).sort((C, b) => C - b), y = a.filter((C) => C < 0).sort((C, b) => b - C), v = 1;
|
|
2493
2487
|
this.layoutOptions.from === "bottom" && ([y, p] = [p, y], v = -1);
|
|
2494
2488
|
let m = 0;
|
|
2495
|
-
for (const
|
|
2496
|
-
const
|
|
2497
|
-
u.get(
|
|
2489
|
+
for (const C of p) {
|
|
2490
|
+
const b = C - v, T = g.get(b), O = u.get(b), _ = g.get(C) + m;
|
|
2491
|
+
u.get(C);
|
|
2498
2492
|
const N = T + O + f;
|
|
2499
|
-
if (N >
|
|
2500
|
-
const P = N -
|
|
2501
|
-
|
|
2502
|
-
const M = l.get(
|
|
2503
|
-
for (const
|
|
2504
|
-
|
|
2505
|
-
g.set(
|
|
2493
|
+
if (N > _) {
|
|
2494
|
+
const P = N - _;
|
|
2495
|
+
m = P;
|
|
2496
|
+
const M = l.get(C);
|
|
2497
|
+
for (const k of M)
|
|
2498
|
+
k.lot.y += m;
|
|
2499
|
+
g.set(C, _ + P);
|
|
2506
2500
|
} else
|
|
2507
|
-
g.set(
|
|
2501
|
+
g.set(C, _);
|
|
2508
2502
|
}
|
|
2509
2503
|
m = 0;
|
|
2510
|
-
for (const
|
|
2511
|
-
const
|
|
2512
|
-
u.get(
|
|
2513
|
-
const O = g.get(
|
|
2514
|
-
if (O +
|
|
2515
|
-
const P = N - (O +
|
|
2504
|
+
for (const C of y) {
|
|
2505
|
+
const b = C + v, T = g.get(b);
|
|
2506
|
+
u.get(b);
|
|
2507
|
+
const O = g.get(C) + m, _ = u.get(C), N = T - f;
|
|
2508
|
+
if (O + _ > N) {
|
|
2509
|
+
const P = N - (O + _);
|
|
2516
2510
|
m = P;
|
|
2517
|
-
const M = l.get(
|
|
2518
|
-
for (const
|
|
2519
|
-
|
|
2520
|
-
g.set(
|
|
2511
|
+
const M = l.get(C);
|
|
2512
|
+
for (const k of M)
|
|
2513
|
+
k.lot.y += m;
|
|
2514
|
+
g.set(C, O + P);
|
|
2521
2515
|
} else
|
|
2522
|
-
g.set(
|
|
2516
|
+
g.set(C, O);
|
|
2523
2517
|
}
|
|
2524
2518
|
}
|
|
2525
2519
|
}
|
|
@@ -2555,7 +2549,7 @@ class vo extends Te {
|
|
|
2555
2549
|
return a;
|
|
2556
2550
|
}
|
|
2557
2551
|
}
|
|
2558
|
-
const
|
|
2552
|
+
const Xt = vo;
|
|
2559
2553
|
class mo extends Ue {
|
|
2560
2554
|
constructor(e, t, n) {
|
|
2561
2555
|
super(e, t, n);
|
|
@@ -2631,7 +2625,7 @@ class xo extends Ue {
|
|
|
2631
2625
|
let l = a * 90 / Math.PI / 2;
|
|
2632
2626
|
l < 200 && (l = 200), l > 800 && (l = 800), s.forEach((c, d) => {
|
|
2633
2627
|
const h = se.getOvalPoint(o.x, o.y, l, d, a);
|
|
2634
|
-
c.lot.x = h.x, c.lot.y = h.y
|
|
2628
|
+
c.lot.x = h.x, c.lot.y = h.y;
|
|
2635
2629
|
}), s.forEach((c) => {
|
|
2636
2630
|
if (c.fixed === !0 || !c.rgCalcedVisibility)
|
|
2637
2631
|
return;
|
|
@@ -2672,7 +2666,7 @@ class Co extends Te {
|
|
|
2672
2666
|
w(this, "levelGaps", []);
|
|
2673
2667
|
this.layoutOptions = e, x("new RGSmartTreeLayout:", this.layoutOptions), this.layoutOptions.from || (this.layoutOptions.from = "left"), this.layoutOptions.levelGaps && (Array.isArray(this.layoutOptions.levelGaps) ? this.levelGaps = this.layoutOptions.levelGaps : console.error("Error levelDistance, levelDistance must is Array"));
|
|
2674
2668
|
const o = this.layoutOptions.from;
|
|
2675
|
-
o === "top" || o === "bottom" ? (this.layoutOptions.treeNodeGapH || (this.layoutOptions.treeNodeGapH = 10), this.layoutOptions.treeNodeGapV || (this.layoutOptions.treeNodeGapV = 30), this.layoutOptions.treeNodeGapV < 30 && (this.layoutOptions.treeNodeGapV = 30)) : (this.layoutOptions.treeNodeGapH || (this.layoutOptions.treeNodeGapH = 30), this.layoutOptions.treeNodeGapV || (this.layoutOptions.treeNodeGapV = 10), this.layoutOptions.treeNodeGapH < 30 && (this.layoutOptions.treeNodeGapH = 30)), o === "top" ? (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "center"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "start"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.layoutOptions.alignItemsX), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.getReverseAlignItems(this.layoutOptions.alignItemsY))) : o === "bottom" ? (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "center"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "end"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.layoutOptions.alignItemsX), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.getReverseAlignItems(this.layoutOptions.alignItemsY))) : o === "right" ? (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "end"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "center"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.getReverseAlignItems(this.layoutOptions.alignItemsX)), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.layoutOptions.alignItemsY)) : (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "end"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "center"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.getReverseAlignItems(this.layoutOptions.alignItemsX)), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.layoutOptions.alignItemsY)),
|
|
2669
|
+
o === "top" || o === "bottom" ? (this.layoutOptions.treeNodeGapH || (this.layoutOptions.treeNodeGapH = 10), this.layoutOptions.treeNodeGapV || (this.layoutOptions.treeNodeGapV = 30), this.layoutOptions.treeNodeGapV < 30 && (this.layoutOptions.treeNodeGapV = 30)) : (this.layoutOptions.treeNodeGapH || (this.layoutOptions.treeNodeGapH = 30), this.layoutOptions.treeNodeGapV || (this.layoutOptions.treeNodeGapV = 10), this.layoutOptions.treeNodeGapH < 30 && (this.layoutOptions.treeNodeGapH = 30)), o === "top" ? (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "center"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "start"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.layoutOptions.alignItemsX), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.getReverseAlignItems(this.layoutOptions.alignItemsY))) : o === "bottom" ? (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "center"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "end"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.layoutOptions.alignItemsX), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.getReverseAlignItems(this.layoutOptions.alignItemsY))) : o === "right" ? (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "end"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "center"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.getReverseAlignItems(this.layoutOptions.alignItemsX)), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.layoutOptions.alignItemsY)) : (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "end"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "center"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.getReverseAlignItems(this.layoutOptions.alignItemsX)), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.layoutOptions.alignItemsY)), this.requireLinks = !0, this.graphInstance = n;
|
|
2676
2670
|
}
|
|
2677
2671
|
placeNodes(e, t) {
|
|
2678
2672
|
if (x("RGSmartTreeLayout:placeNodes"), t)
|
|
@@ -2777,7 +2771,6 @@ class Co extends Te {
|
|
|
2777
2771
|
for (const f of h)
|
|
2778
2772
|
f.rgNode.x = f.x;
|
|
2779
2773
|
}
|
|
2780
|
-
console.log("levelNodes:", c, d);
|
|
2781
2774
|
}
|
|
2782
2775
|
}
|
|
2783
2776
|
getLevelDistance(e, t, n) {
|
|
@@ -2826,7 +2819,7 @@ class _o extends Te {
|
|
|
2826
2819
|
console.error("root is null");
|
|
2827
2820
|
return;
|
|
2828
2821
|
}
|
|
2829
|
-
this.rootNode = t, this.allNodes = e
|
|
2822
|
+
this.rootNode = t, this.allNodes = e;
|
|
2830
2823
|
const n = {
|
|
2831
2824
|
alignItemsX: this.layoutOptions.alignItemsX,
|
|
2832
2825
|
alignItemsY: this.layoutOptions.alignItemsY
|
|
@@ -2856,7 +2849,6 @@ class _o extends Te {
|
|
|
2856
2849
|
}
|
|
2857
2850
|
if (c === 0)
|
|
2858
2851
|
return;
|
|
2859
|
-
console.log("levelMaxWidthMap:", a);
|
|
2860
2852
|
const h = l / c + s;
|
|
2861
2853
|
t.forEach((u) => {
|
|
2862
2854
|
u.fixed !== !0 && u !== e && (this.layoutOptions.from === "right" ? u.lot.x = e.lot.x - this.getLevelDistance(u.lot.level, a, o + 50) : u.lot.x = e.lot.x + this.getLevelDistance(u.lot.level, a, o + 50));
|
|
@@ -3101,62 +3093,62 @@ const Yt = _o, Ne = (r) => !r || r.length === 0 ? "" : r.map((i) => {
|
|
|
3101
3093
|
tcy: g,
|
|
3102
3094
|
t_W: f,
|
|
3103
3095
|
t_H: p
|
|
3104
|
-
} = r, y = d - n, v = h - o, m = n - s,
|
|
3105
|
-
let
|
|
3106
|
-
const P = t.fromJunctionPoint || e.defaultJunctionPoint || Z.border, M = t.toJunctionPoint || e.defaultJunctionPoint || Z.border,
|
|
3107
|
-
let A = 0,
|
|
3108
|
-
if (
|
|
3109
|
-
const $ = t.polyLineStartDistance || Math.max(Math.min(30, Math.abs(h - o) / 2), 15), U =
|
|
3110
|
-
if (t.placeText === "start" ? (A = n,
|
|
3096
|
+
} = r, y = d - n, v = h - o, m = n - s, C = o - a, b = d - u, T = h - g, O = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0;
|
|
3097
|
+
let _ = Math.min(O, Math.abs(y)) * (n < d ? 1 : -1), N = Math.min(O, Math.abs(v)) * (o < h ? 1 : -1);
|
|
3098
|
+
const P = t.fromJunctionPoint || e.defaultJunctionPoint || Z.border, M = t.toJunctionPoint || e.defaultJunctionPoint || Z.border, k = t.lineDirection || (P === Z.tb || P === Z.top || P === Z.bottom ? "v" : "h") || (Math.abs(m) >= l / 2 ? "h" : "v"), S = t.lineDirection || (M === Z.tb || M === Z.top || M === Z.bottom ? "v" : "h") || (Math.abs(b) >= f / 2 ? "h" : "v"), L = [];
|
|
3099
|
+
let A = 0, X = 0;
|
|
3100
|
+
if (k === "v") {
|
|
3101
|
+
const $ = t.polyLineStartDistance || Math.max(Math.min(30, Math.abs(h - o) / 2), 15), U = C > 0 ? $ : -$;
|
|
3102
|
+
if (t.placeText === "start" ? (A = n, X = o + (C > 0 ? 20 : -5)) : t.placeText === "center" || t.placeText === "middle" ? (A = n + (d - n) / 2, X = o + U) : (A = d, X = h - (C > 0 ? 20 : -5)), L.push(
|
|
3111
3103
|
{ type: "M", x: Math.round(n), y: Math.round(o) },
|
|
3112
3104
|
{ type: "v", dy: Math.round(U - N) },
|
|
3113
|
-
{ type: "c", dx1: 0, dy1: Math.round(N), dx2: Math.round(
|
|
3105
|
+
{ type: "c", dx1: 0, dy1: Math.round(N), dx2: Math.round(_), dy2: Math.round(N), dx: Math.round(_), dy: Math.round(N) }
|
|
3114
3106
|
), S === "v")
|
|
3115
|
-
|
|
3116
|
-
{ type: "h", dx: Math.round(d - n -
|
|
3117
|
-
{ type: "c", dx1: Math.round(
|
|
3107
|
+
L.push(
|
|
3108
|
+
{ type: "h", dx: Math.round(d - n - _ * 2) },
|
|
3109
|
+
{ type: "c", dx1: Math.round(_), dy1: 0, dx2: Math.round(_), dy2: Math.round(N), dx: Math.round(_), dy: Math.round(N) },
|
|
3118
3110
|
{ type: "v", dy: Math.round(h - o - U - N) }
|
|
3119
3111
|
);
|
|
3120
3112
|
else {
|
|
3121
|
-
const
|
|
3122
|
-
|
|
3123
|
-
{ type: "h", dx: Math.round(d - n + ie -
|
|
3124
|
-
{ type: "c", dx1: Math.round(
|
|
3113
|
+
const K = Math.min(30, Math.abs(d - n) / 2), ie = b > 0 ? -K : K;
|
|
3114
|
+
L.push(
|
|
3115
|
+
{ type: "h", dx: Math.round(d - n + ie - _) },
|
|
3116
|
+
{ type: "c", dx1: Math.round(_), dy1: 0, dx2: Math.round(_), dy2: Math.round(N), dx: Math.round(_), dy: Math.round(N) },
|
|
3125
3117
|
{ type: "v", dy: Math.round(h - o - U - N) },
|
|
3126
|
-
{ type: "h", dx: Math.round(ie -
|
|
3118
|
+
{ type: "h", dx: Math.round(ie - _) }
|
|
3127
3119
|
);
|
|
3128
3120
|
}
|
|
3129
3121
|
} else {
|
|
3130
3122
|
const $ = t.polyLineStartDistance || Math.max(Math.min(30, Math.abs(d - n) / 2), 15), U = m > 0 ? $ : -$;
|
|
3131
|
-
if (t.placeText === "start" ? (A = n + (m > 0 ? 10 : -50),
|
|
3123
|
+
if (t.placeText === "start" ? (A = n + (m > 0 ? 10 : -50), X = o) : t.placeText === "center" || t.placeText === "middle" ? (A = n + U, X = o + (h - o) / 2) : (A = d - (m > 0 ? 10 : -50), X = h), _ = Math.min(O, Math.abs(y)) * (n > s ? 1 : -1), N = Math.min(O, Math.abs(v)) * (o < h ? 1 : -1), L.push(
|
|
3132
3124
|
{ type: "M", x: Math.round(n), y: Math.round(o) },
|
|
3133
|
-
{ type: "h", dx: Math.round(U -
|
|
3134
|
-
{ type: "c", dx1: Math.round(
|
|
3125
|
+
{ type: "h", dx: Math.round(U - _) },
|
|
3126
|
+
{ type: "c", dx1: Math.round(_), dy1: 0, dx2: Math.round(_), dy2: Math.round(N), dx: Math.round(_), dy: Math.round(N) }
|
|
3135
3127
|
), S === "v") {
|
|
3136
|
-
|
|
3137
|
-
const
|
|
3138
|
-
|
|
3128
|
+
_ = Math.min(O, Math.abs(y)) * (h < g ? 1 : -1), N = Math.min(O, Math.abs(v)) * (h < g ? 1 : -1);
|
|
3129
|
+
const K = Math.min(30, Math.abs(h - o) / 2), ie = T > 0 ? -K : K;
|
|
3130
|
+
L.push(
|
|
3139
3131
|
{ type: "v", dy: Math.round(h - o + ie - N) },
|
|
3140
|
-
{ type: "h", dx: Math.round(d - n - U -
|
|
3141
|
-
{ type: "c", dx1: 0, dy1: Math.round(N), dx2: Math.round(
|
|
3132
|
+
{ type: "h", dx: Math.round(d - n - U - _) },
|
|
3133
|
+
{ type: "c", dx1: 0, dy1: Math.round(N), dx2: Math.round(_), dy2: Math.round(N), dx: Math.round(_), dy: Math.round(N) },
|
|
3142
3134
|
{ type: "v", dy: Math.round(ie - N) }
|
|
3143
3135
|
);
|
|
3144
3136
|
} else
|
|
3145
|
-
|
|
3137
|
+
_ = Math.min(O, Math.abs(y)) * (n + U < d ? 1 : -1), N = Math.min(O, Math.abs(v)) * (h > o ? 1 : -1), L.push(
|
|
3146
3138
|
{ type: "v", dy: Math.round(h - o - N * 2) },
|
|
3147
|
-
{ type: "c", dx1: 0, dy1: Math.round(N), dx2: Math.round(
|
|
3148
|
-
{ type: "h", dx: Math.round(d - n - U -
|
|
3139
|
+
{ type: "c", dx1: 0, dy1: Math.round(N), dx2: Math.round(_), dy2: Math.round(N), dx: Math.round(_), dy: Math.round(N) },
|
|
3140
|
+
{ type: "h", dx: Math.round(d - n - U - _) }
|
|
3149
3141
|
);
|
|
3150
3142
|
}
|
|
3151
|
-
i.x = A, i.y =
|
|
3152
|
-
const H = Ne(
|
|
3143
|
+
i.x = A, i.y = X;
|
|
3144
|
+
const H = Ne(L);
|
|
3153
3145
|
return {
|
|
3154
|
-
pathCommands:
|
|
3146
|
+
pathCommands: L,
|
|
3155
3147
|
pathData: H,
|
|
3156
3148
|
textPosition: i,
|
|
3157
3149
|
points: []
|
|
3158
3150
|
};
|
|
3159
|
-
},
|
|
3151
|
+
}, Qe = {
|
|
3160
3152
|
left: { x: -1, y: 0 },
|
|
3161
3153
|
right: { x: 1, y: 0 },
|
|
3162
3154
|
top: { x: 0, y: -1 },
|
|
@@ -3175,14 +3167,14 @@ function ct({
|
|
|
3175
3167
|
sourceOffset: o,
|
|
3176
3168
|
targetOffset: s
|
|
3177
3169
|
}) {
|
|
3178
|
-
const a =
|
|
3170
|
+
const a = Qe[i], l = Qe[t], c = { x: r.x + a.x * o, y: r.y + a.y * o }, d = { x: e.x + l.x * s, y: e.y + l.y * s }, h = Po({
|
|
3179
3171
|
source: c,
|
|
3180
3172
|
sourcePosition: i,
|
|
3181
3173
|
target: d
|
|
3182
3174
|
}), u = h.x !== 0 ? "x" : "y", g = h[u];
|
|
3183
3175
|
let f = [], p, y;
|
|
3184
3176
|
const v = { x: 0, y: 0 }, m = { x: 0, y: 0 };
|
|
3185
|
-
let
|
|
3177
|
+
let C = 0;
|
|
3186
3178
|
if (a[u] * l[u] === -1) {
|
|
3187
3179
|
p = n.x, y = n.y;
|
|
3188
3180
|
const T = [
|
|
@@ -3192,24 +3184,24 @@ function ct({
|
|
|
3192
3184
|
{ x: c.x, y },
|
|
3193
3185
|
{ x: d.x, y }
|
|
3194
3186
|
];
|
|
3195
|
-
a[u] === g ? (
|
|
3187
|
+
a[u] === g ? (C = 1.1, f = u === "x" ? T : O) : (C = 1.2, f = u === "x" ? O : T);
|
|
3196
3188
|
} else {
|
|
3197
3189
|
const T = [{ x: c.x, y: d.y }], O = [{ x: d.x, y: c.y }];
|
|
3198
3190
|
if (u === "x" ? f = a.x === g ? O : T : f = a.y === g ? T : O, i === t) {
|
|
3199
|
-
|
|
3200
|
-
const
|
|
3201
|
-
if (
|
|
3202
|
-
const
|
|
3203
|
-
a[u] === g ? v[u] = (c[u] > r[u] ? -1 : 1) *
|
|
3191
|
+
C = 2.1;
|
|
3192
|
+
const k = Math.abs(r[u] - e[u]), S = a[u] === g ? o : s;
|
|
3193
|
+
if (k <= S) {
|
|
3194
|
+
const L = Math.min(S - 1, S - k);
|
|
3195
|
+
a[u] === g ? v[u] = (c[u] > r[u] ? -1 : 1) * L : m[u] = (d[u] > e[u] ? -1 : 1) * L;
|
|
3204
3196
|
}
|
|
3205
3197
|
}
|
|
3206
3198
|
if (i !== t) {
|
|
3207
|
-
|
|
3208
|
-
const
|
|
3209
|
-
(a[u] === 1 && (!S &&
|
|
3199
|
+
C = 2.2;
|
|
3200
|
+
const k = u === "x" ? "y" : "x", S = a[u] === l[k], L = c[k] > d[k], A = c[k] < d[k];
|
|
3201
|
+
(a[u] === 1 && (!S && L || S && A) || a[u] !== 1 && (!S && A || S && L)) && (f = u === "x" ? T : O);
|
|
3210
3202
|
}
|
|
3211
|
-
const
|
|
3212
|
-
P >= M ? (p = (
|
|
3203
|
+
const _ = { x: c.x + v.x, y: c.y + v.y }, N = { x: d.x + m.x, y: d.y + m.y }, P = Math.max(Math.abs(_.x - f[0].x), Math.abs(N.x - f[0].x)), M = Math.max(Math.abs(_.y - f[0].y), Math.abs(N.y - f[0].y));
|
|
3204
|
+
P >= M ? (p = (_.x + N.x) / 2, y = f[0].y) : (p = f[0].x, y = (_.y + N.y) / 2);
|
|
3213
3205
|
}
|
|
3214
3206
|
return [[
|
|
3215
3207
|
r,
|
|
@@ -3217,9 +3209,9 @@ function ct({
|
|
|
3217
3209
|
...f,
|
|
3218
3210
|
{ x: d.x + m.x, y: d.y + m.y },
|
|
3219
3211
|
e
|
|
3220
|
-
], p, y, 0, 0,
|
|
3212
|
+
], p, y, 0, 0, C];
|
|
3221
3213
|
}
|
|
3222
|
-
const
|
|
3214
|
+
const Ke = (r) => {
|
|
3223
3215
|
const i = [];
|
|
3224
3216
|
for (let e = 0; e < r.length; e++) {
|
|
3225
3217
|
const t = r[e];
|
|
@@ -3298,33 +3290,33 @@ const et = (r, i, e, t, n, o, s, a) => r === "left" ? "left" : r === "right" ? "
|
|
|
3298
3290
|
return { x: h, y: u };
|
|
3299
3291
|
}
|
|
3300
3292
|
return { x: 0, y: 0 };
|
|
3301
|
-
},
|
|
3302
|
-
const { line: t, fromJunctionPoint: n, toJunctionPoint: o, lineDirection: s, lineShape: a, fx: l, fy: c, fcx: d, fcy: h, f_W: u, f_H: g, tx: f, ty: p, tcx: y, tcy: v, t_W: m, t_H:
|
|
3303
|
-
let O =
|
|
3304
|
-
Math.abs(O) === 1 && Math.abs(
|
|
3293
|
+
}, ko = (r, i = { x: 0, y: 0, rotate: 0 }, e = {}) => {
|
|
3294
|
+
const { line: t, fromJunctionPoint: n, toJunctionPoint: o, lineDirection: s, lineShape: a, fx: l, fy: c, fcx: d, fcy: h, f_W: u, f_H: g, tx: f, ty: p, tcx: y, tcy: v, t_W: m, t_H: C } = r, b = l - d, T = c - h;
|
|
3295
|
+
let O = b > 1 ? 1 : b < -1 ? -1 : 0, _ = T > 1 ? 1 : T < -1 ? -1 : 0;
|
|
3296
|
+
Math.abs(O) === 1 && Math.abs(_) === 1 && (Math.abs(b) > Math.abs(T) ? _ = 0 : O = 0), O === 0 && _ === 0 && (O = 1);
|
|
3305
3297
|
const N = f - y, P = p - v;
|
|
3306
|
-
let M = N > 1 ? 1 : N < -1 ? -1 : 0,
|
|
3307
|
-
Math.abs(M) === 1 && Math.abs(
|
|
3308
|
-
const S = et(n, O,
|
|
3309
|
-
let U = { x: 0, y: 0 },
|
|
3310
|
-
t.ctrlOptionsFor44 && (U = { x: t.ctrlOptionsFor44.cx, y: t.ctrlOptionsFor44.cy },
|
|
3298
|
+
let M = N > 1 ? 1 : N < -1 ? -1 : 0, k = P > 1 ? 1 : P < -1 ? -1 : 0;
|
|
3299
|
+
Math.abs(M) === 1 && Math.abs(k) === 1 && (Math.abs(N) > Math.abs(P) ? k = 0 : M = 0), M === 0 && k === 0 && (O = -1);
|
|
3300
|
+
const S = et(n, O, _, !1, l, c, f, p), L = et(o, M, k, !0, l, c, f, p), A = S, X = L, H = l + (f - l) / 2, $ = c + (p - c) / 2;
|
|
3301
|
+
let U = { x: 0, y: 0 }, K = 20, ie = 20;
|
|
3302
|
+
t.ctrlOptionsFor44 && (U = { x: t.ctrlOptionsFor44.cx, y: t.ctrlOptionsFor44.cy }, K += t.ctrlOptionsFor44.fd, ie += t.ctrlOptionsFor44.td);
|
|
3311
3303
|
const Le = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0, [ve] = ct({
|
|
3312
3304
|
source: { x: l, y: c },
|
|
3313
3305
|
sourcePosition: A,
|
|
3314
3306
|
target: { x: f, y: p },
|
|
3315
|
-
targetPosition:
|
|
3307
|
+
targetPosition: X,
|
|
3316
3308
|
center: {
|
|
3317
3309
|
x: H + U.x,
|
|
3318
3310
|
y: $ + U.y
|
|
3319
3311
|
},
|
|
3320
|
-
sourceOffset:
|
|
3312
|
+
sourceOffset: K,
|
|
3321
3313
|
targetOffset: ie
|
|
3322
|
-
}), me =
|
|
3314
|
+
}), me = Ke(ve), ye = Ht(me, Le), fe = Ne(ye), Ce = Wt(ve);
|
|
3323
3315
|
if (i.x = Ce.x, i.y = Ce.y, s === "v") {
|
|
3324
3316
|
const ce = T > 1 ? 1 : T < -1 ? -1 : 0, J = P > 1 ? 1 : P < -1 ? -1 : 0;
|
|
3325
3317
|
t.placeText === "start" ? (i.x = l, i.y = c + ce * 10) : t.placeText === "end" && (i.x = f, i.y = p + J * 10);
|
|
3326
3318
|
} else {
|
|
3327
|
-
const ce =
|
|
3319
|
+
const ce = b > 1 ? 1 : b < -1 ? -1 : 0, J = N > 1 ? 1 : N < -1 ? -1 : 0;
|
|
3328
3320
|
t.placeText === "start" ? (i.x = l + ce * 10, i.y = c) : t.placeText === "end" && (i.x = f + J * 10, i.y = p);
|
|
3329
3321
|
}
|
|
3330
3322
|
return {
|
|
@@ -3333,17 +3325,17 @@ const et = (r, i, e, t, n, o, s, a) => r === "left" ? "left" : r === "right" ? "
|
|
|
3333
3325
|
textPosition: i,
|
|
3334
3326
|
points: me,
|
|
3335
3327
|
startDirection: A,
|
|
3336
|
-
endDirection:
|
|
3328
|
+
endDirection: X
|
|
3337
3329
|
};
|
|
3338
|
-
},
|
|
3339
|
-
const { line: t, fromJunctionPoint: n, toJunctionPoint: o, lineDirection: s, lineShape: a, fx: l, fy: c, fcx: d, fcy: h, f_W: u, f_H: g, tx: f, ty: p, tcx: y, tcy: v, t_W: m, t_H:
|
|
3340
|
-
let O =
|
|
3341
|
-
Math.abs(O) === 1 && Math.abs(
|
|
3330
|
+
}, Ro = (r, i = { x: 0, y: 0, rotate: 0 }, e = {}) => {
|
|
3331
|
+
const { line: t, fromJunctionPoint: n, toJunctionPoint: o, lineDirection: s, lineShape: a, fx: l, fy: c, fcx: d, fcy: h, f_W: u, f_H: g, tx: f, ty: p, tcx: y, tcy: v, t_W: m, t_H: C } = r, b = l - d, T = c - h;
|
|
3332
|
+
let O = b > 3 ? 1 : b < -3 ? -1 : 0, _ = T > 3 ? 1 : T < -3 ? -1 : 0;
|
|
3333
|
+
Math.abs(O) === 1 && Math.abs(_) === 1 && (Math.abs(b) > Math.abs(T) ? _ = 0 : O = 0), O === 0 && _ === 0 && (O = 1);
|
|
3342
3334
|
const N = f - y, P = p - v;
|
|
3343
|
-
let M = N > 3 ? 1 : N < -3 ? -1 : 0,
|
|
3344
|
-
Math.abs(M) === 1 && Math.abs(
|
|
3345
|
-
let S = et(n, O,
|
|
3346
|
-
const A = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0,
|
|
3335
|
+
let M = N > 3 ? 1 : N < -3 ? -1 : 0, k = P > 3 ? 1 : P < -3 ? -1 : 0;
|
|
3336
|
+
Math.abs(M) === 1 && Math.abs(k) === 1 && (Math.abs(N) > Math.abs(P) ? k = 0 : M = 0), M === 0 && k === 0 && (O = -1);
|
|
3337
|
+
let S = et(n, O, _, !1, l, c, f, p), L = et(o, M, k, !0, l, c, f, p);
|
|
3338
|
+
const A = t.lineRadius !== void 0 ? t.lineRadius : e.lineRadius || 0, X = t.ctrlPointsFor49;
|
|
3347
3339
|
let H = {
|
|
3348
3340
|
x: Math.round(l),
|
|
3349
3341
|
y: Math.round(c)
|
|
@@ -3351,13 +3343,13 @@ const et = (r, i, e, t, n, o, s, a) => r === "left" ? "left" : r === "right" ? "
|
|
|
3351
3343
|
x: Math.round(f),
|
|
3352
3344
|
y: Math.round(p)
|
|
3353
3345
|
}, U = {
|
|
3354
|
-
x: Math.round(
|
|
3355
|
-
y: Math.round(
|
|
3356
|
-
},
|
|
3357
|
-
x: Math.round(
|
|
3358
|
-
y: Math.round(
|
|
3359
|
-
}, ie = [...
|
|
3360
|
-
if (t.isReverse && ([S,
|
|
3346
|
+
x: Math.round(X[0].x),
|
|
3347
|
+
y: Math.round(X[0].y)
|
|
3348
|
+
}, K = {
|
|
3349
|
+
x: Math.round(X[X.length - 1].x),
|
|
3350
|
+
y: Math.round(X[X.length - 1].y)
|
|
3351
|
+
}, ie = [...X];
|
|
3352
|
+
if (t.isReverse && ([S, L] = [L, S]), Math.abs(H.x - U.x) > 3 || Math.abs(H.y - U.y) > 3) {
|
|
3361
3353
|
const fe = H.x + (U.x - H.x) / 2, Ce = H.y + (U.y - H.y) / 2, ce = _t(S), [J] = ct({
|
|
3362
3354
|
source: H,
|
|
3363
3355
|
sourcePosition: S,
|
|
@@ -3367,28 +3359,28 @@ const et = (r, i, e, t, n, o, s, a) => r === "left" ? "left" : r === "right" ? "
|
|
|
3367
3359
|
sourceOffset: 20,
|
|
3368
3360
|
targetOffset: 5
|
|
3369
3361
|
});
|
|
3370
|
-
ie =
|
|
3362
|
+
ie = Ke([...J, ...ie]);
|
|
3371
3363
|
}
|
|
3372
|
-
if (Math.abs($.x -
|
|
3373
|
-
const fe =
|
|
3374
|
-
source:
|
|
3364
|
+
if (Math.abs($.x - K.x) > 3 || Math.abs($.y - K.y) > 3) {
|
|
3365
|
+
const fe = K.x + ($.x - K.x) / 2, Ce = K.y + ($.y - K.y) / 2, ce = _t(L), [J] = ct({
|
|
3366
|
+
source: K,
|
|
3375
3367
|
sourcePosition: ce,
|
|
3376
3368
|
target: $,
|
|
3377
|
-
targetPosition:
|
|
3369
|
+
targetPosition: L,
|
|
3378
3370
|
center: { x: fe, y: Ce },
|
|
3379
3371
|
sourceOffset: 5,
|
|
3380
3372
|
targetOffset: 20
|
|
3381
3373
|
});
|
|
3382
|
-
ie =
|
|
3374
|
+
ie = Ke([...ie, ...J]);
|
|
3383
3375
|
}
|
|
3384
|
-
const Le = ie, ve = Ht(Le, A), me = Ne(ve), ye = Wt(
|
|
3376
|
+
const Le = ie, ve = Ht(Le, A), me = Ne(ve), ye = Wt(X);
|
|
3385
3377
|
return i.x = ye.x, i.y = ye.y, {
|
|
3386
3378
|
pathCommands: [],
|
|
3387
3379
|
pathData: me,
|
|
3388
3380
|
textPosition: i,
|
|
3389
3381
|
points: Le,
|
|
3390
3382
|
startDirection: S,
|
|
3391
|
-
endDirection:
|
|
3383
|
+
endDirection: L
|
|
3392
3384
|
};
|
|
3393
3385
|
}, Mo = (r, i = { x: 0, y: 0, rotate: 0 }) => {
|
|
3394
3386
|
const {
|
|
@@ -3403,37 +3395,37 @@ const et = (r, i, e, t, n, o, s, a) => r === "left" ? "left" : r === "right" ? "
|
|
|
3403
3395
|
tcx: d,
|
|
3404
3396
|
tcy: h
|
|
3405
3397
|
} = r, u = l - n, g = c - o;
|
|
3406
|
-
let f = n - s, p = o - a, y = l - d, v = c - h, { fromJunctionPoint: m, toJunctionPoint:
|
|
3407
|
-
e.isReverse && ([m,
|
|
3408
|
-
const
|
|
3409
|
-
let N = { x: O, y:
|
|
3410
|
-
const P = y / (Math.abs(y) + Math.abs(v)) *
|
|
3411
|
-
let
|
|
3412
|
-
e.ctrlPoints && e.ctrlPoints.length > 0 && (e.isReverse ? (N.x += e.ctrlPoints[1].x, N.y += e.ctrlPoints[1].y,
|
|
3413
|
-
const S = { x: n + N.x, y: o + N.y },
|
|
3398
|
+
let f = n - s, p = o - a, y = l - d, v = c - h, { fromJunctionPoint: m, toJunctionPoint: C } = e;
|
|
3399
|
+
e.isReverse && ([m, C] = [C, m]), (m === Z.left || m === Z.right) && (p = 0), (m === Z.top || m === Z.bottom) && (f = 0), (C === Z.left || C === Z.right) && (v = 0), (C === Z.top || C === Z.bottom) && (y = 0);
|
|
3400
|
+
const b = Math.min(200, Math.max(100, Math.abs(u / 2))), T = Math.min(200, Math.max(100, Math.abs(g / 2))), O = f / (Math.abs(f) + Math.abs(p)) * b, _ = p / (Math.abs(f) + Math.abs(p)) * T;
|
|
3401
|
+
let N = { x: O, y: _ };
|
|
3402
|
+
const P = y / (Math.abs(y) + Math.abs(v)) * b + u, M = v / (Math.abs(y) + Math.abs(v)) * T + g;
|
|
3403
|
+
let k = { x: P, y: M };
|
|
3404
|
+
e.ctrlPoints && e.ctrlPoints.length > 0 && (e.isReverse ? (N.x += e.ctrlPoints[1].x, N.y += e.ctrlPoints[1].y, k.x += e.ctrlPoints[0].x, k.y += e.ctrlPoints[0].y) : (N.x += e.ctrlPoints[0].x, N.y += e.ctrlPoints[0].y, k.x += e.ctrlPoints[1].x, k.y += e.ctrlPoints[1].y));
|
|
3405
|
+
const S = { x: n + N.x, y: o + N.y }, L = { x: n + k.x, y: o + k.y }, A = { x: n + u, y: o + g }, X = [
|
|
3414
3406
|
{ type: "M", x: n, y: o },
|
|
3415
3407
|
{
|
|
3416
3408
|
type: "c",
|
|
3417
3409
|
dx1: N.x,
|
|
3418
3410
|
dy1: N.y,
|
|
3419
|
-
dx2:
|
|
3420
|
-
dy2:
|
|
3411
|
+
dx2: k.x,
|
|
3412
|
+
dy2: k.y,
|
|
3421
3413
|
dx: u,
|
|
3422
3414
|
dy: g
|
|
3423
3415
|
}
|
|
3424
3416
|
];
|
|
3425
|
-
t === 8 &&
|
|
3417
|
+
t === 8 && X.push({ type: "Z" });
|
|
3426
3418
|
const H = Ut(
|
|
3427
3419
|
{ x: n, y: o },
|
|
3428
3420
|
S,
|
|
3429
|
-
|
|
3421
|
+
L,
|
|
3430
3422
|
A,
|
|
3431
3423
|
t < 6 ? 0.8 : 0.5
|
|
3432
3424
|
);
|
|
3433
3425
|
i.x = H.x, i.y = H.y;
|
|
3434
|
-
const $ = Ne(
|
|
3426
|
+
const $ = Ne(X);
|
|
3435
3427
|
return {
|
|
3436
|
-
pathCommands:
|
|
3428
|
+
pathCommands: X,
|
|
3437
3429
|
pathData: $,
|
|
3438
3430
|
textPosition: i,
|
|
3439
3431
|
points: []
|
|
@@ -3460,41 +3452,41 @@ const et = (r, i, e, t, n, o, s, a) => r === "left" ? "left" : r === "right" ? "
|
|
|
3460
3452
|
tcy: y,
|
|
3461
3453
|
t_W: v,
|
|
3462
3454
|
t_H: m
|
|
3463
|
-
} = r,
|
|
3464
|
-
let
|
|
3455
|
+
} = r, C = g - a, b = f - l, T = g > a ? 1 : -1, O = f > l ? 1 : -1, _ = o === "v" ? O : T, N = a - c, P = l - d, M = g - p, k = f - y, S = 1 / (t + 1) * (n + 1);
|
|
3456
|
+
let L = { x: 0, y: 0 }, A = { x: 0, y: 0 };
|
|
3465
3457
|
if (s === j.Curve2)
|
|
3466
|
-
|
|
3458
|
+
L = o === "v" ? { x: 0, y: _ * 30 } : { x: _ * 30, y: 0 }, A = o === "v" ? { x: C * S, y: _ * -10 } : { x: _ * -10, y: b * S };
|
|
3467
3459
|
else if (s === j.Curve3)
|
|
3468
|
-
|
|
3460
|
+
L = o === "v" ? { x: 0, y: b * S } : { x: _ * 30, y: 0 }, A = o === "v" ? { x: 0, y: 0 } : { x: _ * -10, y: b * S };
|
|
3469
3461
|
else if (s === j.Curve5)
|
|
3470
|
-
|
|
3462
|
+
L = { x: 0, y: 0 }, A = o === "v" ? { x: 0, y: b * S } : { x: C * S, y: 0 };
|
|
3471
3463
|
else if (s === j.Curve7 || s === j.Curve8) {
|
|
3472
3464
|
const me = N / (Math.abs(N) + Math.abs(P)) * 30, ye = P / (Math.abs(N) + Math.abs(P)) * 30;
|
|
3473
|
-
|
|
3474
|
-
const fe = M / (Math.abs(M) + Math.abs(
|
|
3465
|
+
L = { x: me, y: ye };
|
|
3466
|
+
const fe = M / (Math.abs(M) + Math.abs(k)) * 30 + C, Ce = k / (Math.abs(M) + Math.abs(k)) * 30 + b;
|
|
3475
3467
|
A = { x: fe, y: Ce };
|
|
3476
3468
|
}
|
|
3477
|
-
const
|
|
3469
|
+
const X = { x: a + L.x, y: l + L.y }, H = { x: a + A.x, y: l + A.y }, $ = { x: a + C, y: l + b }, U = [
|
|
3478
3470
|
{ type: "M", x: a, y: l },
|
|
3479
3471
|
{
|
|
3480
3472
|
type: "c",
|
|
3481
|
-
dx1:
|
|
3482
|
-
dy1:
|
|
3473
|
+
dx1: L.x,
|
|
3474
|
+
dy1: L.y,
|
|
3483
3475
|
dx2: A.x,
|
|
3484
3476
|
dy2: A.y,
|
|
3485
|
-
dx:
|
|
3486
|
-
dy:
|
|
3477
|
+
dx: C,
|
|
3478
|
+
dy: b
|
|
3487
3479
|
}
|
|
3488
3480
|
];
|
|
3489
3481
|
s === 8 && U.push({ type: "Z" });
|
|
3490
|
-
const
|
|
3482
|
+
const K = Ut(
|
|
3491
3483
|
{ x: a, y: l },
|
|
3492
|
-
|
|
3484
|
+
X,
|
|
3493
3485
|
H,
|
|
3494
3486
|
$,
|
|
3495
3487
|
s < 6 ? 0.8 : 0.5
|
|
3496
3488
|
);
|
|
3497
|
-
i.x =
|
|
3489
|
+
i.x = K.x, i.y = K.y;
|
|
3498
3490
|
const ie = Ne(U);
|
|
3499
3491
|
return {
|
|
3500
3492
|
pathCommands: U,
|
|
@@ -3524,7 +3516,7 @@ class Io {
|
|
|
3524
3516
|
});
|
|
3525
3517
|
}
|
|
3526
3518
|
}
|
|
3527
|
-
class
|
|
3519
|
+
class Eo extends Io {
|
|
3528
3520
|
constructor() {
|
|
3529
3521
|
super();
|
|
3530
3522
|
}
|
|
@@ -3617,7 +3609,7 @@ class Do extends Io {
|
|
|
3617
3609
|
return null;
|
|
3618
3610
|
}
|
|
3619
3611
|
}
|
|
3620
|
-
class
|
|
3612
|
+
class Do {
|
|
3621
3613
|
constructor() {
|
|
3622
3614
|
w(this, "map");
|
|
3623
3615
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -3851,7 +3843,7 @@ const yt = (r = {}) => {
|
|
|
3851
3843
|
appendDefaultOptions4Layout: Jt,
|
|
3852
3844
|
default: Ao
|
|
3853
3845
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3854
|
-
class Je extends
|
|
3846
|
+
class Je extends Eo {
|
|
3855
3847
|
constructor() {
|
|
3856
3848
|
super();
|
|
3857
3849
|
w(this, "commits");
|
|
@@ -3892,10 +3884,9 @@ class Je extends Do {
|
|
|
3892
3884
|
this.commits = this.resetCommints(), this.updateViewHook(e);
|
|
3893
3885
|
}
|
|
3894
3886
|
updateOptions(e) {
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
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);
|
|
3887
|
+
if (e.layout, Object.assign(this.options, e), this.isPerformanceMode() && !this.options.showEasyView) {
|
|
3888
|
+
const t = Object.keys(e);
|
|
3889
|
+
t.includes("canvasZoom") && (this.commits.nodesListChanged = !0, this.commits.linesListChanged = !0), t.includes("viewSize") && (this.commits.nodesListChanged = !0, this.commits.linesListChanged = !0), t.includes("canvasOffset") && (this.commits.nodesListChanged = !0, this.commits.linesListChanged = !0);
|
|
3899
3890
|
}
|
|
3900
3891
|
this.commits.optionsChanged = !0;
|
|
3901
3892
|
}
|
|
@@ -4002,7 +3993,7 @@ class Je extends Do {
|
|
|
4002
3993
|
this.commits.connectTargetsListChanged = !0;
|
|
4003
3994
|
}
|
|
4004
3995
|
updateLinks(e = []) {
|
|
4005
|
-
const t = new
|
|
3996
|
+
const t = new Do();
|
|
4006
3997
|
for (const n of this.runtimeDATA4Links) {
|
|
4007
3998
|
const { from: o, to: s } = n.line, a = t.addEdge(o, s);
|
|
4008
3999
|
a !== n.currentLineIndex && (n.currentLineIndex = a, this.commitLine(n.lineId));
|
|
@@ -4223,7 +4214,7 @@ class zo {
|
|
|
4223
4214
|
e !== -1 && this.eventHandlers.splice(e, 1);
|
|
4224
4215
|
}
|
|
4225
4216
|
setEventEmitHook(i) {
|
|
4226
|
-
this._emitHook = i
|
|
4217
|
+
this._emitHook = i;
|
|
4227
4218
|
}
|
|
4228
4219
|
emitEvent(i, ...e) {
|
|
4229
4220
|
let { result: t, handled: n } = this.defaultEventHandler(i, ...e);
|
|
@@ -4381,7 +4372,7 @@ class zo {
|
|
|
4381
4372
|
Object.assign(this.listeners, i);
|
|
4382
4373
|
}
|
|
4383
4374
|
}
|
|
4384
|
-
class
|
|
4375
|
+
class Bo extends zo {
|
|
4385
4376
|
constructor() {
|
|
4386
4377
|
super(...arguments);
|
|
4387
4378
|
w(this, "$dom");
|
|
@@ -4471,20 +4462,20 @@ class Xo extends zo {
|
|
|
4471
4462
|
throw new Error("Please use isLine");
|
|
4472
4463
|
}
|
|
4473
4464
|
}
|
|
4474
|
-
class
|
|
4465
|
+
class Xo extends Je {
|
|
4475
4466
|
constructor(e, t, n, o) {
|
|
4476
4467
|
super();
|
|
4477
4468
|
w(this, "dataStores");
|
|
4478
4469
|
this.dataStores = e;
|
|
4479
4470
|
const s = Object.assign({}, this.options, n);
|
|
4480
4471
|
this.options = n, Object.assign(this.options, s), this.graphData = t, this.runtimeDATA4Links = o.runtimeDATA4Links, this.runtimeDATA4ShouldRenderItems = o.runtimeDATA4ShouldRenderItems, this.runtimeDATA4ConnectTargets = o.runtimeDATA4ConnectTargets, this.runtimeDATA4NodeMap = o.runtimeDATA4NodeMap, this.runtimeDATA4LinkMap = o.runtimeDATA4LinkMap, this.runtimeDATA4ElLineTargets = o.runtimeDATA4ElLineTargets, this.updateViewHook = (a) => {
|
|
4481
|
-
if (
|
|
4472
|
+
if (a.optionsChanged && this.dataStores.store4Options.set(this.getOptions()), a.nodesListChanged && this.dataStores.store4ShouldRenderNodes.set(this.getShouldRenderNodes()), a.linesListChanged) {
|
|
4482
4473
|
const l = this.getShouldRenderLines();
|
|
4483
|
-
this.dataStores.store4ShouldRenderLines.set(l)
|
|
4474
|
+
this.dataStores.store4ShouldRenderLines.set(l);
|
|
4484
4475
|
}
|
|
4485
4476
|
if (a.fakeLinesListChanged) {
|
|
4486
4477
|
const l = this.getShouldRenderFakeLines();
|
|
4487
|
-
this.dataStores.store4ShouldRenderFakeLines.set(l)
|
|
4478
|
+
this.dataStores.store4ShouldRenderFakeLines.set(l);
|
|
4488
4479
|
}
|
|
4489
4480
|
};
|
|
4490
4481
|
}
|
|
@@ -4501,7 +4492,7 @@ class Go extends Je {
|
|
|
4501
4492
|
super();
|
|
4502
4493
|
w(this, "dataStores");
|
|
4503
4494
|
this.dataStores = e, this.updateViewHook = (n) => {
|
|
4504
|
-
n.optionsChanged && this.dataStores.store4Options.set(this.getOptions()), (n.nodesListChanged || n.changedNodes.length > 0) &&
|
|
4495
|
+
n.optionsChanged && this.dataStores.store4Options.set(this.getOptions()), (n.nodesListChanged || n.changedNodes.length > 0) && this.dataStores.store4ShouldRenderNodes.set(this.getShouldRenderNodes()), (n.nodesListChanged || n.linesListChanged || n.changedLines.length > 0) && this.dataStores.store4ShouldRenderLines.set(this.getShouldRenderLines()), (n.fakeLinesListChanged || n.changedFakeLines.length > 0) && this.dataStores.store4ShouldRenderFakeLines.set([...this.getShouldRenderFakeLines()]);
|
|
4505
4496
|
};
|
|
4506
4497
|
}
|
|
4507
4498
|
}
|
|
@@ -4520,7 +4511,7 @@ class $o extends Je {
|
|
|
4520
4511
|
};
|
|
4521
4512
|
}
|
|
4522
4513
|
}
|
|
4523
|
-
class Yo extends
|
|
4514
|
+
class Yo extends Bo {
|
|
4524
4515
|
constructor() {
|
|
4525
4516
|
super();
|
|
4526
4517
|
w(this, "_initRawPropertyFn", (e, t, n) => {
|
|
@@ -4535,7 +4526,7 @@ class Yo extends Xo {
|
|
|
4535
4526
|
};
|
|
4536
4527
|
}
|
|
4537
4528
|
setReactiveData4Vue3(e, t, n, o, s) {
|
|
4538
|
-
this.useReactiveDataToAutoUpdateView = !0, this.dataProvider = new
|
|
4529
|
+
this.useReactiveDataToAutoUpdateView = !0, this.dataProvider = new Xo(e, t, n, o), this._initRawPropertyFn = s, this.options = this.dataProvider.getOptions(), this.dataStores = {
|
|
4539
4530
|
optionsStore: e.store4Options,
|
|
4540
4531
|
shouldRenderNodesStore: e.store4ShouldRenderNodes,
|
|
4541
4532
|
shouldRenderLinesStore: e.store4ShouldRenderLines,
|
|
@@ -4546,7 +4537,7 @@ class Yo extends Xo {
|
|
|
4546
4537
|
shouldRenderFakeLinesRef: e.shouldRenderFakeLinesRef,
|
|
4547
4538
|
textContainer4NormalRef: e.textContainer4NormalRef,
|
|
4548
4539
|
textContainer4FakeLineRef: e.textContainer4FakeLineRef
|
|
4549
|
-
}
|
|
4540
|
+
};
|
|
4550
4541
|
}
|
|
4551
4542
|
setReactiveData4React(e, t) {
|
|
4552
4543
|
this.dataProvider = new $o(e, t), this.options = this.dataProvider.getOptions(), this.dataStores = {
|
|
@@ -4562,7 +4553,7 @@ class Yo extends Xo {
|
|
|
4562
4553
|
shouldRenderNodesStore: e.store4ShouldRenderNodes,
|
|
4563
4554
|
shouldRenderLinesStore: e.store4ShouldRenderLines,
|
|
4564
4555
|
shouldRenderFakeLinesStore: e.store4ShouldRenderFakeLines
|
|
4565
|
-
}
|
|
4556
|
+
};
|
|
4566
4557
|
}
|
|
4567
4558
|
generateNewNodeId(e = 5) {
|
|
4568
4559
|
const t = ft(e);
|
|
@@ -4896,7 +4887,7 @@ class Uo extends Wo {
|
|
|
4896
4887
|
addElementLines(e) {
|
|
4897
4888
|
x("addElementLines:", e), e.forEach((t) => {
|
|
4898
4889
|
t.fromType = z.HTMLElementId, t.toType = z.HTMLElementId, t.isFakeLine = !0, t.id || (t.id = this.generateNewUUID(6)), t.forDisplayOnly = !0;
|
|
4899
|
-
}), this.addFakeLines(e),
|
|
4890
|
+
}), this.addFakeLines(e), this.updateElementLines();
|
|
4900
4891
|
}
|
|
4901
4892
|
updateNodeOffsetSize(e, t, n) {
|
|
4902
4893
|
const o = this.getNodeById(e);
|
|
@@ -5043,7 +5034,6 @@ class Jo extends Uo {
|
|
|
5043
5034
|
updateConnectTargetsOnCanvas(e, t) {
|
|
5044
5035
|
if (!t)
|
|
5045
5036
|
return;
|
|
5046
|
-
console.warn(`updateConnectTargetsOnCanvas:[${e}]:`);
|
|
5047
5037
|
const n = t.classList.contains("rg-canvas-slot-above") ? "above" : "behind", o = this.canvasConnectTargetsMap.get(n);
|
|
5048
5038
|
o && o.length > 0 && this.updateConnectTargetList(e, t, o);
|
|
5049
5039
|
}
|
|
@@ -5081,28 +5071,26 @@ class Jo extends Uo {
|
|
|
5081
5071
|
}, Math.min(this._connectTargetUpdateRequestedSet.size + 10, 50));
|
|
5082
5072
|
}
|
|
5083
5073
|
_updateAllRequestedConnectTargetOffsets() {
|
|
5084
|
-
let e = 0
|
|
5085
|
-
for (const
|
|
5086
|
-
const { by:
|
|
5087
|
-
if (this.dataProvider.isPerformanceMode() &&
|
|
5088
|
-
const
|
|
5089
|
-
if (!
|
|
5090
|
-
t++;
|
|
5074
|
+
let e = 0;
|
|
5075
|
+
for (const t of this._connectTargetUpdateRequestedSet.values()) {
|
|
5076
|
+
const { by: n, connectTargetEl: o, relativeEl: s, connectTarget: a } = t;
|
|
5077
|
+
if (this.dataProvider.isPerformanceMode() && a.nodeId) {
|
|
5078
|
+
const h = this.getNodeById(a.nodeId);
|
|
5079
|
+
if (!h || !h.rgShouldRender || !h.rgCalcedVisibility)
|
|
5091
5080
|
continue;
|
|
5092
|
-
}
|
|
5093
5081
|
}
|
|
5094
|
-
if (!this.dataProvider.getConnectTargetById(
|
|
5082
|
+
if (!this.dataProvider.getConnectTargetById(a.targetId))
|
|
5095
5083
|
continue;
|
|
5096
|
-
const
|
|
5097
|
-
this._updateConnectTargetOffset(
|
|
5084
|
+
const c = this.dataProvider.getCanvasScale();
|
|
5085
|
+
this._updateConnectTargetOffset(n, a, o, s, c) ? e++ : t.stableTimes++, t.stableTimes > 2 && this._connectTargetUpdateRequestedSet.delete(a.targetId);
|
|
5098
5086
|
}
|
|
5099
|
-
e > 0 ? (
|
|
5087
|
+
e > 0 ? (clearTimeout(this._updateTimer), this._updateTimer = setTimeout(() => {
|
|
5100
5088
|
this._updateAllRequestedConnectTargetOffsets();
|
|
5101
|
-
}, Math.min(e / 2 + 10, 100)), this._dataUpdated()) : (
|
|
5089
|
+
}, Math.min(e / 2 + 10, 100)), this._dataUpdated()) : (this._connectTargetUpdateRequestedSet.clear(), this._dataUpdated());
|
|
5102
5090
|
}
|
|
5103
5091
|
_updateConnectTargetOffset(e, t, n, o, s) {
|
|
5104
|
-
const a = o.getBoundingClientRect(), l = n.getBoundingClientRect(), c = Math.round(l.x - a.x), d = Math.round(l.y - a.y), h = this.dataProvider.getCanvasScale(), u = Math.round(c / h), g = Math.round(d / h), f = Math.round(l.width / h), p = Math.round(l.height / h), y = t.offsetX !== u, v = t.offsetY !== g, m = f !== 0 && t.width !== f,
|
|
5105
|
-
return y || v || m ||
|
|
5092
|
+
const a = o.getBoundingClientRect(), l = n.getBoundingClientRect(), c = Math.round(l.x - a.x), d = Math.round(l.y - a.y), h = this.dataProvider.getCanvasScale(), u = Math.round(c / h), g = Math.round(d / h), f = Math.round(l.width / h), p = Math.round(l.height / h), y = t.offsetX !== u, v = t.offsetY !== g, m = f !== 0 && t.width !== f, C = p !== 0 && t.height !== p;
|
|
5093
|
+
return y || v || m || C ? (this.dataProvider.updateConnectTarget(t.targetId, {
|
|
5106
5094
|
offsetX: u,
|
|
5107
5095
|
offsetY: g,
|
|
5108
5096
|
width: f,
|
|
@@ -5425,7 +5413,7 @@ class Zo extends qo {
|
|
|
5425
5413
|
};
|
|
5426
5414
|
}
|
|
5427
5415
|
}
|
|
5428
|
-
const
|
|
5416
|
+
const Qo = (r) => {
|
|
5429
5417
|
const i = Math.sin(r) * 1e4;
|
|
5430
5418
|
return i - Math.floor(i);
|
|
5431
5419
|
}, bt = (r, i, e, t, n, o) => {
|
|
@@ -5434,8 +5422,8 @@ const Ko = (r) => {
|
|
|
5434
5422
|
for (let y = 1; y <= d; y++) {
|
|
5435
5423
|
let v = r + a * y / d, m = i + l * y / d;
|
|
5436
5424
|
if (y < d) {
|
|
5437
|
-
const
|
|
5438
|
-
v += h *
|
|
5425
|
+
const C = Qo(n + y) - 0.5;
|
|
5426
|
+
v += h * C * o, m += u * C * o;
|
|
5439
5427
|
}
|
|
5440
5428
|
g.push({
|
|
5441
5429
|
type: "l",
|
|
@@ -5444,7 +5432,7 @@ const Ko = (r) => {
|
|
|
5444
5432
|
}), f = v, p = m;
|
|
5445
5433
|
}
|
|
5446
5434
|
return g;
|
|
5447
|
-
},
|
|
5435
|
+
}, Ko = (r, i = { x: 0, y: 0, rotate: 0 }) => {
|
|
5448
5436
|
const { fx: e, fy: t, tx: n, ty: o } = r;
|
|
5449
5437
|
i.rotate = se.getTextAngle(e, t, n, o), i.x = e + (n - e) / 2, i.y = t + (o - t) / 2, Number.isNaN(i.rotate) && (i.rotate = 0);
|
|
5450
5438
|
const s = e + t + n + o, a = bt(e, t, n, o, s, 2.5), l = bt(e, t, n, o, s + 99, 1.5), c = `${Ne(a)} ${Ne(l)}`;
|
|
@@ -5548,7 +5536,7 @@ class ei extends Zo {
|
|
|
5548
5536
|
throw this.throwLineError("D", 10, 10);
|
|
5549
5537
|
if (c === 0 && h === 0 && d === 0 && u === 0)
|
|
5550
5538
|
throw this.throwLineError("D", 10, 10);
|
|
5551
|
-
const v = h - c + (u - d) > 0, m = i.isReverse ? t : e,
|
|
5539
|
+
const v = h - c + (u - d) > 0, m = i.isReverse ? t : e, C = i.isReverse ? e : t, b = $e(m.nodeShape, s.defaultNodeShape), T = i.junctionOffset || s.defaultLineJunctionOffset || 0;
|
|
5552
5540
|
c -= T, d -= T, h -= T, u -= T, g += T * 2, f += T * 2, p += T * 2, y += T * 2;
|
|
5553
5541
|
const O = {
|
|
5554
5542
|
from_x: c,
|
|
@@ -5559,13 +5547,13 @@ class ei extends Zo {
|
|
|
5559
5547
|
f_H: f,
|
|
5560
5548
|
t_W: p,
|
|
5561
5549
|
t_H: y,
|
|
5562
|
-
nodeShape:
|
|
5550
|
+
nodeShape: b,
|
|
5563
5551
|
isReverse: v,
|
|
5564
5552
|
isEndPoint: !1,
|
|
5565
5553
|
totalLinesBetweenNodes: n,
|
|
5566
5554
|
currentLineIndex: o,
|
|
5567
5555
|
lineDistance: s.multiLineDistance || 30
|
|
5568
|
-
},
|
|
5556
|
+
}, _ = $e(C.nodeShape, s.defaultNodeShape), N = {
|
|
5569
5557
|
from_x: h,
|
|
5570
5558
|
from_y: u,
|
|
5571
5559
|
to_x: c,
|
|
@@ -5574,22 +5562,22 @@ class ei extends Zo {
|
|
|
5574
5562
|
f_H: y,
|
|
5575
5563
|
t_W: g,
|
|
5576
5564
|
t_H: f,
|
|
5577
|
-
nodeShape:
|
|
5565
|
+
nodeShape: _,
|
|
5578
5566
|
isReverse: v,
|
|
5579
5567
|
isEndPoint: !0,
|
|
5580
5568
|
totalLinesBetweenNodes: n,
|
|
5581
5569
|
currentLineIndex: o,
|
|
5582
5570
|
lineDistance: s.multiLineDistance || 50
|
|
5583
5571
|
}, P = s.defaultJunctionPoint || Z.border;
|
|
5584
|
-
let M = i.fromJunctionPoint || P,
|
|
5585
|
-
i.isReverse && ([M,
|
|
5572
|
+
let M = i.fromJunctionPoint || P, k = i.toJunctionPoint || P, S = i.fromJunctionPointOffsetX || 0, L = i.fromJunctionPointOffsetY || 0, A = i.toJunctionPointOffsetX || 0, X = i.toJunctionPointOffsetY || 0;
|
|
5573
|
+
i.isReverse && ([M, k] = [k, M], [S, L, A, X] = [A, X, S, L]), (e === t || c === 0 && h === 0 && d === 0 && u === 0) && S === 0 && L === 0 && A === 0 && X === 0 && ((a === j.StandardStraight || a === j.Curve2 || a === j.Curve3 || a === j.SimpleOrthogonal || a === j.Curve5) && (a = j.StandardCurve), X = 20);
|
|
5586
5574
|
const H = this._getJunctionPoint(M, O);
|
|
5587
|
-
H.x += S, H.y +=
|
|
5588
|
-
const $ = this._getJunctionPoint(
|
|
5589
|
-
if ($.x += A, $.y +=
|
|
5575
|
+
H.x += S, H.y += L;
|
|
5576
|
+
const $ = this._getJunctionPoint(k, N);
|
|
5577
|
+
if ($.x += A, $.y += X, !H || !$)
|
|
5590
5578
|
throw this.throwLineError("E", -20, -20);
|
|
5591
|
-
const U = c + g / 2,
|
|
5592
|
-
M === "horizontalLine" ? (H.x = $.x, (a === 44 || a === 49) && (H.x += ($.x > ie ? 1 : -1) * 30)) : M === "verticalLine" && (H.y = $.y, (a === 44 || a === 49) && (H.y += ($.y > Le ? 1 : -1) * 30)),
|
|
5579
|
+
const U = c + g / 2, K = d + f / 2, ie = h + p / 2, Le = u + y / 2;
|
|
5580
|
+
M === "horizontalLine" ? (H.x = $.x, (a === 44 || a === 49) && (H.x += ($.x > ie ? 1 : -1) * 30)) : M === "verticalLine" && (H.y = $.y, (a === 44 || a === 49) && (H.y += ($.y > Le ? 1 : -1) * 30)), k === "horizontalLine" ? ($.x = H.x, (a === 44 || a === 49) && ($.x += (H.x > U ? 1 : -1) * 30)) : k === "verticalLine" && ($.y = H.y, (a === 44 || a === 49) && ($.y += (H.y > K ? 1 : -1) * 30));
|
|
5593
5581
|
const ve = H.x, me = H.y, ye = $.x, fe = $.y;
|
|
5594
5582
|
if (Number.isNaN(ve) || Number.isNaN(me))
|
|
5595
5583
|
throw x("error start point:", e.text), this.throwLineError("F", -10, 0);
|
|
@@ -5603,11 +5591,11 @@ class ei extends Zo {
|
|
|
5603
5591
|
lineShape: a,
|
|
5604
5592
|
lineRadius: s.lineRadius || 0,
|
|
5605
5593
|
fromJunctionPoint: M,
|
|
5606
|
-
toJunctionPoint:
|
|
5594
|
+
toJunctionPoint: k,
|
|
5607
5595
|
fx: ve,
|
|
5608
5596
|
fy: me,
|
|
5609
5597
|
fcx: U,
|
|
5610
|
-
fcy:
|
|
5598
|
+
fcy: K,
|
|
5611
5599
|
f_W: g,
|
|
5612
5600
|
f_H: f,
|
|
5613
5601
|
tx: ye,
|
|
@@ -5621,7 +5609,7 @@ class ei extends Zo {
|
|
|
5621
5609
|
createLinePathData(i) {
|
|
5622
5610
|
const { lineShape: e } = i;
|
|
5623
5611
|
let t;
|
|
5624
|
-
return e === j.SimpleOrthogonal ? t = Oo(i, void 0, this._getLineDefaultOptions()) : e === j.StandardOrthogonal ? t =
|
|
5612
|
+
return e === j.SimpleOrthogonal ? t = Oo(i, void 0, this._getLineDefaultOptions()) : e === j.StandardOrthogonal ? t = ko(i, void 0, this._getLineDefaultOptions()) : e === j.HardOrthogonal ? t = Ro(i, void 0, this._getLineDefaultOptions()) : e === j.StandardCurve ? t = Mo(i) : e === j.Curve2 || e === j.Curve3 || e === j.Curve5 || e === j.Curve7 ? t = So(i) : e === j.Curve8 ? t = Ko(i) : t = No(i), t;
|
|
5625
5613
|
}
|
|
5626
5614
|
getArrowMarkerId(i, e = !1) {
|
|
5627
5615
|
let t = i.showStartArrow === !0, n = i.showEndArrow !== !1;
|
|
@@ -5758,7 +5746,7 @@ class ni extends ti {
|
|
|
5758
5746
|
canvasOpacity: 0.01
|
|
5759
5747
|
}), this._dataUpdated();
|
|
5760
5748
|
const e = this.getOptions(), t = this.getNodesRectBox(), n = t.height, o = t.width, s = e.viewSize.width - i * 2, a = t.minX + t.width / 2, l = t.minY + t.height / 2;
|
|
5761
|
-
|
|
5749
|
+
this.dataProvider.setCanvasCenter(a, l);
|
|
5762
5750
|
const c = Math.min(1, s / o), d = n * c + i * 2;
|
|
5763
5751
|
this.dataProvider.updateOptions({
|
|
5764
5752
|
viewSize: {
|
|
@@ -5834,12 +5822,12 @@ class oi extends Te {
|
|
|
5834
5822
|
w(this, "layoutOptions");
|
|
5835
5823
|
this.layoutOptions = e, x("new RGTreeLayout:", this.layoutOptions), this.layoutOptions.from || (this.layoutOptions.from = "left"), this.layoutOptions.levelGaps || (this.layoutOptions.levelGaps = []);
|
|
5836
5824
|
const o = this.layoutOptions.from;
|
|
5837
|
-
|
|
5825
|
+
o === "top" || o === "bottom" ? (this.layoutOptions.treeNodeGapH || (this.layoutOptions.treeNodeGapH = 10), this.layoutOptions.treeNodeGapV || (this.layoutOptions.treeNodeGapV = 50)) : (this.layoutOptions.treeNodeGapH || (this.layoutOptions.treeNodeGapH = 50), this.layoutOptions.treeNodeGapV || (this.layoutOptions.treeNodeGapV = 10)), o === "top" ? (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "center"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "start"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.layoutOptions.alignItemsX), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.getReverseAlignItems(this.layoutOptions.alignItemsY))) : (this.layoutOptions.alignItemsX || (this.layoutOptions.alignItemsX = "start"), this.layoutOptions.alignItemsY || (this.layoutOptions.alignItemsY = "start"), this.layoutOptions.alignParentItemsX || (this.layoutOptions.alignParentItemsX = this.getReverseAlignItems(this.layoutOptions.alignItemsX)), this.layoutOptions.alignParentItemsY || (this.layoutOptions.alignParentItemsY = this.layoutOptions.alignItemsY)), this.layoutOptions.ignoreNodeSize === void 0 && (this.layoutOptions.ignoreNodeSize = !1);
|
|
5838
5826
|
const s = this.layoutOptions.layoutExpansionDirection, a = s === "start" || s === "left" || s === "top" ? "start" : s === "end" || s === "right" || s === "bottom" ? "end" : "center";
|
|
5839
5827
|
this.layoutOptions.layoutExpansionDirection = a, this.layoutOptions.treeNodeGapH < 100 && (this.layoutOptions.treeNodeGapH = 100), this.layoutOptions.treeNodeGapV < 10 && (this.layoutOptions.treeNodeGapV = 10), (this.layoutOptions.from === "bottom" || this.layoutOptions.from === "right") && (this.rotate = 180), this.layoutOptions.changeNodeSizeDuringLayout === void 0 && (this.layoutOptions.changeNodeSizeDuringLayout = !1);
|
|
5840
5828
|
}
|
|
5841
5829
|
placeNodes(e, t) {
|
|
5842
|
-
if (
|
|
5830
|
+
if (x("RGTreeLayout:placeNodes"), t)
|
|
5843
5831
|
x("layout by root:", t);
|
|
5844
5832
|
else {
|
|
5845
5833
|
console.error("root is null");
|
|
@@ -5847,20 +5835,18 @@ class oi extends Te {
|
|
|
5847
5835
|
}
|
|
5848
5836
|
x("allNodes:", e.length), this.layoutOptions.alignItemsX, this.layoutOptions.alignItemsY, this.layoutOptions.alignParentItemsX, this.layoutOptions.alignParentItemsY, this.rootNode = t, this.allNodes = e, t.fixed || this.layoutOptions.fixedRootNode || this.updateNodePosition(t, 0, 0), t.lot.x = t.x, t.lot.y = t.y;
|
|
5849
5837
|
const n = e;
|
|
5850
|
-
x("groupNodes:2:", n.length, n.map((
|
|
5851
|
-
const o =
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
this.
|
|
5857
|
-
const l = this.layoutOptions.from === "right" ? F.getNodeXByLotX({ alignItemsX: "end" }, a) : a.lot.x, c = this.layoutOptions.from === "bottom" ? F.getNodeYByLotY({ alignItemsY: "end" }, a) : a.lot.y;
|
|
5858
|
-
this.updateNodePosition(a, l, c);
|
|
5838
|
+
x("groupNodes:2:", n.length, n.map((s) => s.text).join(",")), this.rotate, this.networkAnalyzer.analyzeNetwork(n, this.rootNode, !1), this.placeNodesPosition(t, n);
|
|
5839
|
+
const o = { x: t.x, y: t.y };
|
|
5840
|
+
this.allNodes.forEach((s) => {
|
|
5841
|
+
if (s.fixed !== !0 && !!F.isVisibleNode(s) && (Number.isNaN(s.lot.x) && (x("bad lot x:", s.text, s.lot.x), s.lot.x = 0), Number.isNaN(s.lot.y) && (x("bad lot y:", s.text, s.lot.y), s.lot.y = 0), s !== t)) {
|
|
5842
|
+
this.layoutOptions.from === "right" && (s.lot.x = se.getFlippedX(s.lot.x, o.x)), this.layoutOptions.from === "bottom" && (s.lot.y = se.getFlippedY(s.lot.y, o.y));
|
|
5843
|
+
const a = this.layoutOptions.from === "right" ? F.getNodeXByLotX({ alignItemsX: "end" }, s) : s.lot.x, l = this.layoutOptions.from === "bottom" ? F.getNodeYByLotY({ alignItemsY: "end" }, s) : s.lot.y;
|
|
5844
|
+
this.updateNodePosition(s, a, l);
|
|
5859
5845
|
}
|
|
5860
5846
|
});
|
|
5861
|
-
for (const
|
|
5862
|
-
this.graphInstance.updateNode(
|
|
5863
|
-
rgChildrenSize:
|
|
5847
|
+
for (const s of this.allNodes)
|
|
5848
|
+
this.graphInstance.updateNode(s, {
|
|
5849
|
+
rgChildrenSize: s.lot.childs.length
|
|
5864
5850
|
});
|
|
5865
5851
|
x("create rootNode coordinates:1", t.x, t.y), this.layoutEnd();
|
|
5866
5852
|
}
|
|
@@ -5876,7 +5862,7 @@ class oi extends Te {
|
|
|
5876
5862
|
let a = e.lot.x - e.x, l = e.lot.y - e.y;
|
|
5877
5863
|
this.layoutOptions.from === "right" && (a += e.lot.width), this.layoutOptions.from === "bottom" && (l += e.lot.height), n.forEach((c) => {
|
|
5878
5864
|
c.fixed !== !0 && (c.lot.x -= a, c.lot.y -= l);
|
|
5879
|
-
})
|
|
5865
|
+
});
|
|
5880
5866
|
}
|
|
5881
5867
|
buildNetwork(e, t, n) {
|
|
5882
5868
|
n === 0 && t.push(...e);
|
|
@@ -5895,7 +5881,6 @@ class oi extends Te {
|
|
|
5895
5881
|
reduceNodeRect(e, t, n = !1) {
|
|
5896
5882
|
let o = this.layoutOptions.treeNodeGapH, s = this.layoutOptions.treeNodeGapV;
|
|
5897
5883
|
const a = o, l = s, c = e.filter((d) => d.lot.level === t);
|
|
5898
|
-
console.log("reduceNodeRect:level:", t, c.length);
|
|
5899
5884
|
for (const d of c) {
|
|
5900
5885
|
if (!F.isVisibleNode(d))
|
|
5901
5886
|
continue;
|
|
@@ -5926,7 +5911,6 @@ class oi extends Te {
|
|
|
5926
5911
|
const n = this.layoutOptions.treeNodeGapH, o = this.layoutOptions.treeNodeGapV, s = n, a = o;
|
|
5927
5912
|
let l = 0;
|
|
5928
5913
|
const c = e.filter((d) => d.lot.level === t);
|
|
5929
|
-
console.log("placeNodeChildren:level:", t, c.length);
|
|
5930
5914
|
for (const d of c) {
|
|
5931
5915
|
l++;
|
|
5932
5916
|
let h = d.lot.width;
|
|
@@ -5956,7 +5940,6 @@ class oi extends Te {
|
|
|
5956
5940
|
const n = this.layoutOptions.treeNodeGapH, o = this.layoutOptions.treeNodeGapV, s = n, a = o;
|
|
5957
5941
|
let l = 0;
|
|
5958
5942
|
const c = e.filter((d) => d.lot.level === t);
|
|
5959
|
-
console.log("placeNodeChildren:level:", t, c.length);
|
|
5960
5943
|
for (const d of c) {
|
|
5961
5944
|
l++;
|
|
5962
5945
|
let h = d.lot.height;
|
|
@@ -6154,7 +6137,7 @@ class si extends ni {
|
|
|
6154
6137
|
const n = this.getOptions();
|
|
6155
6138
|
Jt(e);
|
|
6156
6139
|
let o = null;
|
|
6157
|
-
if (e.layoutName === "tree" ? o = new
|
|
6140
|
+
if (e.layoutName === "tree" ? o = new Xt(e, n, this) : e.layoutName === "center" ? o = new Ft(e, n, this) : e.layoutName === "circle" ? o = new Gt(e, n, this) : e.layoutName === "force" ? o = new Ue(e, n, this) : e.layoutName === "fixed" ? o = new $t(e, n, this) : e.layoutName === "smart-tree" ? o = new wo(e, n, this) : e.layoutName === "io-tree" ? o = new ii(e, n, this) : e.layoutName === "folder" && (o = new Yt(e, n, this)), !o)
|
|
6158
6141
|
throw new Error("unknown layout: " + e.layoutName);
|
|
6159
6142
|
return x("########supportAutoLayout:", o.autoLayout !== void 0, e.disableAsForceLayout), this.setLayoutor(o, t, o.autoLayout !== void 0 && e.disableAsForceLayout !== !0), o;
|
|
6160
6143
|
}
|
|
@@ -6252,9 +6235,9 @@ class di extends si {
|
|
|
6252
6235
|
if (!h || s)
|
|
6253
6236
|
return;
|
|
6254
6237
|
const f = this.getViewXyByEvent(h), p = this.getCanvasXyByViewXy(f), y = p.x - l.x, v = p.y - l.y;
|
|
6255
|
-
let m = y + c.x,
|
|
6256
|
-
const O = this.emitEvent(V.onNodeDragging, e, m,
|
|
6257
|
-
O && (typeof O.x == "number" && (m = O.x,
|
|
6238
|
+
let m = y + c.x, C = v + c.y, b = m - c.x, T = C - c.y;
|
|
6239
|
+
const O = this.emitEvent(V.onNodeDragging, e, m, C, b, T, h);
|
|
6240
|
+
O && (typeof O.x == "number" && (m = O.x, b = m - c.x), typeof O.y == "number" && (C = O.y, T = C - c.y)), this.canvasAutoMoving(f), this.draggingSelectedNodes(e, m, C, b, T), this._dataUpdated();
|
|
6258
6241
|
}, g = () => {
|
|
6259
6242
|
u(), this._canvasMovingTimer = requestAnimationFrame(g);
|
|
6260
6243
|
};
|
|
@@ -6348,7 +6331,7 @@ class di extends si {
|
|
|
6348
6331
|
};
|
|
6349
6332
|
const a = this.getViewBoundingClientRect();
|
|
6350
6333
|
x("[CreatingNodePlot]startCreatingNodePlot:");
|
|
6351
|
-
const l =
|
|
6334
|
+
const l = Be(e), c = l.clientX - a.x + 10, d = l.clientY - a.y + 10;
|
|
6352
6335
|
o || s(c, d);
|
|
6353
6336
|
const h = (f) => {
|
|
6354
6337
|
x("[CreatingNodePlot]objectTemplateMove");
|
|
@@ -6366,16 +6349,16 @@ class di extends si {
|
|
|
6366
6349
|
x("[CreatingNodePlot]action be abort!");
|
|
6367
6350
|
return;
|
|
6368
6351
|
}
|
|
6369
|
-
const y =
|
|
6352
|
+
const y = Be(f), v = y.clientX - a.x + 10, m = y.clientY - a.y + 10;
|
|
6370
6353
|
if (Math.abs(c - v) < 30 && Math.abs(d - m) < 30) {
|
|
6371
6354
|
x("[CreatingNodePlot]create node be abort!");
|
|
6372
6355
|
return;
|
|
6373
6356
|
}
|
|
6374
|
-
const
|
|
6357
|
+
const C = this.getCanvasXyByClientXy({
|
|
6375
6358
|
x: y.clientX,
|
|
6376
6359
|
y: y.clientY
|
|
6377
6360
|
});
|
|
6378
|
-
x("[CreatingNodePlot]objectBePlaced:",
|
|
6361
|
+
x("[CreatingNodePlot]objectBePlaced:", C), t.onCreateNode(C.x, C.y, this.getOptions().newNodeTemplate), this._dataUpdated();
|
|
6379
6362
|
};
|
|
6380
6363
|
setTimeout(() => {
|
|
6381
6364
|
this.$dom.addEventListener("click", g), this.$dom.addEventListener("contextmenu", u);
|
|
@@ -6464,28 +6447,28 @@ class di extends si {
|
|
|
6464
6447
|
x("[CreatingLinePlot]content point:", h.dataset.point);
|
|
6465
6448
|
let g = h.dataset.point || "border";
|
|
6466
6449
|
if (h.classList.contains("rg-connect-target")) {
|
|
6467
|
-
const { width: f, height: p, x: y, y: v } = h.getBoundingClientRect(), m = this.getCanvasXyByClientXy({ x: y, y: v }),
|
|
6450
|
+
const { width: f, height: p, x: y, y: v } = h.getBoundingClientRect(), m = this.getCanvasXyByClientXy({ x: y, y: v }), C = this.dataProvider.getCanvasScale(), b = {
|
|
6468
6451
|
x: m.x,
|
|
6469
6452
|
y: m.y,
|
|
6470
|
-
el_W: f /
|
|
6471
|
-
el_H: p /
|
|
6453
|
+
el_W: f / C,
|
|
6454
|
+
el_H: p / C,
|
|
6472
6455
|
nodeShape: 1,
|
|
6473
6456
|
id: h.dataset.targetId,
|
|
6474
6457
|
targetData: JSON.parse(h.dataset.targetData || "{}"),
|
|
6475
6458
|
targetType: h.dataset.targetType
|
|
6476
6459
|
};
|
|
6477
|
-
c = !0, d.x =
|
|
6460
|
+
c = !0, d.x = b.x, d.y = b.y, d.el_W = b.el_W, d.el_H = b.el_H, d.nodeShape = b.nodeShape, this.dataProvider.updateOptions({
|
|
6478
6461
|
nodeConnectController: {
|
|
6479
6462
|
...this.getOptions().nodeConnectController,
|
|
6480
|
-
node:
|
|
6463
|
+
node: b,
|
|
6481
6464
|
show: !1
|
|
6482
6465
|
}
|
|
6483
|
-
}), g = h.dataset.point, n.newLinkTemplate.toNode && (s =
|
|
6466
|
+
}), g = h.dataset.point, n.newLinkTemplate.toNode && (s = b.id, a = b.targetType, this.dataProvider.updateOptions({
|
|
6484
6467
|
newLinkTemplate: {
|
|
6485
6468
|
...this.getOptions().newLinkTemplate,
|
|
6486
6469
|
toNode: {
|
|
6487
6470
|
...this.getOptions().newLinkTemplate.toNode,
|
|
6488
|
-
nodeShape:
|
|
6471
|
+
nodeShape: b.nodeShape
|
|
6489
6472
|
}
|
|
6490
6473
|
}
|
|
6491
6474
|
})), this._updateEditingConnectControllerView();
|
|
@@ -6557,7 +6540,7 @@ class di extends si {
|
|
|
6557
6540
|
let n = !1;
|
|
6558
6541
|
if (!t.newLinkTemplate.toNodeObject) {
|
|
6559
6542
|
x("[CreatingLinePlot]CreatingLinePlot:toNodeObject not set!");
|
|
6560
|
-
const o =
|
|
6543
|
+
const o = Be(e), s = this.getCanvasXyByClientXy({
|
|
6561
6544
|
x: o.clientX,
|
|
6562
6545
|
y: o.clientY
|
|
6563
6546
|
});
|
|
@@ -6607,7 +6590,7 @@ class di extends si {
|
|
|
6607
6590
|
e.stopPropagation(), e.preventDefault(), this.stopCreatingLinePlot();
|
|
6608
6591
|
let t = "canvas", n = this.isNode(e.target);
|
|
6609
6592
|
n ? t = "node" : (n = this.isLine(e.target), n && (t = "line")), x("contextmenu:objectType", t, n);
|
|
6610
|
-
const o =
|
|
6593
|
+
const o = Be(e), s = this.getCanvasXyByClientXy({
|
|
6611
6594
|
x: o.clientX,
|
|
6612
6595
|
y: o.clientY
|
|
6613
6596
|
}), a = this.getViewXyByCanvasXy(s);
|
|
@@ -6617,7 +6600,7 @@ class di extends si {
|
|
|
6617
6600
|
const t = this.getOptions();
|
|
6618
6601
|
if (e !== void 0 && e === t.fullscreen)
|
|
6619
6602
|
return;
|
|
6620
|
-
x("fullscreen:newValue:", e),
|
|
6603
|
+
x("fullscreen:newValue:", e), e === void 0 && (e = !t.fullscreen);
|
|
6621
6604
|
let n = this.$dom;
|
|
6622
6605
|
t.fullscreenElementXPath && (n = document.querySelector(t.fullscreenElementXPath) || this.$dom), await ai(n, e), this.dataProvider.updateOptions({ fullscreen: e }), this.emitEvent(V.onFullscreen, e), this._dataUpdated();
|
|
6623
6606
|
}
|
|
@@ -6712,11 +6695,11 @@ class di extends si {
|
|
|
6712
6695
|
f.preventDefault();
|
|
6713
6696
|
const v = p[1], m = this.getOptions();
|
|
6714
6697
|
l || (l = { x: v.clientX, y: v.clientY }, c = m.canvasZoom);
|
|
6715
|
-
const
|
|
6698
|
+
const C = { x: y.clientX, y: y.clientY }, b = { x: v.clientX, y: v.clientY }, T = Math.hypot(l.x - g.x, l.y - g.y), _ = Math.hypot(b.x - C.x, b.y - C.y) / T, N = m.mouseWheelSpeed * _, P = c * N;
|
|
6716
6699
|
this.setZoom(P, g), this._dataUpdated();
|
|
6717
6700
|
} else {
|
|
6718
|
-
const v = y.clientX, m = y.clientY,
|
|
6719
|
-
this.onCanvasDragging(T, O,
|
|
6701
|
+
const v = y.clientX, m = y.clientY, C = v - g.x, b = m - g.y, T = u.x + C, O = u.y + b;
|
|
6702
|
+
this.onCanvasDragging(T, O, b, C), this._updateEditingControllerView(), this._dataUpdated();
|
|
6720
6703
|
}
|
|
6721
6704
|
};
|
|
6722
6705
|
} else
|
|
@@ -7075,8 +7058,8 @@ class hi extends ci {
|
|
|
7075
7058
|
if (!a.showReferenceLine)
|
|
7076
7059
|
return;
|
|
7077
7060
|
if (!a.editingReferenceLine.show) {
|
|
7078
|
-
const S = Math.abs(o),
|
|
7079
|
-
S +
|
|
7061
|
+
const S = Math.abs(o), L = Math.abs(s);
|
|
7062
|
+
S + L > 2 && this.dataProvider.updateOptions({
|
|
7080
7063
|
editingReferenceLine: {
|
|
7081
7064
|
...a.editingReferenceLine,
|
|
7082
7065
|
show: !0
|
|
@@ -7089,67 +7072,67 @@ class hi extends ci {
|
|
|
7089
7072
|
x: h,
|
|
7090
7073
|
y: f
|
|
7091
7074
|
});
|
|
7092
|
-
let v = !1, m = !1,
|
|
7075
|
+
let v = !1, m = !1, C = 0, b = 0;
|
|
7093
7076
|
const T = this.getNodes().filter((S) => this._nodeXYMappingBeforeDrag[S.id] ? !1 : Math.abs(S.x - h) < 600 && Math.abs(S.y - f) < 600);
|
|
7094
|
-
T.sort((S,
|
|
7095
|
-
const A =
|
|
7077
|
+
T.sort((S, L) => {
|
|
7078
|
+
const A = Re(
|
|
7096
7079
|
h,
|
|
7097
7080
|
f,
|
|
7098
7081
|
S.x + S.el_W / 2,
|
|
7099
7082
|
S.y + S.el_H / 2
|
|
7100
|
-
),
|
|
7083
|
+
), X = Re(
|
|
7101
7084
|
h,
|
|
7102
7085
|
f,
|
|
7103
|
-
|
|
7104
|
-
|
|
7086
|
+
L.x + L.el_W / 2,
|
|
7087
|
+
L.y + L.el_H / 2
|
|
7105
7088
|
);
|
|
7106
|
-
return A <
|
|
7089
|
+
return A < X ? -1 : 1;
|
|
7107
7090
|
});
|
|
7108
|
-
let { v_x: O, v_y:
|
|
7091
|
+
let { v_x: O, v_y: _, v_height: N, h_x: P, h_y: M, h_width: k } = a.editingReferenceLine;
|
|
7109
7092
|
for (const S of T) {
|
|
7110
|
-
const
|
|
7093
|
+
const L = S.x, A = S.el_W, X = S.el_H, H = S.x + A / 2, $ = S.x + A, U = S.y, K = S.y + X / 2, ie = S.y + X, Le = Math.abs(l - L), ve = Math.abs(h - H), me = Math.abs(u - $), ye = Math.abs(g - U), fe = Math.abs(f - K), Ce = Math.abs(p - ie), ce = 5;
|
|
7111
7094
|
if (ve < 800 && fe < 800) {
|
|
7112
7095
|
if (!m && ve < ce) {
|
|
7113
7096
|
const J = this.getViewXyByCanvasXy({
|
|
7114
7097
|
x: H,
|
|
7115
|
-
y:
|
|
7098
|
+
y: K
|
|
7116
7099
|
});
|
|
7117
|
-
O = J.x,
|
|
7100
|
+
O = J.x, _ = y.y > J.y ? J.y : y.y, N = Math.round(Math.abs(y.y - J.y)), m = !0, C = H - c / 2;
|
|
7118
7101
|
}
|
|
7119
7102
|
if (!m && Le < ce) {
|
|
7120
7103
|
const J = this.getViewXyByCanvasXy({
|
|
7121
|
-
x:
|
|
7122
|
-
y:
|
|
7104
|
+
x: L,
|
|
7105
|
+
y: K
|
|
7123
7106
|
});
|
|
7124
|
-
O = J.x,
|
|
7107
|
+
O = J.x, _ = y.y > J.y ? J.y : y.y, N = Math.round(Math.abs(y.y - J.y)), m = !0, C = L;
|
|
7125
7108
|
}
|
|
7126
7109
|
if (!m && me < ce) {
|
|
7127
7110
|
const J = this.getViewXyByCanvasXy({
|
|
7128
7111
|
x: $,
|
|
7129
|
-
y:
|
|
7112
|
+
y: K
|
|
7130
7113
|
});
|
|
7131
|
-
O = J.x,
|
|
7114
|
+
O = J.x, _ = y.y > J.y ? J.y : y.y, N = Math.round(Math.abs(y.y - J.y)), m = !0, C = $ - c;
|
|
7132
7115
|
}
|
|
7133
7116
|
if (!v && fe < ce) {
|
|
7134
7117
|
const J = this.getViewXyByCanvasXy({
|
|
7135
7118
|
x: H,
|
|
7136
|
-
y:
|
|
7119
|
+
y: K
|
|
7137
7120
|
});
|
|
7138
|
-
M = J.y, P = y.x > J.x ? J.x : y.x,
|
|
7121
|
+
M = J.y, P = y.x > J.x ? J.x : y.x, k = Math.round(Math.abs(y.x - J.x)), v = !0, b = K - d / 2;
|
|
7139
7122
|
}
|
|
7140
7123
|
if (!v && ye < ce) {
|
|
7141
7124
|
const J = this.getViewXyByCanvasXy({
|
|
7142
7125
|
x: H,
|
|
7143
7126
|
y: U
|
|
7144
7127
|
});
|
|
7145
|
-
M = J.y, P = y.x > J.x ? J.x : y.x,
|
|
7128
|
+
M = J.y, P = y.x > J.x ? J.x : y.x, k = Math.round(Math.abs(y.x - J.x)), v = !0, b = U;
|
|
7146
7129
|
}
|
|
7147
7130
|
if (!v && Ce < ce) {
|
|
7148
7131
|
const J = this.getViewXyByCanvasXy({
|
|
7149
7132
|
x: H,
|
|
7150
7133
|
y: ie
|
|
7151
7134
|
});
|
|
7152
|
-
M = J.y, P = y.x > J.x ? J.x : y.x,
|
|
7135
|
+
M = J.y, P = y.x > J.x ? J.x : y.x, k = Math.abs(y.x - J.x), v = !0, b = ie - d;
|
|
7153
7136
|
}
|
|
7154
7137
|
if (v && m)
|
|
7155
7138
|
break;
|
|
@@ -7159,20 +7142,20 @@ class hi extends ci {
|
|
|
7159
7142
|
editingReferenceLine: {
|
|
7160
7143
|
...a.editingReferenceLine,
|
|
7161
7144
|
v_x: O,
|
|
7162
|
-
v_y:
|
|
7145
|
+
v_y: _,
|
|
7163
7146
|
v_height: N,
|
|
7164
7147
|
h_x: P,
|
|
7165
7148
|
h_y: M,
|
|
7166
|
-
h_width:
|
|
7149
|
+
h_width: k,
|
|
7167
7150
|
directionH: v,
|
|
7168
7151
|
directionV: m
|
|
7169
7152
|
}
|
|
7170
7153
|
}), a.referenceLineAdsorption)
|
|
7171
7154
|
return {
|
|
7172
7155
|
showV: m,
|
|
7173
|
-
fixedX:
|
|
7156
|
+
fixedX: C,
|
|
7174
7157
|
showH: v,
|
|
7175
|
-
fixedY:
|
|
7158
|
+
fixedY: b
|
|
7176
7159
|
};
|
|
7177
7160
|
}
|
|
7178
7161
|
hideEditingLineView() {
|
|
@@ -7214,49 +7197,49 @@ class hi extends ci {
|
|
|
7214
7197
|
}
|
|
7215
7198
|
if (t.lineShape === j.StandardOrthogonal) {
|
|
7216
7199
|
let {
|
|
7217
|
-
textPosition:
|
|
7200
|
+
textPosition: b,
|
|
7218
7201
|
pathData: T,
|
|
7219
7202
|
points: O,
|
|
7220
|
-
startDirection:
|
|
7203
|
+
startDirection: _,
|
|
7221
7204
|
endDirection: N
|
|
7222
7205
|
} = l;
|
|
7223
|
-
a =
|
|
7206
|
+
a = b, o = O[0], s = O[O.length - 1];
|
|
7224
7207
|
const P = [];
|
|
7225
7208
|
for (let M = 0; M < O.length - 1; M++) {
|
|
7226
|
-
const
|
|
7209
|
+
const k = O[M], S = O[M + 1], L = {
|
|
7227
7210
|
pIndex: M,
|
|
7228
7211
|
optionName: "cp-" + M,
|
|
7229
7212
|
x: 0,
|
|
7230
7213
|
y: 0,
|
|
7231
7214
|
direction: "v",
|
|
7232
|
-
startDirection:
|
|
7215
|
+
startDirection: _,
|
|
7233
7216
|
endDirection: N
|
|
7234
7217
|
};
|
|
7235
|
-
|
|
7218
|
+
k.x !== S.x && (L.direction = "h");
|
|
7236
7219
|
const A = this.getViewXyByCanvasXy({
|
|
7237
|
-
x: (
|
|
7238
|
-
y: (
|
|
7220
|
+
x: (k.x + S.x) / 2,
|
|
7221
|
+
y: (k.y + S.y) / 2
|
|
7239
7222
|
});
|
|
7240
|
-
|
|
7223
|
+
L.x = A.x, L.y = A.y, P.push(L);
|
|
7241
7224
|
}
|
|
7242
7225
|
if (P.length !== 1) {
|
|
7243
7226
|
if (P.length !== 2)
|
|
7244
7227
|
if (P.length === 3) {
|
|
7245
|
-
const M = O[0],
|
|
7228
|
+
const M = O[0], k = O[1], S = O[3];
|
|
7246
7229
|
if (P[1].direction === "v") {
|
|
7247
|
-
const
|
|
7248
|
-
if (Math.max(
|
|
7230
|
+
const L = M.x, A = k.x, X = S.x;
|
|
7231
|
+
if (Math.max(L, A, X) !== A && Math.min(L, A, X) !== A)
|
|
7249
7232
|
P[1].optionName = "cx";
|
|
7250
7233
|
else {
|
|
7251
|
-
const $ = Math.abs(A -
|
|
7234
|
+
const $ = Math.abs(A - L), U = Math.abs(A - X);
|
|
7252
7235
|
$ >= U ? P[1].optionName = "td" : $ < U && (P[1].optionName = "fd");
|
|
7253
7236
|
}
|
|
7254
7237
|
} else {
|
|
7255
|
-
const
|
|
7256
|
-
if (Math.max(
|
|
7238
|
+
const L = M.y, A = k.y, X = S.y;
|
|
7239
|
+
if (Math.max(L, A, X) !== A && Math.min(L, A, X) !== A)
|
|
7257
7240
|
P[1].optionName = "cy";
|
|
7258
7241
|
else {
|
|
7259
|
-
const $ = Math.abs(A -
|
|
7242
|
+
const $ = Math.abs(A - L), U = Math.abs(A - X);
|
|
7260
7243
|
$ >= U ? P[1].optionName = "td" : $ < U && (P[1].optionName = "fd");
|
|
7261
7244
|
}
|
|
7262
7245
|
}
|
|
@@ -7272,36 +7255,36 @@ class hi extends ci {
|
|
|
7272
7255
|
});
|
|
7273
7256
|
} else if (t.lineShape === j.HardOrthogonal) {
|
|
7274
7257
|
let {
|
|
7275
|
-
textPosition:
|
|
7258
|
+
textPosition: b,
|
|
7276
7259
|
pathData: T,
|
|
7277
7260
|
points: O,
|
|
7278
|
-
startDirection:
|
|
7261
|
+
startDirection: _,
|
|
7279
7262
|
endDirection: N
|
|
7280
7263
|
} = l;
|
|
7281
|
-
a =
|
|
7264
|
+
a = b;
|
|
7282
7265
|
const P = [];
|
|
7283
7266
|
O = t.ctrlPointsFor49, o = O[0], s = O[O.length - 1];
|
|
7284
7267
|
const M = O;
|
|
7285
|
-
for (let
|
|
7286
|
-
const S = M[
|
|
7287
|
-
pIndex:
|
|
7288
|
-
optionName: "cp-" +
|
|
7268
|
+
for (let k = 0; k < M.length - 1; k++) {
|
|
7269
|
+
const S = M[k], L = M[k + 1], A = {
|
|
7270
|
+
pIndex: k,
|
|
7271
|
+
optionName: "cp-" + k,
|
|
7289
7272
|
x: 0,
|
|
7290
7273
|
y: 0,
|
|
7291
7274
|
direction: "v",
|
|
7292
|
-
startDirection:
|
|
7275
|
+
startDirection: _,
|
|
7293
7276
|
endDirection: N
|
|
7294
7277
|
};
|
|
7295
|
-
S.x !==
|
|
7296
|
-
const
|
|
7297
|
-
x: (S.x +
|
|
7298
|
-
y: (S.y +
|
|
7278
|
+
S.x !== L.x ? (A.direction = "h", Math.abs(S.x - L.x) < 15 && (A.hide = !0)) : Math.abs(S.y - L.y) < 15 && (A.hide = !0);
|
|
7279
|
+
const X = this.getViewXyByCanvasXy({
|
|
7280
|
+
x: (S.x + L.x) / 2,
|
|
7281
|
+
y: (S.y + L.y) / 2
|
|
7299
7282
|
});
|
|
7300
|
-
A.x =
|
|
7283
|
+
A.x = X.x, A.y = X.y, P.push(A);
|
|
7301
7284
|
}
|
|
7302
|
-
for (let
|
|
7303
|
-
const S = P[
|
|
7304
|
-
|
|
7285
|
+
for (let k = 0; k < P.length; k++) {
|
|
7286
|
+
const S = P[k - 1], L = P[k], A = P[k + 1];
|
|
7287
|
+
k === 0 && L.direction === A.direction && (L.hide = !0), k === P.length - 1 && L.direction === S.direction && (L.hide = !0);
|
|
7305
7288
|
}
|
|
7306
7289
|
this.dataProvider.updateOptions({
|
|
7307
7290
|
editingLineController: {
|
|
@@ -7312,9 +7295,9 @@ class hi extends ci {
|
|
|
7312
7295
|
});
|
|
7313
7296
|
} else if (t.lineShape !== 1) {
|
|
7314
7297
|
a = l.textPosition;
|
|
7315
|
-
const
|
|
7298
|
+
const b = Ct(l.pathData);
|
|
7316
7299
|
let T, O;
|
|
7317
|
-
t.isReverse ? (o =
|
|
7300
|
+
t.isReverse ? (o = b.endPoint, s = b.startPoint, T = this.getViewXyByCanvasXy(b.ctrl1), O = this.getViewXyByCanvasXy(b.ctrl2)) : (o = b.startPoint, s = b.endPoint, T = this.getViewXyByCanvasXy(b.ctrl1), O = this.getViewXyByCanvasXy(b.ctrl2)), this.dataProvider.updateOptions({
|
|
7318
7301
|
editingLineController: {
|
|
7319
7302
|
...this.getOptions().editingLineController,
|
|
7320
7303
|
ctrlPoint1: T,
|
|
@@ -7323,7 +7306,7 @@ class hi extends ci {
|
|
|
7323
7306
|
});
|
|
7324
7307
|
} else {
|
|
7325
7308
|
a = l.textPosition;
|
|
7326
|
-
const
|
|
7309
|
+
const b = l.pathData, T = Ct(b);
|
|
7327
7310
|
o = T.startPoint, s = T.endPoint;
|
|
7328
7311
|
}
|
|
7329
7312
|
const c = this.getViewXyByCanvasXy(t.isReverse ? s : o), d = this.getViewXyByCanvasXy(t.isReverse ? o : s);
|
|
@@ -7337,22 +7320,22 @@ class hi extends ci {
|
|
|
7337
7320
|
const h = this.getViewXyByCanvasXy(a), u = this.$canvasDom.querySelector(`g[data-id='${t.id}']`);
|
|
7338
7321
|
let g = 0, f = 0, p = t.textOffsetX || 0, y = t.textOffsetY || 0;
|
|
7339
7322
|
const v = this.dataProvider.getCanvasScale();
|
|
7340
|
-
let m = 20,
|
|
7323
|
+
let m = 20, C = 20;
|
|
7341
7324
|
if (u) {
|
|
7342
|
-
const
|
|
7343
|
-
if (
|
|
7344
|
-
p = Math.floor(parseFloat(
|
|
7345
|
-
const T =
|
|
7346
|
-
m = T,
|
|
7325
|
+
const b = u.querySelector("text.rg-line-text");
|
|
7326
|
+
if (b) {
|
|
7327
|
+
p = Math.floor(parseFloat(b.getAttribute("x") || "0")), y = Math.floor(parseFloat(b.getAttribute("y") || "0"));
|
|
7328
|
+
const T = b.clientWidth, O = b.clientHeight;
|
|
7329
|
+
m = T, C = O;
|
|
7347
7330
|
}
|
|
7348
7331
|
}
|
|
7349
|
-
m += 40,
|
|
7332
|
+
m += 40, C += 10, m > 120 && (m = 120), C > 20 && (C = 20), this.dataProvider.updateOptions({
|
|
7350
7333
|
editingLineController: {
|
|
7351
7334
|
...this.getOptions().editingLineController,
|
|
7352
7335
|
text: {
|
|
7353
7336
|
...this.getOptions().editingLineController.text,
|
|
7354
7337
|
width: m,
|
|
7355
|
-
height:
|
|
7338
|
+
height: C,
|
|
7356
7339
|
x: h.x + g + p * v,
|
|
7357
7340
|
y: h.y + f + y * v
|
|
7358
7341
|
}
|
|
@@ -7370,7 +7353,7 @@ class hi extends ci {
|
|
|
7370
7353
|
a = h, l = u;
|
|
7371
7354
|
}
|
|
7372
7355
|
let c = a;
|
|
7373
|
-
this.dataProvider.setEditingLine(null), s ? this.removeLine(o) : this.removeFakeLine(o)
|
|
7356
|
+
this.dataProvider.setEditingLine(null), s ? this.removeLine(o) : this.removeFakeLine(o);
|
|
7374
7357
|
let d = !1;
|
|
7375
7358
|
o.lineShape === j.HardOrthogonal && (o.lineShape = j.StandardOrthogonal), e === "start" ? (o.fromJunctionPointOffsetX = 0, o.fromJunctionPointOffsetY = 0, c = l, d = !0) : (o.toJunctionPointOffsetX = 0, o.toJunctionPointOffsetY = 0), this.startCreatingLinePlot(t, {
|
|
7376
7359
|
template: o,
|
|
@@ -7409,7 +7392,6 @@ class hi extends ci {
|
|
|
7409
7392
|
const s = this.getOptions();
|
|
7410
7393
|
if (!s.creatingLinePlot || Date.now() - this._startCreateLineFromNodeTime < 500)
|
|
7411
7394
|
return;
|
|
7412
|
-
console.log("Connect end:isReverse:", s.newLineTemplate.isReverse);
|
|
7413
7395
|
const a = s.nodeConnectController.node;
|
|
7414
7396
|
let {
|
|
7415
7397
|
toJunctionPoint: l,
|
|
@@ -7473,9 +7455,7 @@ class hi extends ci {
|
|
|
7473
7455
|
startMoveLineText(e, t) {
|
|
7474
7456
|
if (Ge(e))
|
|
7475
7457
|
return;
|
|
7476
|
-
const n = this.getViewXyByEvent(e), s = this.getOptions().editingLineController.line;
|
|
7477
|
-
console.log("startMoveLineText:", s.id);
|
|
7478
|
-
const a = s.textOffsetX || 0, l = s.textOffsetY || 0;
|
|
7458
|
+
const n = this.getViewXyByEvent(e), s = this.getOptions().editingLineController.line, a = s.textOffsetX || 0, l = s.textOffsetY || 0;
|
|
7479
7459
|
let c = !1;
|
|
7480
7460
|
const d = (u) => {
|
|
7481
7461
|
const g = this.dataProvider.getCanvasScale(), f = this.getViewXyByEvent(u), p = f.x - n.x, y = f.y - n.y;
|
|
@@ -7491,7 +7471,7 @@ class hi extends ci {
|
|
|
7491
7471
|
let l = a.ctrlPoints || [];
|
|
7492
7472
|
l.length === 0 && (l.push({ x: 0, y: 0 }), l.push({ x: 0, y: 0 })), this.dataProvider.updateLine(a.id, {
|
|
7493
7473
|
ctrlPoints: l
|
|
7494
|
-
}),
|
|
7474
|
+
}), l = a.ctrlPoints, a.isReverse && (e = l.length - 1 - e);
|
|
7495
7475
|
const c = this.dataProvider.getCanvasScale(), d = l[e], { x: h, y: u } = d, g = () => {
|
|
7496
7476
|
n(a), this._dataUpdated();
|
|
7497
7477
|
};
|
|
@@ -7504,7 +7484,6 @@ class hi extends ci {
|
|
|
7504
7484
|
startMoveLine44CtrlPoint(e, t, n) {
|
|
7505
7485
|
t.stopPropagation(), t.preventDefault();
|
|
7506
7486
|
const s = this.getOptions().editingLineController, a = s.line;
|
|
7507
|
-
console.log("startMoveLine44CtrlPoint:", a == null ? void 0 : a.lineShape, e.optionName);
|
|
7508
7487
|
let l = a.ctrlOptionsFor44;
|
|
7509
7488
|
l || (l = { cx: 0, cy: 0, fd: 0, td: 0 }, this.dataProvider.updateLine(a.id, {
|
|
7510
7489
|
ctrlOptionsFor44: l
|
|
@@ -7512,7 +7491,6 @@ class hi extends ci {
|
|
|
7512
7491
|
const c = l[e.optionName], d = { indexOffset: 0 };
|
|
7513
7492
|
let h = a.ctrlPointsFor49 ? JSON.parse(JSON.stringify(a.ctrlPointsFor49)) : null;
|
|
7514
7493
|
const u = (f, p) => {
|
|
7515
|
-
console.log("lineSplitCtrlMoving:", a == null ? void 0 : a.lineShape, e.optionName);
|
|
7516
7494
|
const y = this.dataProvider.getCanvasScale();
|
|
7517
7495
|
if (a.lineShape === j.StandardOrthogonal) {
|
|
7518
7496
|
if (e.optionName === "cx") {
|
|
@@ -7526,18 +7504,18 @@ class hi extends ci {
|
|
|
7526
7504
|
ctrlOptionsFor44: l
|
|
7527
7505
|
});
|
|
7528
7506
|
} else if (e.optionName === "fd") {
|
|
7529
|
-
const v =
|
|
7507
|
+
const v = Qe[e.startDirection], m = e.direction === "v" ? f * v.x : p * v.y;
|
|
7530
7508
|
l.fd = c + m / y, this.dataProvider.updateLine(a.id, {
|
|
7531
7509
|
ctrlOptionsFor44: l
|
|
7532
7510
|
});
|
|
7533
7511
|
} else if (e.optionName === "td") {
|
|
7534
|
-
const v =
|
|
7512
|
+
const v = Qe[e.endDirection], m = e.direction === "v" ? f * v.x : p * v.y;
|
|
7535
7513
|
l.td = c + m / y, this.dataProvider.updateLine(a.id, {
|
|
7536
7514
|
ctrlOptionsFor44: l
|
|
7537
7515
|
});
|
|
7538
7516
|
} else if (e.direction === "v" && Math.abs(f) > 5 || e.direction === "h" && Math.abs(p) > 5) {
|
|
7539
7517
|
const v = s.line49Points;
|
|
7540
|
-
h = JSON.parse(JSON.stringify(v)),
|
|
7518
|
+
h = JSON.parse(JSON.stringify(v)), this.dataProvider.updateLine(a.id, {
|
|
7541
7519
|
ctrlPointsFor49: h
|
|
7542
7520
|
}), this.dataProvider.updateLine(a.id, {
|
|
7543
7521
|
lineShape: j.HardOrthogonal
|
|
@@ -7559,7 +7537,7 @@ class hi extends ci {
|
|
|
7559
7537
|
}
|
|
7560
7538
|
}, g = () => {
|
|
7561
7539
|
if (a.lineShape === j.HardOrthogonal) {
|
|
7562
|
-
const f =
|
|
7540
|
+
const f = Ke(a.ctrlPointsFor49);
|
|
7563
7541
|
this.dataProvider.updateLine(a.id, {
|
|
7564
7542
|
ctrlPointsFor49: f
|
|
7565
7543
|
});
|
|
@@ -7575,14 +7553,14 @@ class hi extends ci {
|
|
|
7575
7553
|
this.onLineVertexBeDropped(e, t, void 0, o);
|
|
7576
7554
|
return;
|
|
7577
7555
|
}
|
|
7578
|
-
const s =
|
|
7556
|
+
const s = Be(t), a = n.getBoundingClientRect(), l = { x: a.left, y: a.top + a.height / 2 }, c = { x: a.left + a.width / 2, y: a.top }, d = { x: a.left + a.width, y: a.top + a.height / 2 }, h = { x: a.left + a.width / 2, y: a.top + a.height };
|
|
7579
7557
|
let u = _e.left;
|
|
7580
7558
|
const g = { x: 0, y: 0 };
|
|
7581
7559
|
if (e)
|
|
7582
7560
|
u = e, u === _e.top || u === _e.bottom ? g.x = s.clientX - h.x : u === _e.right ? g.y = s.clientY - d.y : g.y = s.clientY - l.y;
|
|
7583
7561
|
else {
|
|
7584
|
-
const p =
|
|
7585
|
-
|
|
7562
|
+
const p = Re(s.clientX, s.clientY, l.x, l.y), y = Re(s.clientX, s.clientY, c.x, c.y), v = Re(s.clientX, s.clientY, d.x, d.y), m = Re(s.clientX, s.clientY, h.x, h.y), C = Math.min(p, y, v, m);
|
|
7563
|
+
C === p ? (u = _e.left, g.x = s.clientX - l.x, g.y = s.clientY - l.y) : C === y ? (u = _e.top, g.x = s.clientX - c.x, g.y = s.clientY - c.y) : C === v ? (u = _e.right, g.x = s.clientX - d.x, g.y = s.clientY - d.y) : C === m && (u = _e.bottom, g.x = s.clientX - h.x, g.y = s.clientY - h.y);
|
|
7586
7564
|
}
|
|
7587
7565
|
const f = this.dataProvider.getCanvasScale();
|
|
7588
7566
|
g.x = g.x / f, g.y = g.y / f, x("onMouseUpWithOffset:", e, g), this.onLineVertexBeDropped(u, t, g, o);
|
|
@@ -7628,8 +7606,8 @@ class ui extends hi {
|
|
|
7628
7606
|
for (const m of this.getNodes())
|
|
7629
7607
|
if (m.rgCalcedVisibility && m.opacity !== 0) {
|
|
7630
7608
|
m.x < e && (e = m.x), m.y < t && (t = m.y);
|
|
7631
|
-
const
|
|
7632
|
-
|
|
7609
|
+
const C = m.x + m.el_W, b = m.y + m.el_H;
|
|
7610
|
+
C > n && (n = C), b > o && (o = b), s++;
|
|
7633
7611
|
}
|
|
7634
7612
|
const a = 1, l = 50, c = 50;
|
|
7635
7613
|
s === 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 = o + 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);
|
|
@@ -7647,9 +7625,10 @@ class ui extends hi {
|
|
|
7647
7625
|
this.miniViewBox.visibleAreaStart = e, this.miniViewBox.visibleAreaEnd = n;
|
|
7648
7626
|
const l = o * s, c = o * a, d = e.x - this.miniViewBox.canvas_start_x, h = e.y - this.miniViewBox.canvas_start_y, u = o * d, g = o * h;
|
|
7649
7627
|
let f = !1;
|
|
7650
|
-
(u + l < 0 || g + c < 0 || g > this.miniViewBox.miniview_height || u > this.miniViewBox.miniview_width) && (f = !0)
|
|
7628
|
+
(u + l < 0 || g + c < 0 || g > this.miniViewBox.miniview_height || u > this.miniViewBox.miniview_width) && (f = !0);
|
|
7629
|
+
const p = this.getOptions().miniViewVisibleHandle;
|
|
7630
|
+
(p.emptyContent !== f || p.width !== l || p.height !== c || p.x !== l || p.y !== c) && this.dataProvider.updateOptions({
|
|
7651
7631
|
miniViewVisibleHandle: {
|
|
7652
|
-
...this.getOptions().miniViewVisibleHandle,
|
|
7653
7632
|
emptyContent: f,
|
|
7654
7633
|
width: l,
|
|
7655
7634
|
height: c,
|
|
@@ -7722,10 +7701,10 @@ class ui extends hi {
|
|
|
7722
7701
|
});
|
|
7723
7702
|
}
|
|
7724
7703
|
onVisibleViewHandleDragStart(e) {
|
|
7725
|
-
e.preventDefault(), e.stopPropagation()
|
|
7704
|
+
e.preventDefault(), e.stopPropagation();
|
|
7726
7705
|
const t = this.getOptions(), n = t.canvasOffset.x, o = t.canvasOffset.y, s = this.miniViewBox.canvas_width, a = this.miniViewBox.canvas_height, l = () => {
|
|
7727
7706
|
const f = u / this.miniViewBox.miniview_width, p = g / this.miniViewBox.miniview_height, y = this.dataProvider.getCanvasScale(), v = s * f * y, m = a * p * y;
|
|
7728
|
-
|
|
7707
|
+
this.dataProvider.setCanvasOffset(n - v, o - m), this._updateEditingControllerView(), this.updateMiniViewVisibleArea(), this.updateShouldRenderGraphData(), this.dataProvider.dataUpdated();
|
|
7729
7708
|
};
|
|
7730
7709
|
let c;
|
|
7731
7710
|
const d = (f, p, y) => {
|
|
@@ -7733,7 +7712,7 @@ class ui extends hi {
|
|
|
7733
7712
|
};
|
|
7734
7713
|
let h = !1, u = 0, g = 0;
|
|
7735
7714
|
Oe.startDrag(e, { x: 0, y: 0 }, d, (f, p) => {
|
|
7736
|
-
u = f, g = p,
|
|
7715
|
+
u = f, g = p, !h && Math.abs(f) + Math.abs(p) > 3 && (h = !0, c = setInterval(() => {
|
|
7737
7716
|
l();
|
|
7738
7717
|
}, 50));
|
|
7739
7718
|
});
|
|
@@ -7861,7 +7840,7 @@ class pi extends fi {
|
|
|
7861
7840
|
const t = this.$canvasDom.parentElement.querySelector(".rg-canvas-slot-behind");
|
|
7862
7841
|
if (t)
|
|
7863
7842
|
this.mutationObserver4CanvasSlotBehind = new MutationObserver((o) => {
|
|
7864
|
-
|
|
7843
|
+
this.updateConnectTargetsOnCanvas("CanvasBehind-Mutation", t);
|
|
7865
7844
|
}), this.mutationObserver4CanvasSlotBehind.observe(t, {
|
|
7866
7845
|
childList: !0,
|
|
7867
7846
|
subtree: !0,
|
|
@@ -7990,10 +7969,10 @@ class gi extends pi {
|
|
|
7990
7969
|
const a = Ze(s);
|
|
7991
7970
|
a && i.push(a);
|
|
7992
7971
|
}), this.getLines().forEach((s) => {
|
|
7993
|
-
const a =
|
|
7972
|
+
const a = Xe(s);
|
|
7994
7973
|
a && e.push(a);
|
|
7995
7974
|
}), this.getFakeLines().forEach((s) => {
|
|
7996
|
-
const a =
|
|
7975
|
+
const a = Xe(s);
|
|
7997
7976
|
a && t.push(a);
|
|
7998
7977
|
});
|
|
7999
7978
|
const n = {
|
|
@@ -8010,7 +7989,7 @@ class gi extends pi {
|
|
|
8010
7989
|
return gt(i);
|
|
8011
7990
|
}
|
|
8012
7991
|
transRGLineToJsonObject(i) {
|
|
8013
|
-
return
|
|
7992
|
+
return Xe(i);
|
|
8014
7993
|
}
|
|
8015
7994
|
getGraphJsonOptions() {
|
|
8016
7995
|
const i = {}, e = [
|
|
@@ -8043,12 +8022,10 @@ class gi extends pi {
|
|
|
8043
8022
|
this._clearGraph(), this._dataUpdated();
|
|
8044
8023
|
}
|
|
8045
8024
|
printOptions() {
|
|
8046
|
-
|
|
8047
|
-
console.log("options:", i), console.log("options-json-string:"), console.log(JSON.stringify(i));
|
|
8025
|
+
this.getGraphJsonOptions();
|
|
8048
8026
|
}
|
|
8049
8027
|
printData() {
|
|
8050
|
-
|
|
8051
|
-
console.log("data:", i), console.log("data-json-string:"), console.log(JSON.stringify(i));
|
|
8028
|
+
this.getGraphJsonData();
|
|
8052
8029
|
}
|
|
8053
8030
|
printGraphJsonData() {
|
|
8054
8031
|
this.printOptions(), this.printData();
|
|
@@ -8070,13 +8047,12 @@ class yi extends gi {
|
|
|
8070
8047
|
}
|
|
8071
8048
|
}
|
|
8072
8049
|
function jt(r, i = !1) {
|
|
8073
|
-
console.log("No parent RGProvider found, creating new graphInstance", i);
|
|
8074
8050
|
const e = Pt(r ? Reflect.construct(r, []) : new yi());
|
|
8075
8051
|
return e._rgAsConnectArea = i, e;
|
|
8076
8052
|
}
|
|
8077
8053
|
function qt(r, i = !1) {
|
|
8078
8054
|
const e = ut(qe, null);
|
|
8079
|
-
return e ?
|
|
8055
|
+
return e ? e.graphInstance : jt(r, i);
|
|
8080
8056
|
}
|
|
8081
8057
|
const rt = (r) => ({
|
|
8082
8058
|
get value() {
|
|
@@ -8094,7 +8070,6 @@ function vt(r) {
|
|
|
8094
8070
|
},
|
|
8095
8071
|
setup(i, { slots: e }) {
|
|
8096
8072
|
if (!ut(qe, null)) {
|
|
8097
|
-
console.error("RGDataProvider");
|
|
8098
8073
|
const n = ee({
|
|
8099
8074
|
rootNode: void 0,
|
|
8100
8075
|
nodes: [],
|
|
@@ -8135,12 +8110,11 @@ function vt(r) {
|
|
|
8135
8110
|
runtimeDATA4NodeMap: u.value,
|
|
8136
8111
|
runtimeDATA4LinkMap: g.value,
|
|
8137
8112
|
runtimeDATA4ShouldRenderItems: s.value
|
|
8138
|
-
}, (O,
|
|
8139
|
-
O[
|
|
8140
|
-
}), r.setOptions(i.options || {}),
|
|
8113
|
+
}, (O, _, N) => {
|
|
8114
|
+
O[_] = Pt(N);
|
|
8115
|
+
}), r.setOptions(i.options || {}), sn(qe, { graphInstance: r });
|
|
8141
8116
|
}
|
|
8142
8117
|
return ae(() => {
|
|
8143
|
-
console.error("RGDataProvider mounted");
|
|
8144
8118
|
}), () => e.default ? e.default() : null;
|
|
8145
8119
|
}
|
|
8146
8120
|
});
|
|
@@ -8177,7 +8151,7 @@ const Zt = {
|
|
|
8177
8151
|
onForceLayoutFinish: () => !0,
|
|
8178
8152
|
beforeScrollStart: (r, i, e) => !0
|
|
8179
8153
|
};
|
|
8180
|
-
function
|
|
8154
|
+
function Qt({ relationGraphCore: r } = {}) {
|
|
8181
8155
|
const i = qt(r), e = vt(i);
|
|
8182
8156
|
return {
|
|
8183
8157
|
RelationGraph: G({
|
|
@@ -8198,15 +8172,15 @@ function Kt({ relationGraphCore: r } = {}) {
|
|
|
8198
8172
|
},
|
|
8199
8173
|
emits: Zt,
|
|
8200
8174
|
setup(t, { slots: n, emit: o }) {
|
|
8201
|
-
return
|
|
8175
|
+
return ae(() => {
|
|
8202
8176
|
const s = t.emitProxy || o;
|
|
8203
8177
|
i.setEventEmitHook((a, ...l) => {
|
|
8204
8178
|
s(a, ...l);
|
|
8205
|
-
}),
|
|
8206
|
-
}),
|
|
8179
|
+
}), kt("Vue3"), t.options && i.setOptions(t.options || {}), i.ready(), t.initialData && i.applyInitialData(t.initialData);
|
|
8180
|
+
}), De(() => {
|
|
8207
8181
|
i.beforeUnmount();
|
|
8208
|
-
}), () =>
|
|
8209
|
-
default: () =>
|
|
8182
|
+
}), () => Ee(e, { options: t.options }, {
|
|
8183
|
+
default: () => Ee(no, t, n)
|
|
8210
8184
|
});
|
|
8211
8185
|
}
|
|
8212
8186
|
}),
|
|
@@ -8479,7 +8453,7 @@ https://www.relation-graph.com/docs.'
|
|
|
8479
8453
|
},
|
|
8480
8454
|
emits: Zt,
|
|
8481
8455
|
setup(r, { slots: i, emit: e, expose: t, attrs: n }) {
|
|
8482
|
-
const { RelationGraph: o, graphInstance: s } =
|
|
8456
|
+
const { RelationGraph: o, graphInstance: s } = Qt({
|
|
8483
8457
|
relationGraphCore: r.relationGraphCore
|
|
8484
8458
|
});
|
|
8485
8459
|
if (i["graph-plug"])
|
|
@@ -8498,7 +8472,7 @@ https://www.relation-graph.com/docs.'
|
|
|
8498
8472
|
async setJsonData() {
|
|
8499
8473
|
throw new Error(Nt.setJsonData);
|
|
8500
8474
|
}
|
|
8501
|
-
}), () =>
|
|
8475
|
+
}), () => Ee(o, {
|
|
8502
8476
|
options: r.options,
|
|
8503
8477
|
initialData: r.initialData,
|
|
8504
8478
|
emitProxy: e
|
|
@@ -8512,7 +8486,7 @@ https://www.relation-graph.com/docs.'
|
|
|
8512
8486
|
}, _i = /* @__PURE__ */ G({
|
|
8513
8487
|
__name: "RelationLinkerCanvas",
|
|
8514
8488
|
setup(r) {
|
|
8515
|
-
const i = ee(), e = W(), t =
|
|
8489
|
+
const i = ee(), e = W(), t = D(() => e.dataStores.optionsRef.value), n = D(() => ({
|
|
8516
8490
|
"background-color": "transparent",
|
|
8517
8491
|
"text-wrap": "unset",
|
|
8518
8492
|
position: "relative",
|
|
@@ -8521,8 +8495,8 @@ https://www.relation-graph.com/docs.'
|
|
|
8521
8495
|
}));
|
|
8522
8496
|
return ae(() => {
|
|
8523
8497
|
x("[RGCanvas mounted]"), e.setCanvasDom(i.value);
|
|
8524
|
-
}), (o, s) => (
|
|
8525
|
-
class:
|
|
8498
|
+
}), (o, s) => (R(), E("div", {
|
|
8499
|
+
class: Q(["rg-map", [
|
|
8526
8500
|
t.value.canvasOpacity === 1 && "rg-map-ready"
|
|
8527
8501
|
]])
|
|
8528
8502
|
}, [
|
|
@@ -8531,7 +8505,7 @@ https://www.relation-graph.com/docs.'
|
|
|
8531
8505
|
class: "rg-map-canvas rg-canvas-behind"
|
|
8532
8506
|
}, [
|
|
8533
8507
|
I("div", wi, [
|
|
8534
|
-
|
|
8508
|
+
B(o.$slots, "canvas-behind")
|
|
8535
8509
|
])
|
|
8536
8510
|
], 4),
|
|
8537
8511
|
I("div", {
|
|
@@ -8551,7 +8525,7 @@ https://www.relation-graph.com/docs.'
|
|
|
8551
8525
|
"graph-instance-id": t.value.instanceId
|
|
8552
8526
|
}, {
|
|
8553
8527
|
line: ne((a) => [
|
|
8554
|
-
|
|
8528
|
+
B(o.$slots, "line", le(de(a)))
|
|
8555
8529
|
]),
|
|
8556
8530
|
_: 3
|
|
8557
8531
|
}, 8, ["show-easy-view", "creating-line", "default-expand-holder-position", "draggingNodeId", "checkedNodeId", "defaultLineTextOnPath", "checked-line-id", "graph-instance-id"])
|
|
@@ -8561,19 +8535,19 @@ https://www.relation-graph.com/docs.'
|
|
|
8561
8535
|
}), bi = ["id"], Ni = { class: "rg-graph-plugs" }, Oi = { class: "rg-view-slot" }, Pi = /* @__PURE__ */ G({
|
|
8562
8536
|
__name: "RelationLinkerUI",
|
|
8563
8537
|
setup(r) {
|
|
8564
|
-
const i = W(), e = ee(), t =
|
|
8538
|
+
const i = W(), e = ee(), t = D(() => i.dataStores.optionsRef.value), n = ee(!1);
|
|
8565
8539
|
return ae(() => {
|
|
8566
8540
|
i.setDom(e.value), n.value = !0;
|
|
8567
|
-
}),
|
|
8541
|
+
}), De(() => {
|
|
8568
8542
|
i.beforeUnmount();
|
|
8569
8543
|
}), (o, s) => {
|
|
8570
8544
|
var a, l, c, d, h, u, g, f, p;
|
|
8571
|
-
return
|
|
8545
|
+
return R(), E("div", {
|
|
8572
8546
|
ref_key: "relationGraphRef$",
|
|
8573
8547
|
ref: e,
|
|
8574
8548
|
id: "relation-graph-ins-" + ((a = t.value) == null ? void 0 : a.instanceId),
|
|
8575
8549
|
tabindex: "1",
|
|
8576
|
-
class:
|
|
8550
|
+
class: Q([
|
|
8577
8551
|
"relation-graph",
|
|
8578
8552
|
t.value && t.value.creatingLinePlot ? "rg-creating-line" : ""
|
|
8579
8553
|
]),
|
|
@@ -8591,20 +8565,20 @@ https://www.relation-graph.com/docs.'
|
|
|
8591
8565
|
"--rg-line-width": ((p = t.value) == null ? void 0 : p.defaultLineWidth) + "px"
|
|
8592
8566
|
})
|
|
8593
8567
|
}, [
|
|
8594
|
-
t.value && n.value ? (
|
|
8568
|
+
t.value && n.value ? (R(), E(xe, { key: 0 }, [
|
|
8595
8569
|
oe(_i, null, {
|
|
8596
8570
|
line: ne((y) => [
|
|
8597
|
-
|
|
8571
|
+
B(o.$slots, "line", le(de(y)))
|
|
8598
8572
|
]),
|
|
8599
8573
|
"canvas-behind": ne(() => [
|
|
8600
|
-
|
|
8574
|
+
B(o.$slots, "default")
|
|
8601
8575
|
]),
|
|
8602
8576
|
_: 3
|
|
8603
8577
|
}),
|
|
8604
8578
|
oe(zt),
|
|
8605
8579
|
I("div", Ni, [
|
|
8606
8580
|
I("div", Oi, [
|
|
8607
|
-
|
|
8581
|
+
B(o.$slots, "view")
|
|
8608
8582
|
])
|
|
8609
8583
|
])
|
|
8610
8584
|
], 64)) : Y("", !0)
|
|
@@ -8627,7 +8601,7 @@ function Ti(r, { options: i, emitProxy: e }) {
|
|
|
8627
8601
|
o(a, ...l);
|
|
8628
8602
|
});
|
|
8629
8603
|
const s = async (a) => {
|
|
8630
|
-
a && (r.clearGraph(), r.addFakeLines(a)
|
|
8604
|
+
a && (r.clearGraph(), r.addFakeLines(a));
|
|
8631
8605
|
};
|
|
8632
8606
|
return lt(
|
|
8633
8607
|
() => t.lines,
|
|
@@ -8636,14 +8610,14 @@ function Ti(r, { options: i, emitProxy: e }) {
|
|
|
8636
8610
|
},
|
|
8637
8611
|
{ deep: !0 }
|
|
8638
8612
|
), ae(() => {
|
|
8639
|
-
|
|
8640
|
-
}),
|
|
8613
|
+
kt("Vue-Linker"), r.ready(), t.lines && s(t.lines);
|
|
8614
|
+
}), De(() => {
|
|
8641
8615
|
r.beforeUnmount();
|
|
8642
|
-
}), () =>
|
|
8616
|
+
}), () => Ee(Pi, {}, n);
|
|
8643
8617
|
}
|
|
8644
8618
|
});
|
|
8645
8619
|
}
|
|
8646
|
-
function
|
|
8620
|
+
function ki({ relationGraphCore: r, options: i, emitProxy: e } = {}) {
|
|
8647
8621
|
const t = qt(r, !0), n = vt(t), o = Ti(t, {
|
|
8648
8622
|
options: i,
|
|
8649
8623
|
emitProxy: e
|
|
@@ -8656,10 +8630,9 @@ function Ri({ relationGraphCore: r, options: i, emitProxy: e } = {}) {
|
|
|
8656
8630
|
}
|
|
8657
8631
|
},
|
|
8658
8632
|
setup(a, { attrs: l, slots: c }) {
|
|
8659
|
-
return
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
default: () => De(o, a, c)
|
|
8633
|
+
return ae(() => {
|
|
8634
|
+
}), () => Ee(n, {}, {
|
|
8635
|
+
default: () => Ee(o, a, c)
|
|
8663
8636
|
});
|
|
8664
8637
|
}
|
|
8665
8638
|
});
|
|
@@ -8670,7 +8643,7 @@ function Ri({ relationGraphCore: r, options: i, emitProxy: e } = {}) {
|
|
|
8670
8643
|
graphInstance: t
|
|
8671
8644
|
};
|
|
8672
8645
|
}
|
|
8673
|
-
const
|
|
8646
|
+
const Ri = /* @__PURE__ */ G({
|
|
8674
8647
|
__name: "RelationLinker",
|
|
8675
8648
|
props: {
|
|
8676
8649
|
options: {},
|
|
@@ -8679,22 +8652,22 @@ const ki = /* @__PURE__ */ G({
|
|
|
8679
8652
|
},
|
|
8680
8653
|
emits: ["onReady", "onNodeClick", "onNodeExpand", "onNodeCollapse", "onLineClick", "onNodeDragStart", "onNodeDragEnd", "onNodeDragging", "onCanvasDragEnd", "onCanvasDragging", "onContextmenu", "onFullscreen", "onCanvasClick", "onCanvasSelectionEnd", "beforeZoomStart", "onZoomEnd", "onViewResize", "onResizeStart", "beforeNodeResize", "onResizeEnd", "onLineVertexDropped", "beforeCreateLine", "onLineBeCreated", "beforeAddNodes", "beforeAddLines", "onKeyboardDown", "onKeyboardUp", "onCanvasDragStart", "onForceLayoutFinish", "beforeScrollStart"],
|
|
8681
8654
|
setup(r, { emit: i }) {
|
|
8682
|
-
const e = r, t = i, { RelationLinker: n } =
|
|
8655
|
+
const e = r, t = i, { RelationLinker: n } = ki({
|
|
8683
8656
|
options: e.options,
|
|
8684
8657
|
relationGraphCore: e.relationGraphCore,
|
|
8685
8658
|
emitProxy: t
|
|
8686
8659
|
});
|
|
8687
|
-
return
|
|
8660
|
+
return (o, s) => (R(), re(Me(n), {
|
|
8688
8661
|
lines: e.lines
|
|
8689
8662
|
}, {
|
|
8690
8663
|
view: ne(() => [
|
|
8691
|
-
|
|
8664
|
+
B(o.$slots, "view")
|
|
8692
8665
|
]),
|
|
8693
8666
|
line: ne((a) => [
|
|
8694
|
-
|
|
8667
|
+
B(o.$slots, "line", le(de(a)))
|
|
8695
8668
|
]),
|
|
8696
8669
|
default: ne(() => [
|
|
8697
|
-
|
|
8670
|
+
B(o.$slots, "default")
|
|
8698
8671
|
]),
|
|
8699
8672
|
_: 3
|
|
8700
8673
|
}, 8, ["lines"]));
|
|
@@ -8707,27 +8680,27 @@ const ki = /* @__PURE__ */ G({
|
|
|
8707
8680
|
},
|
|
8708
8681
|
setup(r) {
|
|
8709
8682
|
const i = r, e = jt(i.relationGraphCore, i.forLinker), t = vt(e);
|
|
8710
|
-
return (n, o) => (
|
|
8683
|
+
return (n, o) => (R(), re(Me(t), null, {
|
|
8711
8684
|
default: ne(() => [
|
|
8712
|
-
|
|
8685
|
+
B(n.$slots, "default")
|
|
8713
8686
|
]),
|
|
8714
8687
|
_: 3
|
|
8715
8688
|
}));
|
|
8716
8689
|
}
|
|
8717
|
-
}), Si = ["data-id"], Ii = { class: "rg-node-text" },
|
|
8690
|
+
}), Si = ["data-id"], Ii = { class: "rg-node-text" }, Ei = /* @__PURE__ */ G({
|
|
8718
8691
|
__name: "RGFakeNode",
|
|
8719
8692
|
props: {
|
|
8720
8693
|
node: {}
|
|
8721
8694
|
},
|
|
8722
8695
|
setup(r) {
|
|
8723
|
-
const i = r, e = ee(), t = W(), n =
|
|
8696
|
+
const i = r, e = ee(), t = W(), n = D(() => t.dataStores.optionsRef.value), o = D(() => i.node.borderColor), s = D(() => n.value.draggingNodeId === i.node.id), a = D(() => i.node.borderWidth === void 0 ? void 0 : i.node.borderWidth + "px"), l = D(() => i.node.width ? i.node.width + "px" : void 0), c = D(() => i.node.height ? i.node.height + "px" : void 0), d = (h) => {
|
|
8724
8697
|
t.onNodeDragStart(i.node, h);
|
|
8725
8698
|
};
|
|
8726
8699
|
return ae(() => {
|
|
8727
8700
|
t.addNodeResizeListener(e.value, i.node);
|
|
8728
|
-
}),
|
|
8701
|
+
}), De(() => {
|
|
8729
8702
|
t.removeNodeResizeListener(e.value);
|
|
8730
|
-
}), (h, u) => (
|
|
8703
|
+
}), (h, u) => (R(), E("div", {
|
|
8731
8704
|
ref_key: "nodePeelRef",
|
|
8732
8705
|
ref: e,
|
|
8733
8706
|
style: te({
|
|
@@ -8745,7 +8718,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
8745
8718
|
"--rg-node-border-radius": h.node.borderRadius && h.node.borderRadius + "px",
|
|
8746
8719
|
"--rg-node-border-color": o.value
|
|
8747
8720
|
}),
|
|
8748
|
-
class:
|
|
8721
|
+
class: Q(["rg-node-peel", [
|
|
8749
8722
|
h.node.selected && "rg-node-selected",
|
|
8750
8723
|
s.value && "rg-node-dragging",
|
|
8751
8724
|
h.node.id === n.value.checkedNodeId && "rg-node-checked",
|
|
@@ -8760,7 +8733,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
8760
8733
|
onMousedown: u[0] || (u[0] = ge((g) => d(g), ["left", "stop"])),
|
|
8761
8734
|
onTouchstart: u[1] || (u[1] = ge((g) => d(g), ["stop"]))
|
|
8762
8735
|
}, [
|
|
8763
|
-
|
|
8736
|
+
B(h.$slots, "default", {}, () => [
|
|
8764
8737
|
I("div", Ii, [
|
|
8765
8738
|
I("span", null, ue(h.node.text), 1)
|
|
8766
8739
|
])
|
|
@@ -8768,10 +8741,10 @@ const ki = /* @__PURE__ */ G({
|
|
|
8768
8741
|
], 32)
|
|
8769
8742
|
], 14, Si));
|
|
8770
8743
|
}
|
|
8771
|
-
}),
|
|
8744
|
+
}), Di = { class: "c-debug-tools-row" }, Ai = /* @__PURE__ */ G({
|
|
8772
8745
|
__name: "RGDebugView",
|
|
8773
8746
|
setup(r) {
|
|
8774
|
-
const i = W(), e =
|
|
8747
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value), t = ee(!1), n = () => {
|
|
8775
8748
|
t.value = !t.value;
|
|
8776
8749
|
}, o = () => {
|
|
8777
8750
|
i.printOptions();
|
|
@@ -8780,14 +8753,14 @@ const ki = /* @__PURE__ */ G({
|
|
|
8780
8753
|
}, a = () => {
|
|
8781
8754
|
i.enableDebugLog(!i.options.debug), x("debugLog:", i.options.debug);
|
|
8782
8755
|
};
|
|
8783
|
-
return (l, c) => (
|
|
8756
|
+
return (l, c) => (R(), E("div", null, [
|
|
8784
8757
|
I("div", {
|
|
8785
|
-
class:
|
|
8758
|
+
class: Q([[], "rg-setting-panel-button"]),
|
|
8786
8759
|
onClick: n
|
|
8787
8760
|
}, " Debug "),
|
|
8788
|
-
t.value ? (
|
|
8761
|
+
t.value ? (R(), E("div", {
|
|
8789
8762
|
key: 0,
|
|
8790
|
-
class:
|
|
8763
|
+
class: Q([[], "rg-setting-panel"])
|
|
8791
8764
|
}, [
|
|
8792
8765
|
I("div", { class: "c-debug-tools-row" }, [
|
|
8793
8766
|
I("button", { onClick: o }, "print options in console")
|
|
@@ -8795,11 +8768,11 @@ const ki = /* @__PURE__ */ G({
|
|
|
8795
8768
|
I("div", { class: "c-debug-tools-row" }, [
|
|
8796
8769
|
I("button", { onClick: s }, "print json data in console")
|
|
8797
8770
|
]),
|
|
8798
|
-
I("div",
|
|
8771
|
+
I("div", Di, [
|
|
8799
8772
|
Ot("debug log status: " + ue(e.value.debug) + " ", 1),
|
|
8800
8773
|
I("button", { onClick: a }, ue(e.value.debug ? "disable" : "enable") + " debug log", 1)
|
|
8801
8774
|
]),
|
|
8802
|
-
|
|
8775
|
+
B(l.$slots, "default")
|
|
8803
8776
|
])) : Y("", !0)
|
|
8804
8777
|
]));
|
|
8805
8778
|
}
|
|
@@ -8811,7 +8784,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
8811
8784
|
positionV: {}
|
|
8812
8785
|
},
|
|
8813
8786
|
setup(r) {
|
|
8814
|
-
const i = W(), e =
|
|
8787
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value);
|
|
8815
8788
|
ae(() => {
|
|
8816
8789
|
});
|
|
8817
8790
|
const t = () => {
|
|
@@ -8827,8 +8800,8 @@ const ki = /* @__PURE__ */ G({
|
|
|
8827
8800
|
}, a = () => {
|
|
8828
8801
|
i.fullscreen();
|
|
8829
8802
|
};
|
|
8830
|
-
return (l, c) => (
|
|
8831
|
-
class:
|
|
8803
|
+
return (l, c) => (R(), E("div", {
|
|
8804
|
+
class: Q(["rg-toolbar", [
|
|
8832
8805
|
"rg-toolbar-h-" + (l.positionH || e.value.toolBarPositionH),
|
|
8833
8806
|
"rg-toolbar-v-" + (l.positionV || e.value.toolBarPositionV),
|
|
8834
8807
|
"rg-toolbar-" + (l.direction || e.value.toolBarDirection)
|
|
@@ -8858,17 +8831,17 @@ const ki = /* @__PURE__ */ G({
|
|
|
8858
8831
|
}, [
|
|
8859
8832
|
oe(he, { "icon-name": "icon-suoxiao" })
|
|
8860
8833
|
]),
|
|
8861
|
-
e.value.layout.supportAutoLayout ? (
|
|
8834
|
+
e.value.layout.supportAutoLayout ? (R(), E("div", {
|
|
8862
8835
|
key: 0,
|
|
8863
8836
|
title: e.value.layout.autoLayouting ? "\u70B9\u51FB\u505C\u6B62\u81EA\u52A8\u5E03\u5C40" : "\u70B9\u51FB\u5F00\u59CB\u81EA\u52A8\u8C03\u6574\u5E03\u5C40",
|
|
8864
|
-
class:
|
|
8837
|
+
class: Q([{ "rg-mb-button-on": e.value.layout.autoLayouting }, "rg-mb-button"]),
|
|
8865
8838
|
onClick: n
|
|
8866
8839
|
}, [
|
|
8867
|
-
e.value.layout.autoLayouting ? (
|
|
8840
|
+
e.value.layout.autoLayouting ? (R(), re(he, {
|
|
8868
8841
|
key: 1,
|
|
8869
8842
|
"icon-name": "icon-lianjiezhong",
|
|
8870
8843
|
"class-name": "rg-loading-icon"
|
|
8871
|
-
})) : (
|
|
8844
|
+
})) : (R(), re(he, {
|
|
8872
8845
|
key: 0,
|
|
8873
8846
|
"icon-name": "icon-zidong"
|
|
8874
8847
|
}))
|
|
@@ -8879,11 +8852,11 @@ const ki = /* @__PURE__ */ G({
|
|
|
8879
8852
|
}, [
|
|
8880
8853
|
oe(he, { "icon-name": "icon-ico_reset" })
|
|
8881
8854
|
]),
|
|
8882
|
-
|
|
8855
|
+
B(l.$slots, "default"),
|
|
8883
8856
|
c[3] || (c[3] = I("div", { style: { clear: "both" } }, null, -1))
|
|
8884
8857
|
], 2));
|
|
8885
8858
|
}
|
|
8886
|
-
}),
|
|
8859
|
+
}), Bi = /* @__PURE__ */ G({
|
|
8887
8860
|
__name: "GraphBackground",
|
|
8888
8861
|
props: {
|
|
8889
8862
|
forImage: { type: Boolean, default: !0 },
|
|
@@ -8891,23 +8864,23 @@ const ki = /* @__PURE__ */ G({
|
|
|
8891
8864
|
},
|
|
8892
8865
|
setup(r) {
|
|
8893
8866
|
const i = W(), e = r;
|
|
8894
|
-
|
|
8867
|
+
D(() => i.dataStores.optionsRef.value);
|
|
8895
8868
|
const t = ee();
|
|
8896
8869
|
return ae(() => {
|
|
8897
8870
|
i.setBackgroundDom(t.value, e.forImage, e.forDisplay);
|
|
8898
8871
|
}), He(() => {
|
|
8899
8872
|
i.setBackgroundDom(null, e.forImage, e.forDisplay);
|
|
8900
|
-
}), (n, o) => Se((
|
|
8873
|
+
}), (n, o) => Se((R(), E("div", {
|
|
8901
8874
|
class: "rg-background",
|
|
8902
8875
|
ref_key: "$backgroundRef",
|
|
8903
8876
|
ref: t
|
|
8904
8877
|
}, [
|
|
8905
|
-
|
|
8878
|
+
B(n.$slots, "default")
|
|
8906
8879
|
], 512)), [
|
|
8907
8880
|
[Ie, n.forDisplay !== !1]
|
|
8908
8881
|
]);
|
|
8909
8882
|
}
|
|
8910
|
-
}),
|
|
8883
|
+
}), Xi = /* @__PURE__ */ G({
|
|
8911
8884
|
__name: "GraphWatermark",
|
|
8912
8885
|
props: {
|
|
8913
8886
|
forImage: { type: Boolean, default: !0 },
|
|
@@ -8917,7 +8890,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
8917
8890
|
height: {}
|
|
8918
8891
|
},
|
|
8919
8892
|
setup(r) {
|
|
8920
|
-
const i = W(), e = r, t =
|
|
8893
|
+
const i = W(), e = r, t = D(() => i.dataStores.optionsRef.value), n = D(() => {
|
|
8921
8894
|
let s = !1;
|
|
8922
8895
|
return t.value.snapshotting ? e.forImage === !1 ? s = !1 : s = !0 : e.forDisplay === !0 ? s = !0 : s = !1, s;
|
|
8923
8896
|
}), o = ee();
|
|
@@ -8925,8 +8898,8 @@ const ki = /* @__PURE__ */ G({
|
|
|
8925
8898
|
i.setWatermarkDom(o.value, e.forImage, e.forDisplay, e.position);
|
|
8926
8899
|
}), He(() => {
|
|
8927
8900
|
i.setWatermarkDom(null, e.forImage, e.forDisplay);
|
|
8928
|
-
}), (s, a) => Se((
|
|
8929
|
-
class:
|
|
8901
|
+
}), (s, a) => Se((R(), E("div", {
|
|
8902
|
+
class: Q(["rg-watermark", ["rg-watermark-" + (s.position || "br")]]),
|
|
8930
8903
|
ref_key: "$watermarkRef",
|
|
8931
8904
|
ref: o,
|
|
8932
8905
|
style: te({
|
|
@@ -8934,7 +8907,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
8934
8907
|
"--watermark-height": s.height
|
|
8935
8908
|
})
|
|
8936
8909
|
}, [
|
|
8937
|
-
|
|
8910
|
+
B(s.$slots, "default")
|
|
8938
8911
|
], 6)), [
|
|
8939
8912
|
[Ie, n.value]
|
|
8940
8913
|
]);
|
|
@@ -8942,8 +8915,8 @@ const ki = /* @__PURE__ */ G({
|
|
|
8942
8915
|
}), Fi = /* @__PURE__ */ G({
|
|
8943
8916
|
__name: "RGEditingNodeController",
|
|
8944
8917
|
setup(r) {
|
|
8945
|
-
const i = W(), e =
|
|
8946
|
-
return (t, n) => e.value.editingController.show ? (
|
|
8918
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value);
|
|
8919
|
+
return (t, n) => e.value.editingController.show ? (R(), E("div", {
|
|
8947
8920
|
key: 0,
|
|
8948
8921
|
class: "rg-editing-ctrl",
|
|
8949
8922
|
style: te({
|
|
@@ -8952,7 +8925,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
8952
8925
|
transform: `translate(${e.value.editingController.x}px, ${e.value.editingController.y}px)`
|
|
8953
8926
|
})
|
|
8954
8927
|
}, [
|
|
8955
|
-
|
|
8928
|
+
B(t.$slots, "default")
|
|
8956
8929
|
], 4)) : Y("", !0);
|
|
8957
8930
|
}
|
|
8958
8931
|
}), Gi = { class: "rg-resize-ctl" }, $i = /* @__PURE__ */ G({
|
|
@@ -8963,46 +8936,46 @@ const ki = /* @__PURE__ */ G({
|
|
|
8963
8936
|
},
|
|
8964
8937
|
emits: ["beforeResizeStart"],
|
|
8965
8938
|
setup(r, { emit: i }) {
|
|
8966
|
-
const e = W(), t = i, n =
|
|
8939
|
+
const e = W(), t = i, n = D(() => e.dataStores.optionsRef.value), o = (s, a) => {
|
|
8967
8940
|
a.stopPropagation(), t("beforeResizeStart"), e.onResizeStart(s, a);
|
|
8968
8941
|
};
|
|
8969
|
-
return (s, a) => (
|
|
8970
|
-
n.value.editingController.width > 30 && !s.disableResizeWidth && !s.disableResizeHeight ? (
|
|
8942
|
+
return (s, a) => (R(), E("div", Gi, [
|
|
8943
|
+
n.value.editingController.width > 30 && !s.disableResizeWidth && !s.disableResizeHeight ? (R(), E("div", {
|
|
8971
8944
|
key: 0,
|
|
8972
8945
|
class: "rg-resize-ctl-handler rg-resize-ctl-tl",
|
|
8973
8946
|
onMousedown: a[0] || (a[0] = (l) => o("tl", l))
|
|
8974
8947
|
}, null, 32)) : Y("", !0),
|
|
8975
|
-
n.value.editingController.width > 30 && !s.disableResizeWidth && !s.disableResizeHeight ? (
|
|
8948
|
+
n.value.editingController.width > 30 && !s.disableResizeWidth && !s.disableResizeHeight ? (R(), E("div", {
|
|
8976
8949
|
key: 1,
|
|
8977
8950
|
class: "rg-resize-ctl-handler rg-resize-ctl-tr",
|
|
8978
8951
|
onMousedown: a[1] || (a[1] = (l) => o("tr", l))
|
|
8979
8952
|
}, null, 32)) : Y("", !0),
|
|
8980
|
-
n.value.editingController.width > 30 && !s.disableResizeWidth && !s.disableResizeHeight ? (
|
|
8953
|
+
n.value.editingController.width > 30 && !s.disableResizeWidth && !s.disableResizeHeight ? (R(), E("div", {
|
|
8981
8954
|
key: 2,
|
|
8982
8955
|
class: "rg-resize-ctl-handler rg-resize-ctl-bl",
|
|
8983
8956
|
onMousedown: a[2] || (a[2] = (l) => o("bl", l))
|
|
8984
8957
|
}, null, 32)) : Y("", !0),
|
|
8985
|
-
!s.disableResizeWidth && !s.disableResizeHeight ? (
|
|
8958
|
+
!s.disableResizeWidth && !s.disableResizeHeight ? (R(), E("div", {
|
|
8986
8959
|
key: 3,
|
|
8987
8960
|
class: "rg-resize-ctl-handler rg-resize-ctl-br",
|
|
8988
8961
|
onMousedown: a[3] || (a[3] = (l) => o("br", l))
|
|
8989
8962
|
}, null, 32)) : Y("", !0),
|
|
8990
|
-
(n.value.editingController.width > 60 || s.disableResizeWidth) && !s.disableResizeHeight ? (
|
|
8963
|
+
(n.value.editingController.width > 60 || s.disableResizeWidth) && !s.disableResizeHeight ? (R(), E("div", {
|
|
8991
8964
|
key: 4,
|
|
8992
8965
|
class: "rg-resize-ctl-handler rg-resize-ctl-t",
|
|
8993
8966
|
onMousedown: a[4] || (a[4] = (l) => o("t", l))
|
|
8994
8967
|
}, null, 32)) : Y("", !0),
|
|
8995
|
-
(n.value.editingController.width > 60 || s.disableResizeWidth) && !s.disableResizeHeight ? (
|
|
8968
|
+
(n.value.editingController.width > 60 || s.disableResizeWidth) && !s.disableResizeHeight ? (R(), E("div", {
|
|
8996
8969
|
key: 5,
|
|
8997
8970
|
class: "rg-resize-ctl-handler rg-resize-ctl-b",
|
|
8998
8971
|
onMousedown: a[5] || (a[5] = (l) => o("b", l))
|
|
8999
8972
|
}, null, 32)) : Y("", !0),
|
|
9000
|
-
(n.value.editingController.height > 60 || s.disableResizeHeight) && !s.disableResizeWidth ? (
|
|
8973
|
+
(n.value.editingController.height > 60 || s.disableResizeHeight) && !s.disableResizeWidth ? (R(), E("div", {
|
|
9001
8974
|
key: 6,
|
|
9002
8975
|
class: "rg-resize-ctl-handler rg-resize-ctl-l",
|
|
9003
8976
|
onMousedown: a[6] || (a[6] = (l) => o("l", l))
|
|
9004
8977
|
}, null, 32)) : Y("", !0),
|
|
9005
|
-
(n.value.editingController.height > 60 || s.disableResizeHeight) && !s.disableResizeWidth ? (
|
|
8978
|
+
(n.value.editingController.height > 60 || s.disableResizeHeight) && !s.disableResizeWidth ? (R(), E("div", {
|
|
9006
8979
|
key: 7,
|
|
9007
8980
|
class: "rg-resize-ctl-handler rg-resize-ctl-r",
|
|
9008
8981
|
onMousedown: a[7] || (a[7] = (l) => o("r", l))
|
|
@@ -9018,7 +8991,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9018
8991
|
className: {}
|
|
9019
8992
|
},
|
|
9020
8993
|
setup(r) {
|
|
9021
|
-
const i = W(), e =
|
|
8994
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value), t = ee(), n = ee();
|
|
9022
8995
|
ae(() => {
|
|
9023
8996
|
i.onMiniViewMounted(), i.setMiniViewCanvas(n.value);
|
|
9024
8997
|
}), He(() => {
|
|
@@ -9029,8 +9002,8 @@ const ki = /* @__PURE__ */ G({
|
|
|
9029
9002
|
}, s = (a) => {
|
|
9030
9003
|
i.resetByVisiableView(a);
|
|
9031
9004
|
};
|
|
9032
|
-
return (a, l) => (
|
|
9033
|
-
class:
|
|
9005
|
+
return (a, l) => (R(), E("div", {
|
|
9006
|
+
class: Q(["rg-miniview", [
|
|
9034
9007
|
"rg-miniview-" + (a.position || "br"),
|
|
9035
9008
|
a.$attrs.className
|
|
9036
9009
|
]]),
|
|
@@ -9046,7 +9019,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9046
9019
|
I("canvas", {
|
|
9047
9020
|
ref_key: "$rgMiniViewCanvas",
|
|
9048
9021
|
ref: n,
|
|
9049
|
-
class:
|
|
9022
|
+
class: Q({
|
|
9050
9023
|
"rg-mv-canvas-reset": e.value.miniViewVisibleHandle.emptyContent
|
|
9051
9024
|
}),
|
|
9052
9025
|
onClick: s
|
|
@@ -9069,10 +9042,10 @@ const ki = /* @__PURE__ */ G({
|
|
|
9069
9042
|
position: {}
|
|
9070
9043
|
},
|
|
9071
9044
|
setup(r) {
|
|
9072
|
-
return (i, e) => (
|
|
9073
|
-
class:
|
|
9045
|
+
return (i, e) => (R(), E("div", {
|
|
9046
|
+
class: Q(["rg-editing-bar", ["rg-editing-bar-" + (i.position || "top")]])
|
|
9074
9047
|
}, [
|
|
9075
|
-
|
|
9048
|
+
B(i.$slots, "default")
|
|
9076
9049
|
], 2));
|
|
9077
9050
|
}
|
|
9078
9051
|
}), Ui = {
|
|
@@ -9082,7 +9055,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9082
9055
|
key: 0,
|
|
9083
9056
|
class: "rg-edt-ctrl-svg",
|
|
9084
9057
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9085
|
-
}, ji = ["d"], qi = ["d"], Zi = ["onMousedown", "onTouchstart"],
|
|
9058
|
+
}, ji = ["d"], qi = ["d"], Zi = ["onMousedown", "onTouchstart"], Qi = { key: 0 }, Ki = {
|
|
9086
9059
|
key: 1,
|
|
9087
9060
|
class: "empty-text"
|
|
9088
9061
|
}, es = ["value"], ts = /* @__PURE__ */ G({
|
|
@@ -9093,58 +9066,58 @@ const ki = /* @__PURE__ */ G({
|
|
|
9093
9066
|
},
|
|
9094
9067
|
emits: ["onMoveLineVertexStart", "onMoveLineVertexEnd", "onLinePathChanged", "onLineTextDragEnd", "onLineTextChanged"],
|
|
9095
9068
|
setup(r, { emit: i }) {
|
|
9096
|
-
const e = W(), t =
|
|
9097
|
-
var
|
|
9098
|
-
return (
|
|
9099
|
-
}), a =
|
|
9069
|
+
const e = W(), t = D(() => e.dataStores.optionsRef.value), n = D(() => t.value.editingLineController), o = D(() => n.value.line), s = D(() => {
|
|
9070
|
+
var _;
|
|
9071
|
+
return (_ = n.value.line) == null ? void 0 : _.lineShape;
|
|
9072
|
+
}), a = D(() => n.value.ctrlPoint1), l = D(() => n.value.ctrlPoint2), c = D(() => `M ${n.value.startPoint.x} ${n.value.startPoint.y} L ${a.value.x} ${a.value.y}`), d = D(() => `M ${n.value.endPoint.x} ${n.value.endPoint.y} L ${l.value.x} ${l.value.y}`), h = D(() => n.value.line44Splits), u = D(() => o.value && o.value.text), g = ee(""), f = ee(!1);
|
|
9100
9073
|
let p = ee(0);
|
|
9101
9074
|
const y = i;
|
|
9102
|
-
lt(u, (
|
|
9103
|
-
|
|
9075
|
+
lt(u, (_) => {
|
|
9076
|
+
_ !== g.value && (g.value = _, ot(() => {
|
|
9104
9077
|
e.updateEditingLineView();
|
|
9105
9078
|
}));
|
|
9106
|
-
}), lt(s, (
|
|
9079
|
+
}), lt(s, (_) => {
|
|
9107
9080
|
ot(() => {
|
|
9108
9081
|
e.updateEditingLineView();
|
|
9109
9082
|
});
|
|
9110
9083
|
});
|
|
9111
|
-
const v = (
|
|
9112
|
-
e.startMoveLine6CtrlPoint(
|
|
9113
|
-
y("onLinePathChanged", P,
|
|
9084
|
+
const v = (_, N) => {
|
|
9085
|
+
e.startMoveLine6CtrlPoint(_, N, (P) => {
|
|
9086
|
+
y("onLinePathChanged", P, _);
|
|
9114
9087
|
});
|
|
9115
|
-
}, m = (
|
|
9116
|
-
e.startMoveLine44CtrlPoint(
|
|
9117
|
-
y("onLinePathChanged", P,
|
|
9088
|
+
}, m = (_, N) => {
|
|
9089
|
+
e.startMoveLine44CtrlPoint(_, N, (P) => {
|
|
9090
|
+
y("onLinePathChanged", P, _);
|
|
9118
9091
|
});
|
|
9119
|
-
},
|
|
9092
|
+
}, C = (_, N) => {
|
|
9120
9093
|
const P = t.value.editingLineController.line;
|
|
9121
|
-
y("onMoveLineVertexStart",
|
|
9122
|
-
y("onMoveLineVertexEnd", M,
|
|
9094
|
+
y("onMoveLineVertexStart", _, P), e.startMoveLineVertex(_, N, (M, k, S) => {
|
|
9095
|
+
y("onMoveLineVertexEnd", M, k, S), e.defaultLineVertexBeChangedHandler(M, k, S);
|
|
9123
9096
|
});
|
|
9124
|
-
},
|
|
9125
|
-
e.startMoveLineText(
|
|
9097
|
+
}, b = (_) => {
|
|
9098
|
+
e.startMoveLineText(_, () => {
|
|
9126
9099
|
const N = t.value.editingLineController.line;
|
|
9127
9100
|
y("onLineTextDragEnd", N);
|
|
9128
9101
|
});
|
|
9129
|
-
}, T = (
|
|
9102
|
+
}, T = (_) => {
|
|
9130
9103
|
p.value && Date.now() - p.value < 500 && (f.value = !0, ot(() => {
|
|
9131
|
-
|
|
9104
|
+
_.target.focus();
|
|
9132
9105
|
})), p.value = Date.now();
|
|
9133
|
-
}, O = (
|
|
9106
|
+
}, O = (_) => {
|
|
9134
9107
|
const N = o.value;
|
|
9135
|
-
N && N.text !==
|
|
9136
|
-
text:
|
|
9108
|
+
N && N.text !== _.target.value && (e.updateLine(N.id, {
|
|
9109
|
+
text: _.target.value
|
|
9137
9110
|
}), y("onLineTextChanged", N)), f.value = !1;
|
|
9138
9111
|
};
|
|
9139
|
-
return (
|
|
9140
|
-
|
|
9141
|
-
|
|
9112
|
+
return (_, N) => n.value.show ? (R(), E("div", Ui, [
|
|
9113
|
+
B(_.$slots, "default"),
|
|
9114
|
+
_.pathEditable ? (R(), E("svg", Ji, [
|
|
9142
9115
|
I("g", null, [
|
|
9143
|
-
o.value.lineShape === 6 && a.value ? (
|
|
9116
|
+
o.value.lineShape === 6 && a.value ? (R(), E("path", {
|
|
9144
9117
|
key: 0,
|
|
9145
9118
|
d: c.value
|
|
9146
9119
|
}, null, 8, ji)) : Y("", !0),
|
|
9147
|
-
o.value.lineShape === 6 && l.value ? (
|
|
9120
|
+
o.value.lineShape === 6 && l.value ? (R(), E("path", {
|
|
9148
9121
|
key: 1,
|
|
9149
9122
|
d: d.value
|
|
9150
9123
|
}, null, 8, qi)) : Y("", !0)
|
|
@@ -9156,8 +9129,8 @@ const ki = /* @__PURE__ */ G({
|
|
|
9156
9129
|
"--rg-ctl-x": n.value.startPoint.x + "px",
|
|
9157
9130
|
"--rg-ctl-y": n.value.startPoint.y + "px"
|
|
9158
9131
|
}),
|
|
9159
|
-
onMousedown: N[0] || (N[0] = ge((P) =>
|
|
9160
|
-
onTouchstart: N[1] || (N[1] = (P) =>
|
|
9132
|
+
onMousedown: N[0] || (N[0] = ge((P) => C("start", P), ["left"])),
|
|
9133
|
+
onTouchstart: N[1] || (N[1] = (P) => C("start", P))
|
|
9161
9134
|
}, null, 36),
|
|
9162
9135
|
I("div", {
|
|
9163
9136
|
class: "rg-line-ctrl-dot end-dot",
|
|
@@ -9165,10 +9138,10 @@ const ki = /* @__PURE__ */ G({
|
|
|
9165
9138
|
"--rg-ctl-x": n.value.endPoint.x + "px",
|
|
9166
9139
|
"--rg-ctl-y": n.value.endPoint.y + "px"
|
|
9167
9140
|
}),
|
|
9168
|
-
onMousedown: N[2] || (N[2] = ge((P) =>
|
|
9169
|
-
onTouchstart: N[3] || (N[3] = (P) =>
|
|
9141
|
+
onMousedown: N[2] || (N[2] = ge((P) => C("end", P), ["left"])),
|
|
9142
|
+
onTouchstart: N[3] || (N[3] = (P) => C("end", P))
|
|
9170
9143
|
}, null, 36),
|
|
9171
|
-
|
|
9144
|
+
_.pathEditable && o.value.lineShape === 6 && a.value ? (R(), E("div", {
|
|
9172
9145
|
key: 1,
|
|
9173
9146
|
class: "rg-line-ctrl-dot ctrl-dot",
|
|
9174
9147
|
style: te({
|
|
@@ -9178,7 +9151,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9178
9151
|
onMousedown: N[4] || (N[4] = ge((P) => v(0, P), ["left"])),
|
|
9179
9152
|
onTouchstart: N[5] || (N[5] = (P) => v(0, P))
|
|
9180
9153
|
}, null, 36)) : Y("", !0),
|
|
9181
|
-
|
|
9154
|
+
_.pathEditable && o.value.lineShape === 6 && l.value ? (R(), E("div", {
|
|
9182
9155
|
key: 2,
|
|
9183
9156
|
class: "rg-line-ctrl-dot ctrl-dot",
|
|
9184
9157
|
style: te({
|
|
@@ -9188,10 +9161,10 @@ const ki = /* @__PURE__ */ G({
|
|
|
9188
9161
|
onMousedown: N[6] || (N[6] = ge((P) => v(1, P), ["left"])),
|
|
9189
9162
|
onTouchstart: N[7] || (N[7] = (P) => v(1, P))
|
|
9190
9163
|
}, null, 36)) : Y("", !0),
|
|
9191
|
-
|
|
9192
|
-
P.hide ? Y("", !0) : (
|
|
9164
|
+
_.pathEditable && (o.value.lineShape === 44 || o.value.lineShape === 49) ? (R(!0), E(xe, { key: 3 }, tt(h.value, (P) => (R(), E(xe, null, [
|
|
9165
|
+
P.hide ? Y("", !0) : (R(), E("div", {
|
|
9193
9166
|
key: P.optionName,
|
|
9194
|
-
class:
|
|
9167
|
+
class: Q(["rg-line-ctrl-dot ctrl-split", {
|
|
9195
9168
|
"ctrl-split-core": !P.optionName.startsWith("cp-"),
|
|
9196
9169
|
"ctrl-split-v": P.direction === "v",
|
|
9197
9170
|
"ctrl-split-h": P.direction === "h"
|
|
@@ -9204,37 +9177,37 @@ const ki = /* @__PURE__ */ G({
|
|
|
9204
9177
|
onTouchstart: (M) => m(P, M)
|
|
9205
9178
|
}, null, 46, Zi))
|
|
9206
9179
|
], 64))), 256)) : Y("", !0),
|
|
9207
|
-
|
|
9180
|
+
_.textEditable && o.value ? (R(), E("div", {
|
|
9208
9181
|
key: 4,
|
|
9209
|
-
class:
|
|
9182
|
+
class: Q(["rg-line-ctrl-text", f.value && "rg-line-ctrl-text-editing"]),
|
|
9210
9183
|
style: te({
|
|
9211
9184
|
"--rg-ctl-x": n.value.text.x + "px",
|
|
9212
9185
|
"--rg-ctl-y": n.value.text.y + "px"
|
|
9213
9186
|
}),
|
|
9214
9187
|
onClick: T,
|
|
9215
|
-
onMousedown: N[8] || (N[8] = (P) =>
|
|
9216
|
-
onTouchstart: N[9] || (N[9] = (P) =>
|
|
9188
|
+
onMousedown: N[8] || (N[8] = (P) => b(P)),
|
|
9189
|
+
onTouchstart: N[9] || (N[9] = (P) => b(P))
|
|
9217
9190
|
}, [
|
|
9218
|
-
f.value ? (
|
|
9191
|
+
f.value ? (R(), E("input", {
|
|
9219
9192
|
key: 1,
|
|
9220
9193
|
ref: "inputRef",
|
|
9221
9194
|
class: "rg-line-text-input",
|
|
9222
9195
|
value: g.value,
|
|
9223
9196
|
onBlur: O
|
|
9224
|
-
}, null, 40, es)) : (
|
|
9225
|
-
g.value ? (
|
|
9197
|
+
}, null, 40, es)) : (R(), E(xe, { key: 0 }, [
|
|
9198
|
+
g.value ? (R(), E("p", Qi, ue(g.value), 1)) : (R(), E("p", Ki, "Add Text..."))
|
|
9226
9199
|
], 64))
|
|
9227
9200
|
], 38)) : Y("", !0)
|
|
9228
9201
|
])) : Y("", !0);
|
|
9229
9202
|
}
|
|
9230
|
-
}),
|
|
9203
|
+
}), Kt = /* @__PURE__ */ G({
|
|
9231
9204
|
__name: "RGEditingConnectPoints",
|
|
9232
9205
|
props: {
|
|
9233
9206
|
mouseUpOnJunctionPoint: { type: Function },
|
|
9234
9207
|
mouseUpOnJunctionPointWithOffset: { type: Function }
|
|
9235
9208
|
},
|
|
9236
9209
|
setup(r) {
|
|
9237
|
-
return (i, e) => (
|
|
9210
|
+
return (i, e) => (R(), E("div", {
|
|
9238
9211
|
class: "rg-connect-ctl",
|
|
9239
9212
|
onMouseup: e[15] || (e[15] = (t) => i.mouseUpOnJunctionPointWithOffset("", t)),
|
|
9240
9213
|
onTouchend: e[16] || (e[16] = (t) => i.mouseUpOnJunctionPointWithOffset("", t))
|
|
@@ -9307,7 +9280,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9307
9280
|
}), ns = /* @__PURE__ */ G({
|
|
9308
9281
|
__name: "RGEditingConnectController",
|
|
9309
9282
|
setup(r) {
|
|
9310
|
-
const i = W(), e =
|
|
9283
|
+
const i = W(), e = D(() => i.dataStores.optionsRef.value), t = ee(), n = (s, a) => {
|
|
9311
9284
|
i.onLineVertexBeDroppedOnConnectController(s, a, void 0, (l, c, d) => {
|
|
9312
9285
|
x("onLineVertexBeDropped:callback:", d);
|
|
9313
9286
|
});
|
|
@@ -9316,7 +9289,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9316
9289
|
x("onLineVertexBeDropped:callback:", d);
|
|
9317
9290
|
});
|
|
9318
9291
|
};
|
|
9319
|
-
return (s, a) => e.value.nodeConnectController.show ? (
|
|
9292
|
+
return (s, a) => e.value.nodeConnectController.show ? (R(), E("div", {
|
|
9320
9293
|
key: 0,
|
|
9321
9294
|
class: "rg-editing-connect-ctrl",
|
|
9322
9295
|
ref_key: "connectBoxRef",
|
|
@@ -9327,11 +9300,11 @@ const ki = /* @__PURE__ */ G({
|
|
|
9327
9300
|
height: e.value.nodeConnectController.height + "px"
|
|
9328
9301
|
})
|
|
9329
9302
|
}, [
|
|
9330
|
-
|
|
9303
|
+
B(s.$slots, "default", {
|
|
9331
9304
|
mouseUpOnJunctionPoint: n,
|
|
9332
9305
|
mouseUpOnJunctionPointWithOffset: o
|
|
9333
9306
|
}, () => [
|
|
9334
|
-
oe(
|
|
9307
|
+
oe(Kt, {
|
|
9335
9308
|
mouseUpOnJunctionPoint: n,
|
|
9336
9309
|
mouseUpOnJunctionPointWithOffset: o
|
|
9337
9310
|
})
|
|
@@ -9352,8 +9325,8 @@ const ki = /* @__PURE__ */ G({
|
|
|
9352
9325
|
n("onLineConnectEnd", l, c, d), e.defaultLineConnectEndHandler(l, c, d);
|
|
9353
9326
|
});
|
|
9354
9327
|
};
|
|
9355
|
-
return (a, l) => (
|
|
9356
|
-
class:
|
|
9328
|
+
return (a, l) => (R(), E("div", {
|
|
9329
|
+
class: Q(["rg-connect-source-handle", [
|
|
9357
9330
|
"rg-connect-ctl-handler",
|
|
9358
9331
|
"rg-connect-target",
|
|
9359
9332
|
a.$attrs.className
|
|
@@ -9362,7 +9335,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9362
9335
|
onMousedown: l[0] || (l[0] = (c) => s(c)),
|
|
9363
9336
|
onClick: o
|
|
9364
9337
|
}, [
|
|
9365
|
-
|
|
9338
|
+
B(a.$slots, "default")
|
|
9366
9339
|
], 38));
|
|
9367
9340
|
}
|
|
9368
9341
|
}), is = ["data-point", "data-target-id", "data-target-type", "data-target-data"], ss = ["data-point", "data-target-id", "data-target-type", "data-target-data"], as = /* @__PURE__ */ G({
|
|
@@ -9399,11 +9372,11 @@ const ki = /* @__PURE__ */ G({
|
|
|
9399
9372
|
n("onDragConnectEnd", h, u, g);
|
|
9400
9373
|
});
|
|
9401
9374
|
};
|
|
9402
|
-
return (c, d) => c.forSvg ? (
|
|
9375
|
+
return (c, d) => c.forSvg ? (R(), E("g", {
|
|
9403
9376
|
key: 0,
|
|
9404
9377
|
ref_key: "targetRef",
|
|
9405
9378
|
ref: o,
|
|
9406
|
-
class:
|
|
9379
|
+
class: Q([
|
|
9407
9380
|
"rg-connect-ctl-handler",
|
|
9408
9381
|
"rg-connect-target",
|
|
9409
9382
|
c.$attrs.className
|
|
@@ -9417,12 +9390,12 @@ const ki = /* @__PURE__ */ G({
|
|
|
9417
9390
|
onMouseup: d[0] || (d[0] = (h) => a(c.junctionPoint, h)),
|
|
9418
9391
|
onClick: s
|
|
9419
9392
|
}, [
|
|
9420
|
-
|
|
9421
|
-
], 46, is)) : (
|
|
9393
|
+
B(c.$slots, "default")
|
|
9394
|
+
], 46, is)) : (R(), E("div", {
|
|
9422
9395
|
key: 1,
|
|
9423
9396
|
ref_key: "targetRef",
|
|
9424
9397
|
ref: o,
|
|
9425
|
-
class:
|
|
9398
|
+
class: Q([
|
|
9426
9399
|
"rg-connect-ctl-handler",
|
|
9427
9400
|
"rg-connect-target",
|
|
9428
9401
|
c.$attrs.className
|
|
@@ -9436,7 +9409,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9436
9409
|
onMouseup: d[1] || (d[1] = (h) => a(c.junctionPoint, h)),
|
|
9437
9410
|
onClick: s
|
|
9438
9411
|
}, [
|
|
9439
|
-
|
|
9412
|
+
B(c.$slots, "default")
|
|
9440
9413
|
], 46, ss));
|
|
9441
9414
|
}
|
|
9442
9415
|
}), rs = { class: "rg-editing-referline" }, ls = { class: "referline" }, ds = { key: 0 }, cs = { class: "referline" }, hs = { key: 0 }, us = /* @__PURE__ */ G({
|
|
@@ -9446,12 +9419,12 @@ const ki = /* @__PURE__ */ G({
|
|
|
9446
9419
|
adsorption: { type: Boolean }
|
|
9447
9420
|
},
|
|
9448
9421
|
setup(r) {
|
|
9449
|
-
const i = W(), e = r, t =
|
|
9422
|
+
const i = W(), e = r, t = D(() => i.dataStores.optionsRef.value);
|
|
9450
9423
|
return ae(() => {
|
|
9451
9424
|
i.onReferenceLineMounted(e.adsorption);
|
|
9452
9425
|
}), He(() => {
|
|
9453
9426
|
i.onReferenceLineUnMounted();
|
|
9454
|
-
}), (n, o) => Se((
|
|
9427
|
+
}), (n, o) => Se((R(), E("div", rs, [
|
|
9455
9428
|
Se(I("div", {
|
|
9456
9429
|
class: "rg-referline rg-referline-v",
|
|
9457
9430
|
style: te({
|
|
@@ -9460,7 +9433,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9460
9433
|
})
|
|
9461
9434
|
}, [
|
|
9462
9435
|
I("div", ls, [
|
|
9463
|
-
n.showText !== !1 ? (
|
|
9436
|
+
n.showText !== !1 ? (R(), E("div", ds, ue(Math.round(t.value.editingReferenceLine.v_height)) + "px", 1)) : Y("", !0)
|
|
9464
9437
|
])
|
|
9465
9438
|
], 4), [
|
|
9466
9439
|
[Ie, t.value.editingReferenceLine.directionV]
|
|
@@ -9473,7 +9446,7 @@ const ki = /* @__PURE__ */ G({
|
|
|
9473
9446
|
})
|
|
9474
9447
|
}, [
|
|
9475
9448
|
I("div", cs, [
|
|
9476
|
-
n.showText !== !1 ? (
|
|
9449
|
+
n.showText !== !1 ? (R(), E("div", hs, ue(Math.round(t.value.editingReferenceLine.h_width)) + "px", 1)) : Y("", !0)
|
|
9477
9450
|
])
|
|
9478
9451
|
], 4), [
|
|
9479
9452
|
[Ie, t.value.editingReferenceLine.directionH]
|
|
@@ -9491,7 +9464,7 @@ function fs() {
|
|
|
9491
9464
|
optionsRef: r.dataStores.optionsRef
|
|
9492
9465
|
};
|
|
9493
9466
|
}
|
|
9494
|
-
function
|
|
9467
|
+
function ke() {
|
|
9495
9468
|
const r = W();
|
|
9496
9469
|
if (!r)
|
|
9497
9470
|
throw new Error("RGHooks.useGraphStore must be used inside RGProvider or RelationGraph tag.");
|
|
@@ -9502,30 +9475,30 @@ function ps() {
|
|
|
9502
9475
|
if (!r)
|
|
9503
9476
|
throw new Error("RGHooks.useGraphStore must be used inside RGProvider or RelationGraph tag.");
|
|
9504
9477
|
const i = r.dataStores.optionsRef;
|
|
9505
|
-
return
|
|
9478
|
+
return D(() => r.getCreatingLine(i.value));
|
|
9506
9479
|
}
|
|
9507
9480
|
function gs() {
|
|
9508
9481
|
const r = W();
|
|
9509
9482
|
if (!r)
|
|
9510
9483
|
throw new Error("RGHooks.useGraphStore must be used inside RGProvider or RelationGraph tag.");
|
|
9511
9484
|
const i = r.dataStores.optionsRef;
|
|
9512
|
-
return
|
|
9485
|
+
return D(() => r.getCreatingNode(i.value));
|
|
9513
9486
|
}
|
|
9514
9487
|
function ys() {
|
|
9515
|
-
const r =
|
|
9516
|
-
return
|
|
9488
|
+
const r = ke();
|
|
9489
|
+
return D(() => r.value.editingController);
|
|
9517
9490
|
}
|
|
9518
9491
|
function vs() {
|
|
9519
|
-
const r =
|
|
9520
|
-
return
|
|
9492
|
+
const r = ke();
|
|
9493
|
+
return D(() => r.value.editingLineController);
|
|
9521
9494
|
}
|
|
9522
9495
|
function ms() {
|
|
9523
|
-
const r =
|
|
9524
|
-
return
|
|
9496
|
+
const r = ke();
|
|
9497
|
+
return D(() => r.value.nodeConnectController);
|
|
9525
9498
|
}
|
|
9526
9499
|
function xs() {
|
|
9527
|
-
const r =
|
|
9528
|
-
return
|
|
9500
|
+
const r = ke();
|
|
9501
|
+
return D(() => ({
|
|
9529
9502
|
viewSize: r.value.viewSize,
|
|
9530
9503
|
canvasSize: r.value.canvasSize,
|
|
9531
9504
|
canvasOffset: r.value.canvasOffset,
|
|
@@ -9535,15 +9508,15 @@ function xs() {
|
|
|
9535
9508
|
}));
|
|
9536
9509
|
}
|
|
9537
9510
|
function Ls() {
|
|
9538
|
-
const r =
|
|
9539
|
-
return
|
|
9511
|
+
const r = ke();
|
|
9512
|
+
return D(() => ({
|
|
9540
9513
|
...r.value.selectionView,
|
|
9541
9514
|
show: r.value.creatingSelection
|
|
9542
9515
|
}));
|
|
9543
9516
|
}
|
|
9544
9517
|
function Cs() {
|
|
9545
|
-
const r =
|
|
9546
|
-
return
|
|
9518
|
+
const r = ke();
|
|
9519
|
+
return D(() => ({
|
|
9547
9520
|
checkedLineId: r.value.checkedLineId,
|
|
9548
9521
|
checkedNodeId: r.value.checkedNodeId,
|
|
9549
9522
|
draggingNodeId: r.value.draggingNodeId
|
|
@@ -9562,10 +9535,10 @@ function ws() {
|
|
|
9562
9535
|
}
|
|
9563
9536
|
const en = {
|
|
9564
9537
|
useGraphInstance: W,
|
|
9565
|
-
useRelationGraph:
|
|
9538
|
+
useRelationGraph: Qt,
|
|
9566
9539
|
useGraphStore: fs,
|
|
9567
9540
|
useGraphData: ws,
|
|
9568
|
-
useGraphOptions:
|
|
9541
|
+
useGraphOptions: ke,
|
|
9569
9542
|
useCreatingLine: ps,
|
|
9570
9543
|
useCreatingNode: gs,
|
|
9571
9544
|
useEditingNodes: ys,
|
|
@@ -9574,63 +9547,63 @@ const en = {
|
|
|
9574
9547
|
useSelection: Ls,
|
|
9575
9548
|
useConnectingNode: ms,
|
|
9576
9549
|
useCheckedItem: Cs
|
|
9577
|
-
},
|
|
9550
|
+
}, Ps = Tt, Ts = {
|
|
9578
9551
|
BaseLayout: Te,
|
|
9579
|
-
BidirectionalTreeLayout:
|
|
9552
|
+
BidirectionalTreeLayout: Xt,
|
|
9580
9553
|
CenterLayout: Ft,
|
|
9581
9554
|
CircleLayout: Gt,
|
|
9582
9555
|
FixedLayout: $t,
|
|
9583
9556
|
ForceLayout: Ue,
|
|
9584
9557
|
RGFolderLayout: Yt
|
|
9585
|
-
},
|
|
9558
|
+
}, ks = {
|
|
9586
9559
|
RGOptionsDataUtils: Vo,
|
|
9587
9560
|
RGLineDataUtils: co,
|
|
9588
9561
|
RGNodeDataUtils: ao,
|
|
9589
9562
|
RGGraphMath: se,
|
|
9590
9563
|
RGNodesAnalyticUtils: Ye,
|
|
9591
9564
|
RGEffectUtils: Oe
|
|
9592
|
-
}, Rs =
|
|
9565
|
+
}, Rs = Ei, Ms = Et, Ss = It, Is = Ai, Es = zi, Ds = Rt, As = Bt, Vs = Hi, zs = Bi, Bs = Xi, Xs = Fi, Fs = $i, Gs = Wi, $s = ts, Ys = ns, Hs = os, Ws = as, Us = Kt, Js = us, js = en, qs = en.useRelationGraph, Zs = Mi, Qs = Ri;
|
|
9593
9566
|
ht.install = (r) => {
|
|
9594
9567
|
r.component("RelationGraph", ht);
|
|
9595
9568
|
};
|
|
9596
9569
|
const Ks = ht;
|
|
9597
9570
|
export {
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9571
|
+
Os as INSTALLED_KEY,
|
|
9572
|
+
zs as RGBackground,
|
|
9573
|
+
Hs as RGConnectSource,
|
|
9574
|
+
Ws as RGConnectTarget,
|
|
9575
|
+
Is as RGDebugView,
|
|
9603
9576
|
Ln as RGDirection,
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9577
|
+
Ys as RGEditingConnectController,
|
|
9578
|
+
Us as RGEditingConnectPoints,
|
|
9579
|
+
$s as RGEditingLineController,
|
|
9580
|
+
Gs as RGEditingNearNodeWidget,
|
|
9608
9581
|
Xs as RGEditingNodeController,
|
|
9609
|
-
|
|
9610
|
-
|
|
9582
|
+
Js as RGEditingReferenceLine,
|
|
9583
|
+
Fs as RGEditingResize,
|
|
9611
9584
|
V as RGEventNames,
|
|
9612
9585
|
Zt as RGEventsDefine4Vue3,
|
|
9613
9586
|
Rs as RGFakeNode,
|
|
9614
|
-
|
|
9587
|
+
js as RGHooks,
|
|
9615
9588
|
z as RGInnerConnectTargetType,
|
|
9616
9589
|
Z as RGJunctionPoint,
|
|
9617
|
-
|
|
9618
|
-
|
|
9590
|
+
Ts as RGLayouts,
|
|
9591
|
+
Ms as RGLinePath,
|
|
9619
9592
|
j as RGLineShape,
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9593
|
+
Ss as RGLineText,
|
|
9594
|
+
As as RGMiniToolBar,
|
|
9595
|
+
Vs as RGMiniView,
|
|
9623
9596
|
Ds as RGNodeExpandHolder,
|
|
9624
9597
|
nt as RGNodeShape,
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9598
|
+
Zs as RGProvider,
|
|
9599
|
+
Es as RGToolBar,
|
|
9600
|
+
ks as RGUtils,
|
|
9601
|
+
Bs as RGWatermark,
|
|
9629
9602
|
Ks as RelationGraph,
|
|
9630
9603
|
yi as RelationGraphCore,
|
|
9631
9604
|
qe as RelationGraphProvideKey,
|
|
9632
|
-
|
|
9605
|
+
Qs as RelationLinker,
|
|
9633
9606
|
Ks as default,
|
|
9634
|
-
|
|
9635
|
-
|
|
9607
|
+
qs as useRelationGraph,
|
|
9608
|
+
Ps as version
|
|
9636
9609
|
};
|