@riil-frontend/component-topology 6.0.0-alpha.7 → 6.0.0-alpha.8
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.
@@ -439,14 +439,15 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
439
439
|
case 0:
|
440
440
|
id = group.id, tag = group.tag;
|
441
441
|
rlog.debug("bindGroupResources--id, tag", id, tag);
|
442
|
-
|
442
|
+
topo.historyManager.beginTransaction();
|
443
|
+
_context12.next = 5;
|
443
444
|
return resourceConfig.updateGroupResources(group, resources);
|
444
445
|
|
445
|
-
case
|
446
|
-
_context12.next =
|
446
|
+
case 5:
|
447
|
+
_context12.next = 7;
|
447
448
|
return editDispatchers.fetchDataByConfig();
|
448
449
|
|
449
|
-
case
|
450
|
+
case 7:
|
450
451
|
_yield$editDispatcher2 = _context12.sent;
|
451
452
|
elements = _yield$editDispatcher2.elements;
|
452
453
|
// 区域里的子区域及子区域的节点、新增的链路
|
@@ -462,7 +463,9 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
462
463
|
}
|
463
464
|
}
|
464
465
|
|
465
|
-
|
466
|
+
topo.historyManager.endTransaction();
|
467
|
+
|
468
|
+
case 14:
|
466
469
|
case "end":
|
467
470
|
return _context12.stop();
|
468
471
|
}
|
@@ -586,7 +589,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
586
589
|
layer: group,
|
587
590
|
newElements: newElements
|
588
591
|
});
|
589
|
-
topo.getHtTopo().addElements(newElements);
|
592
|
+
topo.getHtTopo().addElements(newElements);
|
593
|
+
topo.fitContent(false, 0); // 临时放这里,仅拓扑中心有
|
590
594
|
|
591
595
|
if (topo.linkDynamicStyleExecutor) {
|
592
596
|
topo.linkDynamicStyleExecutor.execute();
|
@@ -598,7 +602,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
598
602
|
resourceTabactiveKey: null
|
599
603
|
});
|
600
604
|
|
601
|
-
case
|
605
|
+
case 14:
|
602
606
|
case "end":
|
603
607
|
return _context15.stop();
|
604
608
|
}
|
@@ -652,6 +656,12 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
652
656
|
function getAddResourceDrawerMode() {
|
653
657
|
return getAddResourceType() === "addToFirstLayer" ? "new" : "all";
|
654
658
|
}
|
659
|
+
/**
|
660
|
+
* 未选中元素添加资源
|
661
|
+
*
|
662
|
+
* @param {*} data
|
663
|
+
*/
|
664
|
+
|
655
665
|
|
656
666
|
var onSaveComboRes = /*#__PURE__*/function () {
|
657
667
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(data) {
|
@@ -679,12 +689,13 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
679
689
|
return bindViewResources(data);
|
680
690
|
|
681
691
|
case 9:
|
692
|
+
topo.fitContent(false, 0);
|
682
693
|
topo.historyManager.endTransaction();
|
683
694
|
topoEditDispatchers.update({
|
684
695
|
resourceTabactiveKey: null
|
685
696
|
});
|
686
697
|
|
687
|
-
case
|
698
|
+
case 12:
|
688
699
|
case "end":
|
689
700
|
return _context7.stop();
|
690
701
|
}
|
@@ -22,7 +22,7 @@ import topoFactory from "./topoFactory";
|
|
22
22
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
23
23
|
import SelectionManager from "./SelectionManager"; // eslint-disable-next-line no-undef
|
24
24
|
|
25
|
-
var version = typeof "6.0.0-alpha.
|
25
|
+
var version = typeof "6.0.0-alpha.8" === 'string' ? "6.0.0-alpha.8" : null;
|
26
26
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
27
27
|
/**
|
28
28
|
* 拓扑显示和编辑
|
@@ -469,14 +469,15 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
469
469
|
|
470
470
|
_rlog["default"].debug("bindGroupResources--id, tag", id, tag);
|
471
471
|
|
472
|
-
|
472
|
+
topo.historyManager.beginTransaction();
|
473
|
+
_context12.next = 5;
|
473
474
|
return resourceConfig.updateGroupResources(group, resources);
|
474
475
|
|
475
|
-
case
|
476
|
-
_context12.next =
|
476
|
+
case 5:
|
477
|
+
_context12.next = 7;
|
477
478
|
return editDispatchers.fetchDataByConfig();
|
478
479
|
|
479
|
-
case
|
480
|
+
case 7:
|
480
481
|
_yield$editDispatcher2 = _context12.sent;
|
481
482
|
elements = _yield$editDispatcher2.elements;
|
482
483
|
// 区域里的子区域及子区域的节点、新增的链路
|
@@ -492,7 +493,9 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
492
493
|
}
|
493
494
|
}
|
494
495
|
|
495
|
-
|
496
|
+
topo.historyManager.endTransaction();
|
497
|
+
|
498
|
+
case 14:
|
496
499
|
case "end":
|
497
500
|
return _context12.stop();
|
498
501
|
}
|
@@ -618,7 +621,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
618
621
|
newElements: newElements
|
619
622
|
});
|
620
623
|
|
621
|
-
topo.getHtTopo().addElements(newElements);
|
624
|
+
topo.getHtTopo().addElements(newElements);
|
625
|
+
topo.fitContent(false, 0); // 临时放这里,仅拓扑中心有
|
622
626
|
|
623
627
|
if (topo.linkDynamicStyleExecutor) {
|
624
628
|
topo.linkDynamicStyleExecutor.execute();
|
@@ -630,7 +634,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
630
634
|
resourceTabactiveKey: null
|
631
635
|
});
|
632
636
|
|
633
|
-
case
|
637
|
+
case 14:
|
634
638
|
case "end":
|
635
639
|
return _context15.stop();
|
636
640
|
}
|
@@ -684,6 +688,12 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
684
688
|
function getAddResourceDrawerMode() {
|
685
689
|
return getAddResourceType() === "addToFirstLayer" ? "new" : "all";
|
686
690
|
}
|
691
|
+
/**
|
692
|
+
* 未选中元素添加资源
|
693
|
+
*
|
694
|
+
* @param {*} data
|
695
|
+
*/
|
696
|
+
|
687
697
|
|
688
698
|
var onSaveComboRes = /*#__PURE__*/function () {
|
689
699
|
var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(data) {
|
@@ -712,12 +722,13 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
712
722
|
return bindViewResources(data);
|
713
723
|
|
714
724
|
case 9:
|
725
|
+
topo.fitContent(false, 0);
|
715
726
|
topo.historyManager.endTransaction();
|
716
727
|
topoEditDispatchers.update({
|
717
728
|
resourceTabactiveKey: null
|
718
729
|
});
|
719
730
|
|
720
|
-
case
|
731
|
+
case 12:
|
721
732
|
case "end":
|
722
733
|
return _context7.stop();
|
723
734
|
}
|
@@ -52,7 +52,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
|
|
52
52
|
var _SelectionManager = _interopRequireDefault(require("./SelectionManager"));
|
53
53
|
|
54
54
|
// eslint-disable-next-line no-undef
|
55
|
-
var version = typeof "6.0.0-alpha.
|
55
|
+
var version = typeof "6.0.0-alpha.8" === 'string' ? "6.0.0-alpha.8" : null;
|
56
56
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
57
57
|
/**
|
58
58
|
* 拓扑显示和编辑
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "6.0.0-alpha.
|
3
|
+
"version": "6.0.0-alpha.8",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -115,6 +115,6 @@
|
|
115
115
|
"access": "public"
|
116
116
|
},
|
117
117
|
"license": "MIT",
|
118
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.
|
118
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.8/build/index.html",
|
119
119
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
120
120
|
}
|