@riil-frontend/component-topology 6.0.0-alpha.40 → 6.0.0-alpha.41

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.
Files changed (41) hide show
  1. package/build/index.css +1 -1
  2. package/build/index.js +1 -1
  3. package/es/components/ColorPanel/components/FontColorRange/index.module.scss +3 -0
  4. package/es/core/editor/components/Sidebar/views/CanvasPanel/themes.js +14 -23
  5. package/es/core/editor/components/Toolbar/buttons.js +2 -3
  6. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +2 -2
  7. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +2 -1
  8. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +5 -15
  9. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +2 -4
  10. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +19 -12
  11. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +2 -0
  12. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +16 -5
  13. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +23 -9
  14. package/es/core/hooks/useCanvasTheme.js +13 -1
  15. package/es/core/models/HistoryManager.js +1 -0
  16. package/es/core/models/SelectionManager.js +15 -11
  17. package/es/core/models/TopoApp.js +1 -1
  18. package/es/core/models/selection/ignoreList.js +1 -0
  19. package/es/core/models/utils/linkUtils.js +4 -5
  20. package/es/core/store/models/topoConfig.js +10 -12
  21. package/es/core/utils/edgeUtil.js +6 -0
  22. package/lib/components/ColorPanel/components/FontColorRange/index.module.scss +3 -0
  23. package/lib/core/editor/components/Sidebar/views/CanvasPanel/themes.js +18 -23
  24. package/lib/core/editor/components/Toolbar/buttons.js +2 -3
  25. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +2 -2
  26. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +2 -1
  27. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +5 -15
  28. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +2 -4
  29. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +24 -12
  30. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +2 -0
  31. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +17 -5
  32. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +23 -7
  33. package/lib/core/hooks/useCanvasTheme.js +13 -1
  34. package/lib/core/models/HistoryManager.js +1 -0
  35. package/lib/core/models/SelectionManager.js +16 -11
  36. package/lib/core/models/TopoApp.js +1 -1
  37. package/lib/core/models/selection/ignoreList.js +6 -0
  38. package/lib/core/models/utils/linkUtils.js +4 -5
  39. package/lib/core/store/models/topoConfig.js +9 -18
  40. package/lib/core/utils/edgeUtil.js +6 -0
  41. package/package.json +2 -2
