@riil-frontend/component-topology 11.0.3 → 11.0.4

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.
@@ -234,7 +234,8 @@ var useTopoEdit = function useTopoEdit(params) {
234
234
  content: "是否仅删除区域或将区域包含的内容一同删除?",
235
235
  //footer:()=>{return <><Button type="primary" onClick={doDeleteOnlyGroup}>仅删除区域</Button><Button type="primary" onClick={doDeleteOnlyGroup}>确定</Button></>},
236
236
  okProps: {
237
- children: "仅删除区域"
237
+ children: "仅删除区域",
238
+ type: "normal"
238
239
  },
239
240
  cancelProps: {
240
241
  children: "全部删除"
@@ -289,27 +290,30 @@ var useTopoEdit = function useTopoEdit(params) {
289
290
  });
290
291
 
291
292
  function doDeleteOnlyGroup() {
292
- // console.log("仅删除区域", topo.view.topoClient, data);
293
+ topo.historyManager.beginTransaction(); // console.log("仅删除区域", topo.view.topoClient, data);
294
+
293
295
  var children = getGroupChildren(group);
294
296
  children.map(function (child) {
295
- child.setParent(null);
296
- var viewRect = topo.getGraphView().getViewRect();
297
- var nodeRect = child.getRect();
298
- child.setPosition(viewRect.x + nodeRect.width + 2, viewRect.y + nodeRect.height + 4); // 解决集群从区域内移出时,连线位置未更新的问题
297
+ child.setParent(null); // var viewRect = topo.getGraphView().getViewRect();
298
+ // var nodeRect = child.getRect();
299
+ // child.setPosition(
300
+ // viewRect.x + nodeRect.width + 2,
301
+ // viewRect.y + nodeRect.height + 4
302
+ // ); // 解决集群从区域内移出时,连线位置未更新的问题
299
303
 
300
304
  setTimeout(function () {
301
305
  child.iv();
302
306
  topo.historyManager.endTransaction();
303
307
  }, 50);
304
308
  });
305
- topo.view.topoClient.deleteGroup(data); // console.log("仅删除区域", children, group);
309
+ topo.view.topoClient.deleteGroup(data);
310
+ topo.historyManager.endTransaction(); // console.log("仅删除区域", children, group);
306
311
  }
307
312
 
308
313
  function doDelete() {
309
314
  topo.historyManager.beginTransaction(); // FIXME 。如果命中其他的动态条件,则立即显示
310
315
 
311
316
  topo.view.topoClient.deleteGroup(data);
312
- topo.historyManager.endTransaction();
313
317
  }
314
318
  };
315
319
 
@@ -24,7 +24,7 @@ import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel";
25
25
  import CiCache from "./cache/CiCache"; // eslint-disable-next-line no-undef
26
26
 
27
- var version = typeof "11.0.3" === 'string' ? "11.0.3" : null;
27
+ var version = typeof "11.0.4" === 'string' ? "11.0.4" : null;
28
28
  console.info("\u62D3\u6251\u7248\u672C: " + version);
29
29
  /**
30
30
  * 拓扑显示和编辑
@@ -263,7 +263,8 @@ var useTopoEdit = function useTopoEdit(params) {
263
263
  content: "是否仅删除区域或将区域包含的内容一同删除?",
264
264
  //footer:()=>{return <><Button type="primary" onClick={doDeleteOnlyGroup}>仅删除区域</Button><Button type="primary" onClick={doDeleteOnlyGroup}>确定</Button></>},
265
265
  okProps: {
266
- children: "仅删除区域"
266
+ children: "仅删除区域",
267
+ type: "normal"
267
268
  },
268
269
  cancelProps: {
269
270
  children: "全部删除"
@@ -318,27 +319,30 @@ var useTopoEdit = function useTopoEdit(params) {
318
319
  });
319
320
 
320
321
  function doDeleteOnlyGroup() {
321
- // console.log("仅删除区域", topo.view.topoClient, data);
322
+ topo.historyManager.beginTransaction(); // console.log("仅删除区域", topo.view.topoClient, data);
323
+
322
324
  var children = (0, _htElementUtils.getGroupChildren)(group);
323
325
  children.map(function (child) {
324
- child.setParent(null);
325
- var viewRect = topo.getGraphView().getViewRect();
326
- var nodeRect = child.getRect();
327
- child.setPosition(viewRect.x + nodeRect.width + 2, viewRect.y + nodeRect.height + 4); // 解决集群从区域内移出时,连线位置未更新的问题
326
+ child.setParent(null); // var viewRect = topo.getGraphView().getViewRect();
327
+ // var nodeRect = child.getRect();
328
+ // child.setPosition(
329
+ // viewRect.x + nodeRect.width + 2,
330
+ // viewRect.y + nodeRect.height + 4
331
+ // ); // 解决集群从区域内移出时,连线位置未更新的问题
328
332
 
329
333
  setTimeout(function () {
330
334
  child.iv();
331
335
  topo.historyManager.endTransaction();
332
336
  }, 50);
333
337
  });
334
- topo.view.topoClient.deleteGroup(data); // console.log("仅删除区域", children, group);
338
+ topo.view.topoClient.deleteGroup(data);
339
+ topo.historyManager.endTransaction(); // console.log("仅删除区域", children, group);
335
340
  }
336
341
 
337
342
  function doDelete() {
338
343
  topo.historyManager.beginTransaction(); // FIXME 。如果命中其他的动态条件,则立即显示
339
344
 
340
345
  topo.view.topoClient.deleteGroup(data);
341
- topo.historyManager.endTransaction();
342
346
  }
343
347
  };
344
348
 
@@ -56,7 +56,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
56
56
  var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
57
57
 
58
58
  // eslint-disable-next-line no-undef
59
- var version = typeof "11.0.3" === 'string' ? "11.0.3" : null;
59
+ var version = typeof "11.0.4" === 'string' ? "11.0.4" : null;
60
60
  console.info("\u62D3\u6251\u7248\u672C: " + version);
61
61
  /**
62
62
  * 拓扑显示和编辑
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "11.0.3",
3
+ "version": "11.0.4",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -118,6 +118,6 @@
118
118
  "access": "public"
119
119
  },
120
120
  "license": "MIT",
121
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.3/build/index.html",
121
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.4/build/index.html",
122
122
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
123
123
  }