@@ -37,8 +37,7 @@ function BoxBackgroundButton(props) {
37
37
 
38
38
 
39
39
  var selection = topo.selectionManager.useSelection();
40
- (0, _react.useEffect)(function () {
41
- setDisabled(false);
40
+ (0, _react.useEffect)(function () {// setDisabled(false)
42
41
  }, [selection]);
43
42
  var icon = disabled ? /*#__PURE__*/_react["default"].createElement("img", {
44
43
  src: "/img/topo/editor/toolbar/\u80CC\u666F\u586B\u5145\u53CA\u8FB9\u6846/Disable.svg",
@@ -50,6 +49,7 @@ function BoxBackgroundButton(props) {
50
49
  return /*#__PURE__*/_react["default"].createElement(_WidgetBox["default"], {
51
50
  label: "\u6846\u80CC\u666F",
52
51
  tooltip: "\u6846\u80CC\u666F",
52
+ disabled: disabled,
53
53
  showLabel: showLabel
54
54
  }, /*#__PURE__*/_react["default"].createElement(_DropdownButton["default"], {
55
55
  disabled: disabled,
@@ -138,7 +138,8 @@ function EdgeColorButton(props) {
138
138
  return /*#__PURE__*/_react["default"].createElement(_WidgetBox["default"], {
139
139
  label: "\u7EBF\u6761\u989C\u8272",
140
140
  tooltip: "\u7EBF\u6761\u989C\u8272",
141
- showLabel: showLabel
141
+ showLabel: showLabel,
142
+ disabled: disabled
142
143
  }, /*#__PURE__*/_react["default"].createElement(_DropdownButton["default"], {
143
144
  disabled: disabled,
144
145
  trigger: icon
@@ -24,7 +24,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
25
 
26
26
  /* eslint-disable jsx-a11y/alt-text */
27
- function FontFamilySelect(props) {
27
+ function FontColorDropdown(props) {
28
28
  var onChange = props.onChange,
29
29
  topo = props.topo,
30
30
  color = props.color,
@@ -37,25 +37,19 @@ function FontFamilySelect(props) {
37
37
 
38
38
  var backOpacityChange = function backOpacityChange(value) {
39
39
  onChange({
40
- color: color,
41
- background: background,
42
40
  opacity: value / 100
43
41
  });
44
42
  };
45
43
 
46
44
  var colorChang = function colorChang(value) {
47
45
  onChange({
48
- color: value.hex,
49
- background: background,
50
- opacity: opacity
46
+ color: value
51
47
  });
52
48
  };
53
49
 
54
50
  var backgroundChang = function backgroundChang(value) {
55
51
  onChange({
56
- color: color,
57
- background: value.hex,
58
- opacity: opacity
52
+ background: value
59
53
  });
60
54
  };
61
55
 
@@ -103,17 +97,13 @@ function FontColorButton(props) {
103
97
  label: "\u6587\u5B57\u989C\u8272",
104
98
  tooltip: "\u6587\u5B57\u989C\u8272",
105
99
  showLabel: showLabel
106
- }, /*#__PURE__*/_react["default"].createElement(FontFamilySelect, {
100
+ }, /*#__PURE__*/_react["default"].createElement(FontColorDropdown, {
107
101
  color: style.color,
108
102
  background: style.background,
109
103
  opacity: style.opacity,
110
104
  onChange: function onChange(val) {
111
105
  topo.historyManager.beginTransaction();
112
- setStyle({
113
- color: val.color,
114
- background: val.background,
115
- opacity: val.opacity
116
- });
106
+ setStyle(val);
117
107
  topo.historyManager.endTransaction();
118
108
  },
119
109
  topo: topo
@@ -35,13 +35,11 @@ function parseColor(colorStr) {
35
35
  }
36
36
 
37
37
  function parseBackground(colorStr) {
38
- var _background$rgb;
39
-
40
38
  var background = parseColor(colorStr);
41
39
  return {
42
40
  background: background,
43
41
  // 背景颜色,格式: {rgba: {}, hex: ''} | null
44
- opacity: background === null || background === void 0 ? void 0 : (_background$rgb = background.rgb) === null || _background$rgb === void 0 ? void 0 : _background$rgb.a // 背景透明度。值范围 0-1, null,null表示无
42
+ opacity: background ? background.rgb.a : 1 // 背景透明度。值范围 0-1, null,null表示无
45
43
 
46
44
  };
47
45
  }
@@ -70,5 +68,5 @@ function formatBackgroundRgbaColor(prevColor, currentColor) {
70
68
  }
71
69
 
72
70
  var rgb = background.rgb;
73
- return "rgba(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + opacity + ")";
71
+ return "rgba(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + (opacity === null ? 1 : opacity) + ")";
74
72
  }
@@ -1,25 +1,37 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  exports.__esModule = true;
4
6
  exports["default"] = void 0;
5
7
  exports.getTextStyle = getTextStyle;
6
8
  exports.setTextStyle = setTextStyle;
7
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _fontStyleUtil = _interopRequireDefault(require("../../../../../../settings/common/text/fontStyleUtil"));
13
+
14
+ var _colorUtil = require("../colorUtil");
15
+
8
16
  function getTextStyle(element) {
9
- return {
10
- color: null,
11
- // 文字颜色
12
- fontFamily: null,
13
- fontSize: null // fontBold: false, // 文字样式加粗 @V1.2
14
- // fontItalic: false, // 文字样式斜体 @V1.2
15
- // fontUnderline: false, // 文字样式下划线 @V1.2
16
- // background: {rgb: {}, hex: ''}, // 背景颜色,rgba格式。null表示无
17
- // opacity: 1, // 背景透明度。值范围 0-1, null,null表示无
18
-
19
- };
17
+ var underline = null;
18
+ return (0, _extends2["default"])({
19
+ color: (0, _colorUtil.parseColor)(element.a('link_ind_left_color')),
20
+ underline: underline
21
+ }, _fontStyleUtil["default"].toMap(element.a('link_ind_left_font')), (0, _colorUtil.parseBackground)(element.a('link_ind_background')));
20
22
  }
21
23
 
22
- function setTextStyle(element, style) {}
24
+ function setTextStyle(element, style, topo) {
25
+ if ('background' in style || 'opacity' in style) {
26
+ // 背景颜色
27
+ var prevStyle = getTextStyle(element);
28
+ topo.getHtTopo().setEdgeLabelStyle(element, {
29
+ background: (0, _colorUtil.formatBackgroundRgbaColor)(prevStyle, style)
30
+ });
31
+ } else {
32
+ topo.getHtTopo().setEdgeLabelStyle(element, style);
33
+ }
34
+ }
23
35
 
24
36
  var _default = {
25
37
  getTextStyle: getTextStyle,
@@ -23,6 +23,8 @@ function setLabelStyle(element, style) {
23
23
  element.a('labelStyle', (0, _extends2["default"])({}, element.a('labelStyle'), style)); // eslint-disable-next-line no-underscore-dangle
24
24
 
25
25
  element.__labelNode.a(style);
26
+
27
+ console.error(element.__labelNode.getAttrObject());
26
28
  } // 分层标题文字样式
27
29
 
28
30
 
@@ -7,12 +7,16 @@ exports["default"] = void 0;
7
7
  exports.getTextStyle = getTextStyle;
8
8
  exports.setTextStyle = setTextStyle;
9
9
 
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+
10
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
13
 
12
14
  var _fontStyleUtil = _interopRequireDefault(require("../../../../../../settings/common/text/fontStyleUtil"));
13
15
 
14
16
  var _colorUtil = require("../colorUtil");
15
17
 
18
+ var _excluded = ["color", "background", "opacity"];
19
+
16
20
  function getTextStyle(element) {
17
21
  var underline = null;
18
22
  return (0, _extends2["default"])({
@@ -22,15 +26,23 @@ function getTextStyle(element) {
22
26
  }
23
27
 
24
28
  function setTextStyle(element, style, topo) {
29
+ var color = style.color,
30
+ background = style.background,
31
+ opacity = style.opacity,
32
+ otherStyle = (0, _objectWithoutPropertiesLoose2["default"])(style, _excluded);
33
+ var tagStyle = (0, _extends2["default"])({}, otherStyle);
34
+
35
+ if ('color' in style) {
36
+ tagStyle.color = color.hex;
37
+ }
38
+
25
39
  if ('background' in style || 'opacity' in style) {
26
40
  // 背景颜色
27
41
  var prevStyle = getTextStyle(element);
28
- topo.getHtTopo().setNodeLabelStyle(element, {
29
- background: (0, _colorUtil.formatBackgroundRgbaColor)(prevStyle, style)
30
- });
31
- } else {
32
- topo.getHtTopo().setNodeLabelStyle(element, style);
42
+ tagStyle.background = (0, _colorUtil.formatBackgroundRgbaColor)(prevStyle, style);
33
43
  }
44
+
45
+ topo.getHtTopo().setNodeLabelStyle(element, tagStyle);
34
46
  }
35
47
 
36
48
  var _default = {
@@ -9,6 +9,8 @@ exports.useValues = useValues;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
12
+ var _colorUtil = require("../ElementTextStyleSetting/colorUtil");
13
+
12
14
  var defaultStyle = {
13
15
  color: '#AFB9C2',
14
16
  fontFamily: '微软雅黑'
@@ -18,13 +20,11 @@ function useValues(topo) {
18
20
  var displayConfigState = topo.store.useModelState('displayConfig');
19
21
  var nodeLabelStyle = displayConfigState.nodeLabelStyle,
20
22
  defaultEdgeLabelStyle = displayConfigState.defaultEdgeLabelStyle;
21
- return {
23
+ return (0, _extends2["default"])({
22
24
  color: (nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.color) || defaultStyle.color,
23
25
  fontFamily: (nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.fontFamily) || defaultStyle.fontFamily,
24
- fontSize: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.fontSize,
25
- background: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.background,
26
- opacity: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.opacity
27
- };
26
+ fontSize: nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.fontSize
27
+ }, (0, _colorUtil.parseBackground)(nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.background));
28
28
  }
29
29
 
30
30
  var setGlobalTagStyle = function setGlobalTagStyle(topo, styleData) {
@@ -34,9 +34,10 @@ var setGlobalTagStyle = function setGlobalTagStyle(topo, styleData) {
34
34
 
35
35
  var nodeLabelStyle = displayConfigState.nodeLabelStyle,
36
36
  defaultEdgeLabelStyle = displayConfigState.defaultEdgeLabelStyle;
37
- var globalNodeLabelStyle = (0, _extends2["default"])({}, nodeLabelStyle, styleData);
37
+ var style = buildStyle(styleData, nodeLabelStyle);
38
+ var globalNodeLabelStyle = (0, _extends2["default"])({}, nodeLabelStyle, style);
38
39
  topo.getHtTopo().setGlobalNodeLabelStyle(globalNodeLabelStyle);
39
- var globalEdgeTagStyle = (0, _extends2["default"])({}, defaultEdgeLabelStyle, styleData);
40
+ var globalEdgeTagStyle = globalNodeLabelStyle;
40
41
  topo.getHtTopo().setGlobalEdgeTagStyle(globalEdgeTagStyle);
41
42
  displayConfigDispatchers.update({
42
43
  nodeLabelStyle: globalNodeLabelStyle,
@@ -46,4 +47,19 @@ var setGlobalTagStyle = function setGlobalTagStyle(topo, styleData) {
46
47
 
47
48
  exports.setGlobalTagStyle = setGlobalTagStyle;
48
49
 
50
+ function buildStyle(styleData, prevTagStyle) {
51
+ var style = {};
52
+
53
+ if ('color' in styleData) {
54
+ style.color = styleData.color.hex;
55
+ }
56
+
57
+ if ('background' in styleData || 'opacity' in styleData) {
58
+ var prevBackgroundStyle = (0, _colorUtil.parseBackground)(prevTagStyle === null || prevTagStyle === void 0 ? void 0 : prevTagStyle.background);
59
+ style.background = (0, _colorUtil.formatBackgroundRgbaColor)(prevBackgroundStyle, styleData);
60
+ }
61
+
62
+ return style;
63
+ }
64
+
49
65
  function setStyle() {}
@@ -54,7 +54,19 @@ function useCanvasTheme(props) {
54
54
  var themeConfig = themeMap[canvasTheme];
55
55
 
56
56
  if (graphLoaded && themeConfig) {
57
- topo.getHtTopo().setToolsTheme(themeConfig.toolsTheme);
57
+ var _topo$historyManager2;
58
+
59
+ try {
60
+ var _topo$historyManager;
61
+
62
+ (_topo$historyManager = topo.historyManager) === null || _topo$historyManager === void 0 ? void 0 : _topo$historyManager.setDisabled(true, '切换主题');
63
+ topo.getHtTopo().setToolsTheme(themeConfig.toolsTheme);
64
+ topo.getHtTopo().setTheme(canvasTheme);
65
+ } catch (error) {
66
+ console.error('切换主题失败', error);
67
+ }
68
+
69
+ (_topo$historyManager2 = topo.historyManager) === null || _topo$historyManager2 === void 0 ? void 0 : _topo$historyManager2.setDisabled(false, '切换主题');
58
70
  }
59
71
  }, [canvasTheme, graphLoaded]);
60
72
  return {
@@ -18,6 +18,7 @@ var HistoryManager = /*#__PURE__*/function () {
18
18
  this.storeHistory = [];
19
19
  this.topo = topo;
20
20
  this.htHistoryManager = htHistoryManager;
21
+ htHistoryManager.clear();
21
22
 
22
23
  _rlog["default"].info('HistoryManager 初始化', htHistoryManager);
23
24
 
@@ -11,6 +11,8 @@ var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-ut
11
11
 
12
12
  var _useHtElements = _interopRequireDefault(require("../common/hooks/useHtElements"));
13
13
 
14
+ var _ignoreList = _interopRequireDefault(require("./selection/ignoreList"));
15
+
14
16
  var SelectionManager = /*#__PURE__*/function () {
15
17
  function SelectionManager(topo) {
16
18
  var _this = this;
@@ -21,11 +23,12 @@ var SelectionManager = /*#__PURE__*/function () {
21
23
  this.setSelection = function (selection) {
22
24
  var selectionDispatchers = _this.topo.store.getModelDispatchers('selection');
23
25
 
26
+ _this.selectionIds = selection.map(function (item) {
27
+ return item.id;
28
+ });
24
29
  selectionDispatchers.update({
25
30
  selection: selection,
26
- selectionIds: selection.map(function (item) {
27
- return item.id;
28
- })
31
+ selectionIds: _this.selectionIds
29
32
  });
30
33
  };
31
34
 
@@ -92,19 +95,21 @@ var SelectionManager = /*#__PURE__*/function () {
92
95
  var property = e.property,
93
96
  data = e.data;
94
97
 
95
- if (['position', 'childChange', 'a:scale'].indexOf(property) !== -1) {
98
+ if (!this.selectionIds.includes(data.getId())) {
96
99
  return;
97
100
  }
98
101
 
99
- var selectionModel = this.topo.getSelectionModel();
100
- var selectionIds = selectionModel.getSelection().getArray().map(function (item) {
101
- return item.getId();
102
- });
102
+ if (_ignoreList["default"].indexOf(property) !== -1) {
103
+ return;
104
+ }
103
105
 
104
- if (selectionIds.indexOf(data.getId()) > -1) {
105
- // console.info('PropertyChangeListener', e);
106
- this.updateSelection();
106
+ if (!window.aa) {
107
+ window.aa = [];
107
108
  }
109
+
110
+ window.aa.push(e); // console.info('PropertyChangeListener', e);
111
+
112
+ this.updateSelection();
108
113
  };
109
114
 
110
115
  _proto.initListener = function initListener() {
@@ -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.40" === 'string' ? "6.0.0-alpha.40" : null;
55
+ var version = typeof "6.0.0-alpha.41" === 'string' ? "6.0.0-alpha.41" : null;
56
56
  console.info("\u62D3\u6251\u7248\u672C: " + version);
57
57
  /**
58
58
  * 拓扑显示和编辑
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+ var _default = ['position', 'childChange', 'a:scale', 'icons', 'a:dataSource', 'a:dataTipSource', 'agentChange', 'a:runtimeStyles', 'a:linkArrow', '*', 'a:link_ind_left_arrow', 'a:link_ind_right_arrow', 'a:link_ind_area', 'a:middle_area', 'a:areaRect', 'a:outAreaRect', 'a:link_ind_area_right'];
6
+ exports["default"] = _default;
@@ -204,7 +204,7 @@ function _getLinksDetail() {
204
204
  function buildTopoLinkData() {}
205
205
 
206
206
  var compatibleWith = function compatibleWith(value) {
207
- console.log("compatibleWith", value);
207
+ // console.log("compatibleWith",value);
208
208
  var pluralType = value !== null && value !== void 0 ? value : 2;
209
209
 
210
210
  if (value === false) {
@@ -232,8 +232,8 @@ var showLinkByConfig = function showLinkByConfig(props) {
232
232
  var _plurals$compatibleWi;
233
233
 
234
234
  var topo = props.topo,
235
- showType = props.showType;
236
- console.log("showLinkByConfig-----------------------------", props, showType); //const displayConfig = topo.store.getModelState("displayConfig");
235
+ showType = props.showType; // console.log("showLinkByConfig-----------------------------", props, showType);
236
+ //const displayConfig = topo.store.getModelState("displayConfig");
237
237
 
238
238
  var types = (_plurals$compatibleWi = plurals[compatibleWith(showType)]) !== null && _plurals$compatibleWi !== void 0 ? _plurals$compatibleWi : []; // 查询所有连线
239
239
 
@@ -242,8 +242,7 @@ var showLinkByConfig = function showLinkByConfig(props) {
242
242
  var edges = (0, _htElementUtils.getEdges)(dm); // console.log("edges", edges);
243
243
 
244
244
  var showPhy = types.indexOf("phy") >= 0;
245
- var showAgg = types.indexOf("agg") >= 0;
246
- console.log("edges----types", showType, types, showPhy, showAgg);
245
+ var showAgg = types.indexOf("agg") >= 0; // console.log("edges----types",showType, types,showPhy, showAgg);
247
246
 
248
247
  if (Array.isArray(edges) && edges.length > 0) {
249
248
  edges.map(function (edge) {
@@ -336,8 +336,7 @@ function _default(topoApp) {
336
336
  while (1) {
337
337
  switch (_context4.prev = _context4.next) {
338
338
  case 0:
339
- _rlog["default"].debug("getTopoByConditions--------", params);
340
-
339
+ // rlog.debug("getTopoByConditions--------", params);
341
340
  topoId = params.id, resources = params.resources, groups = params.groups, exportLinkIdList = params.exportLinkIdList;
342
341
  viewConditions = (0, _topoData2.resToConditions)(resources);
343
342
  groupInfo = (0, _utils.isAvailableArray)(groups) && groups.map(function (group) {
@@ -345,30 +344,22 @@ function _default(topoApp) {
345
344
  layout: (0, _topoData2.getLayoutId)(group.layout),
346
345
  resources: (0, _topoData2.resToConditions)(group.resources)
347
346
  });
348
- });
347
+ }); // rlog.debug("getTopoByConditions--------", viewConditions, groupInfo);
349
348
 
350
- _rlog["default"].debug("getTopoByConditions--------", viewConditions, groupInfo);
351
-
352
- _context4.next = 7;
349
+ _context4.next = 5;
353
350
  return _topo["default"].getTopoDataByResource(topoId, viewConditions, groupInfo, exportLinkIdList);
354
351
 
355
- case 7:
352
+ case 5:
356
353
  data = _context4.sent;
357
-
358
- _rlog["default"].debug("getTopoByConditions--------data", data);
359
-
360
- _context4.next = 11;
354
+ _context4.next = 8;
361
355
  return (0, _getTopoData.buildData)(data);
362
356
 
363
- case 11:
357
+ case 8:
364
358
  data = _context4.sent;
365
-
366
- _rlog["default"].debug("getTopoByConditions--------", data, groupInfo);
367
-
368
- _context4.next = 15;
359
+ _context4.next = 11;
369
360
  return Promise.all([topoApp.ciTyeCache.getCiTypeMap((0, _topoData.getCiTypes)(data)), dispatch.customIcon.loadCustomIcons()]);
370
361
 
371
- case 15:
362
+ case 11:
372
363
  _yield$Promise$all = _context4.sent;
373
364
  ciTypeMap = _yield$Promise$all[0];
374
365
  _combTopoData = (0, _topoData.combTopoData)({
@@ -396,7 +387,7 @@ function _default(topoApp) {
396
387
  topoDataTrans: topoDataTrans
397
388
  });
398
389
 
399
- case 23:
390
+ case 19:
400
391
  case "end":
401
392
  return _context4.stop();
402
393
  }
@@ -15,6 +15,8 @@ var _linkUtils = require("../models/utils/linkUtils");
15
15
  * @param {*} topo
16
16
  */
17
17
  var updateEdgeExpanded = function updateEdgeExpanded(topo) {
18
+ var _topo$historyManager, _topo$historyManager2;
19
+
18
20
  var _topo$store$getModelS = topo.store.getModelState("topoMod"),
19
21
  viewState = _topo$store$getModelS.viewState;
20
22
 
@@ -29,6 +31,8 @@ var updateEdgeExpanded = function updateEdgeExpanded(topo) {
29
31
  expandAllEdges = _topo$store$getModelS2.expandAllEdges; // console.log("expandAllEdges----------", expandAllEdges);
30
32
 
31
33
 
34
+ (_topo$historyManager = topo.historyManager) === null || _topo$historyManager === void 0 ? void 0 : _topo$historyManager.setDisabled(true, '连线展开控制');
35
+
32
36
  if (expandAllEdges === 1) {
33
37
  (0, _linkUtils.showLinkByConfig)({
34
38
  topo: topo,
@@ -47,6 +51,8 @@ var updateEdgeExpanded = function updateEdgeExpanded(topo) {
47
51
  _rlog["default"].debug("updateEdgeExpanded 展开-isEditMode", isEditMode);
48
52
  }
49
53
 
54
+ (_topo$historyManager2 = topo.historyManager) === null || _topo$historyManager2 === void 0 ? void 0 : _topo$historyManager2.setDisabled(false, '连线展开控制');
55
+
50
56
  if (topo.linkDynamicStyleExecutor) {
51
57
  topo.linkDynamicStyleExecutor.execute();
52
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "6.0.0-alpha.40",
3
+ "version": "6.0.0-alpha.41",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -116,6 +116,6 @@
116
116
  "access": "public"
117
117
  },
118
118
  "license": "MIT",
119
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.40/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.41/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }