@logicflow/extension 1.2.0-next.1 → 1.2.0-next.3

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 (104) hide show
  1. package/cjs/NodeResize/Control/Control.js +71 -16
  2. package/cjs/NodeResize/Node/DiamondResize.js +24 -10
  3. package/cjs/NodeResize/Node/EllipseResize.js +24 -10
  4. package/cjs/NodeResize/Node/HtmlResize.js +24 -10
  5. package/cjs/NodeResize/Node/RectResize.js +24 -10
  6. package/cjs/bpmn-adapter/index.js +74 -122
  7. package/cjs/bpmn-adapter/json2xml.js +2 -4
  8. package/cjs/bpmn-adapter/xml2json.js +247 -2
  9. package/cjs/components/control/index.js +16 -16
  10. package/cjs/components/dnd-panel/index.js +21 -0
  11. package/cjs/components/highlight/index.js +0 -1
  12. package/cjs/components/menu/index.js +9 -9
  13. package/cjs/components/mini-map/index.js +223 -138
  14. package/cjs/components/selection-select/index.js +6 -19
  15. package/cjs/index.js +0 -1
  16. package/cjs/materials/curved-edge/index.js +19 -5
  17. package/cjs/materials/curved-edge/searchMiddleIndex.js +17 -0
  18. package/cjs/materials/group/GroupNode.js +34 -64
  19. package/cjs/materials/group/index.js +99 -70
  20. package/cjs/style/index.css +10 -0
  21. package/cjs/tools/auto-layout/index.js +1 -1
  22. package/es/NodeResize/Control/Control.d.ts +4 -1
  23. package/es/NodeResize/Control/Control.js +71 -16
  24. package/es/NodeResize/Node/DiamondResize.d.ts +3 -1
  25. package/es/NodeResize/Node/DiamondResize.js +24 -10
  26. package/es/NodeResize/Node/EllipseResize.d.ts +3 -1
  27. package/es/NodeResize/Node/EllipseResize.js +24 -10
  28. package/es/NodeResize/Node/HtmlResize.d.ts +3 -1
  29. package/es/NodeResize/Node/HtmlResize.js +24 -10
  30. package/es/NodeResize/Node/RectResize.d.ts +3 -1
  31. package/es/NodeResize/Node/RectResize.js +24 -10
  32. package/es/bpmn-adapter/index.d.ts +33 -41
  33. package/es/bpmn-adapter/index.js +74 -122
  34. package/es/bpmn-adapter/json2xml.js +2 -4
  35. package/es/bpmn-adapter/xml2json.js +247 -2
  36. package/es/components/control/index.d.ts +3 -2
  37. package/es/components/control/index.js +16 -16
  38. package/es/components/dnd-panel/index.js +21 -0
  39. package/es/components/highlight/index.js +0 -1
  40. package/es/components/menu/index.d.ts +3 -2
  41. package/es/components/menu/index.js +9 -9
  42. package/es/components/mini-map/index.d.ts +57 -45
  43. package/es/components/mini-map/index.js +223 -138
  44. package/es/components/selection-select/index.d.ts +0 -1
  45. package/es/components/selection-select/index.js +6 -19
  46. package/es/index.d.ts +0 -1
  47. package/es/index.js +0 -1
  48. package/es/materials/curved-edge/index.js +19 -5
  49. package/es/materials/curved-edge/searchMiddleIndex.d.ts +1 -0
  50. package/es/materials/curved-edge/searchMiddleIndex.js +14 -0
  51. package/es/materials/group/GroupNode.d.ts +5 -7
  52. package/es/materials/group/GroupNode.js +34 -64
  53. package/es/materials/group/index.d.ts +21 -1
  54. package/es/materials/group/index.js +99 -70
  55. package/es/style/index.css +10 -0
  56. package/es/tools/auto-layout/index.d.ts +1 -1
  57. package/es/tools/auto-layout/index.js +1 -1
  58. package/lib/AutoLayout.js +1 -1
  59. package/lib/BpmnAdapter.js +1 -1
  60. package/lib/BpmnElement.js +1 -1
  61. package/lib/ContextMenu.js +1 -1
  62. package/lib/Control.js +1 -1
  63. package/lib/CurvedEdge.js +1 -1
  64. package/lib/DndPanel.js +1 -1
  65. package/lib/FlowPath.js +1 -1
  66. package/lib/Group.js +1 -1
  67. package/lib/Highlight.js +1 -1
  68. package/lib/InsertNodeInPolyline.js +1 -1
  69. package/lib/Menu.js +1 -1
  70. package/lib/MiniMap.js +1 -1
  71. package/lib/NodeResize.js +1 -1
  72. package/lib/RectLabelNode.js +1 -1
  73. package/lib/SelectionSelect.js +1 -1
  74. package/lib/Snapshot.js +1 -1
  75. package/lib/TurboAdapter.js +1 -1
  76. package/lib/lfJson2Xml.js +1 -1
  77. package/lib/lfXml2Json.js +1 -1
  78. package/lib/style/index.css +10 -0
  79. package/package.json +3 -2
  80. package/types/NodeResize/Control/Control.d.ts +4 -1
  81. package/types/NodeResize/Node/DiamondResize.d.ts +3 -1
  82. package/types/NodeResize/Node/EllipseResize.d.ts +3 -1
  83. package/types/NodeResize/Node/HtmlResize.d.ts +3 -1
  84. package/types/NodeResize/Node/RectResize.d.ts +3 -1
  85. package/types/bpmn-adapter/index.d.ts +33 -41
  86. package/types/components/control/index.d.ts +3 -2
  87. package/types/components/menu/index.d.ts +3 -2
  88. package/types/components/mini-map/index.d.ts +57 -45
  89. package/types/components/selection-select/index.d.ts +0 -1
  90. package/types/index.d.ts +0 -1
  91. package/types/materials/curved-edge/searchMiddleIndex.d.ts +1 -0
  92. package/types/materials/group/GroupNode.d.ts +5 -7
  93. package/types/materials/group/index.d.ts +21 -1
  94. package/types/tools/auto-layout/index.d.ts +1 -1
  95. package/cjs/locale/en-locale/en.js +0 -22
  96. package/cjs/locale/en-locale/index.js +0 -29
  97. package/cjs/locale/locale.js +0 -19
  98. package/es/locale/en-locale/en.d.ts +0 -19
  99. package/es/locale/en-locale/en.js +0 -19
  100. package/es/locale/en-locale/index.d.ts +0 -9
  101. package/es/locale/en-locale/index.js +0 -26
  102. package/es/locale/locale.d.ts +0 -6
  103. package/es/locale/locale.js +0 -16
  104. package/lib/EnLocale.js +0 -1
@@ -68,7 +68,7 @@ XML.ObjTree.prototype.parseHTTP = function (url, options, callback) {
68
68
  };
69
69
  }
70
70
  else {
71
- myOpt.asynchronous = false;
71
+ myOpt.asynchronous = false; // sync-mode
72
72
  }
73
73
  var trans;
74
74
  if (typeof (HTTP) != "undefined" && HTTP.Request) {
@@ -88,7 +88,6 @@ XML.ObjTree.prototype.parseHTTP = function (url, options, callback) {
88
88
  return this.parseDOM(trans.responseXML.documentElement);
89
89
  }
90
90
  };
91
- // method: parseDOM( document root )
92
91
  XML.ObjTree.prototype.parseDOM = function (root) {
93
92
  if (!root)
94
93
  return;
@@ -277,6 +276,252 @@ XML.ObjTree.prototype.scalar_to_xml = function (name, text) {
277
276
  XML.ObjTree.prototype.xml_escape = function (text) {
278
277
  return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
279
278
  };
279
+ /*
280
+ // ========================================================================
281
+
282
+ =head1 NAME
283
+
284
+ XML.ObjTree -- XML source code from/to JavaScript object like E4X
285
+
286
+ =head1 SYNOPSIS
287
+
288
+ var xotree = new XML.ObjTree();
289
+ var tree1 = {
290
+ root: {
291
+ node: "Hello, World!"
292
+ }
293
+ };
294
+ var xml1 = xotree.writeXML( tree1 ); // object tree to XML source
295
+ alert( "xml1: "+xml1 );
296
+
297
+ var xml2 = '<?xml version="1.0"?><response><error>0</error></response>';
298
+ var tree2 = xotree.parseXML( xml2 ); // XML source to object tree
299
+ alert( "error: "+tree2.response.error );
300
+
301
+ =head1 DESCRIPTION
302
+
303
+ XML.ObjTree class is a parser/generator between XML source code
304
+ and JavaScript object like E4X, ECMAScript for XML.
305
+ This is a JavaScript version of the XML::TreePP module for Perl.
306
+ This also works as a wrapper for XMLHTTPRequest and successor to JKL.ParseXML class
307
+ when this is used with prototype.js or JSAN's HTTP.Request class.
308
+
309
+ =head2 JavaScript object tree format
310
+
311
+ A sample XML source:
312
+
313
+ <?xml version="1.0" encoding="UTF-8"?>
314
+ <family name="Kawasaki">
315
+ <father>Yasuhisa</father>
316
+ <mother>Chizuko</mother>
317
+ <children>
318
+ <girl>Shiori</girl>
319
+ <boy>Yusuke</boy>
320
+ <boy>Kairi</boy>
321
+ </children>
322
+ </family>
323
+
324
+ Its JavaScript object tree like JSON/E4X:
325
+
326
+ {
327
+ 'family': {
328
+ '-name': 'Kawasaki',
329
+ 'father': 'Yasuhisa',
330
+ 'mother': 'Chizuko',
331
+ 'children': {
332
+ 'girl': 'Shiori'
333
+ 'boy': [
334
+ 'Yusuke',
335
+ 'Kairi'
336
+ ]
337
+ }
338
+ }
339
+ };
340
+
341
+ Each elements are parsed into objects:
342
+
343
+ tree.family.father; # the father's given name.
344
+
345
+ Prefix '-' is inserted before every attributes' name.
346
+
347
+ tree.family["-name"]; # this family's family name
348
+
349
+ A array is used because this family has two boys.
350
+
351
+ tree.family.children.boy[0]; # first boy's name
352
+ tree.family.children.boy[1]; # second boy's name
353
+ tree.family.children.girl; # (girl has no other sisters)
354
+
355
+ =head1 METHODS
356
+
357
+ =head2 xotree = new XML.ObjTree()
358
+
359
+ This constructor method returns a new XML.ObjTree object.
360
+
361
+ =head2 xotree.force_array = [ "rdf:li", "item", "-xmlns" ];
362
+
363
+ This property allows you to specify a list of element names
364
+ which should always be forced into an array representation.
365
+ The default value is null, it means that context of the elements
366
+ will determine to make array or to keep it scalar.
367
+
368
+ =head2 xotree.attr_prefix = '@';
369
+
370
+ This property allows you to specify a prefix character which is
371
+ inserted before each attribute names.
372
+ Instead of default prefix '-', E4X-style prefix '@' is also available.
373
+ The default character is '-'.
374
+ Or set '@' to access attribute values like E4X, ECMAScript for XML.
375
+ The length of attr_prefix must be just one character and not be empty.
376
+
377
+ =head2 tree = xotree.parseXML( xmlSrc );
378
+
379
+ This method loads an XML document using the supplied string
380
+ and returns its JavaScript object converted.
381
+
382
+ =head2 tree = xotree.parseDOM( domNode );
383
+
384
+ This method parses a DOM tree (ex. responseXML.documentElement)
385
+ and returns its JavaScript object converted.
386
+
387
+ =head2 tree = xotree.parseHTTP( url, options );
388
+
389
+ This method loads a XML file from remote web server
390
+ and returns its JavaScript object converted.
391
+ XMLHTTPRequest's synchronous mode is always used.
392
+ This mode blocks the process until the response is completed.
393
+
394
+ First argument is a XML file's URL
395
+ which must exist in the same domain as parent HTML file's.
396
+ Cross-domain loading is not available for security reasons.
397
+
398
+ Second argument is options' object which can contains some parameters:
399
+ method, postBody, parameters, onLoading, etc.
400
+
401
+ This method requires JSAN's L<HTTP.Request> class or prototype.js's Ajax.Request class.
402
+
403
+ =head2 xotree.parseHTTP( url, options, callback );
404
+
405
+ If a callback function is set as third argument,
406
+ XMLHTTPRequest's asynchronous mode is used.
407
+
408
+ This mode calls a callback function with XML file's JavaScript object converted
409
+ after the response is completed.
410
+
411
+ =head2 xmlSrc = xotree.writeXML( tree );
412
+
413
+ This method parses a JavaScript object tree
414
+ and returns its XML source generated.
415
+
416
+ =head1 EXAMPLES
417
+
418
+ =head2 Text node and attributes
419
+
420
+ If a element has both of a text node and attributes
421
+ or both of a text node and other child nodes,
422
+ text node's value is moved to a special node named "#text".
423
+
424
+ var xotree = new XML.ObjTree();
425
+ var xmlSrc = '<span class="author">Kawasaki Yusuke</span>';
426
+ var tree = xotree.parseXML( xmlSrc );
427
+ var class = tree.span["-class"]; # attribute
428
+ var name = tree.span["#text"]; # text node
429
+
430
+ =head2 parseHTTP() method with HTTP-GET and sync-mode
431
+
432
+ HTTP/Request.js or prototype.js must be loaded before calling this method.
433
+
434
+ var xotree = new XML.ObjTree();
435
+ var url = "http://example.com/index.html";
436
+ var tree = xotree.parseHTTP( url );
437
+ xotree.attr_prefix = '@'; // E4X-style
438
+ alert( tree.html["@lang"] );
439
+
440
+ This code shows C<lang=""> attribute from a X-HTML source code.
441
+
442
+ =head2 parseHTTP() method with HTTP-POST and async-mode
443
+
444
+ Third argument is a callback function which is called on onComplete.
445
+
446
+ var xotree = new XML.ObjTree();
447
+ var url = "http://example.com/mt-tb.cgi";
448
+ var opts = {
449
+ postBody: "title=...&excerpt=...&url=...&blog_name=..."
450
+ };
451
+ var func = function ( tree ) {
452
+ alert( tree.response.error );
453
+ };
454
+ xotree.parseHTTP( url, opts, func );
455
+
456
+ This code send a track back ping and shows its response code.
457
+
458
+ =head2 Simple RSS reader
459
+
460
+ This is a RSS reader which loads RDF file and displays all items.
461
+
462
+ var xotree = new XML.ObjTree();
463
+ xotree.force_array = [ "rdf:li", "item" ];
464
+ var url = "http://example.com/news-rdf.xml";
465
+ var func = function( tree ) {
466
+ var elem = document.getElementById("rss_here");
467
+ for( var i=0; i<tree["rdf:RDF"].item.length; i++ ) {
468
+ var divTag = document.createElement( "div" );
469
+ var aTag = document.createElement( "a" );
470
+ aTag.href = tree["rdf:RDF"].item[i].link;
471
+ var title = tree["rdf:RDF"].item[i].title;
472
+ var tNode = document.createTextNode( title );
473
+ aTag.appendChild( tNode );
474
+ divTag.appendChild( aTag );
475
+ elem.appendChild( divTag );
476
+ }
477
+ };
478
+ xotree.parseHTTP( url, {}, func );
479
+
480
+ =head2 XML-RPC using writeXML, prototype.js and parseDOM
481
+
482
+ If you wish to use prototype.js's Ajax.Request class by yourself:
483
+
484
+ var xotree = new XML.ObjTree();
485
+ var reqTree = {
486
+ methodCall: {
487
+ methodName: "weblogUpdates.ping",
488
+ params: {
489
+ param: [
490
+ { value: "Kawa.net xp top page" }, // 1st param
491
+ { value: "http://www.kawa.net/" } // 2nd param
492
+ ]
493
+ }
494
+ }
495
+ };
496
+ var reqxml = xotree.writeXML( reqTree ); // JS-Object to XML code
497
+ var url = "http://example.com/xmlrpc";
498
+ var func = function( req ) {
499
+ var resDom = req.responseXML.documentElement;
500
+ xotree.force_array = [ "member" ];
501
+ var resTree = xotree.parseDOM( resDom ); // XML-DOM to JS-Object
502
+ alert( resTree.methodResponse.params.param.value.struct.member[0].value.string );
503
+ };
504
+ var opt = {
505
+ method: "post",
506
+ postBody: reqxml,
507
+ asynchronous: true,
508
+ onComplete: func
509
+ };
510
+ new Ajax.Request( url, opt );
511
+
512
+ =head1 AUTHOR
513
+
514
+ Yusuke Kawasaki http://www.kawa.net/
515
+ =head1 COPYRIGHT AND LICENSE
516
+
517
+ Copyright (c) 2005-2006 Yusuke Kawasaki. All rights reserved.
518
+ This program is free software; you can redistribute it and/or
519
+ modify it under the Artistic license. Or whatever license I choose,
520
+ which I will do instead of keeping this documentation like it is.
521
+
522
+ =cut
523
+ // ========================================================================
524
+ */
280
525
  var lfXml2Json = function (xmlData) {
281
526
  return new XML.ObjTree().parseXML(xmlData);
282
527
  };
@@ -22,16 +22,15 @@ var __spread = (this && this.__spread) || function () {
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.Control = void 0;
24
24
  var Control = /** @class */ (function () {
25
- function Control(args) {
25
+ function Control(_a) {
26
26
  var _this = this;
27
- this.lf = args.lf;
28
- this.LogicFlow = args.LogicFlow;
27
+ var lf = _a.lf;
29
28
  this.controlItems = [
30
29
  {
31
30
  key: 'zoom-out',
32
31
  iconClass: 'lf-control-zoomOut',
33
- title: this.LogicFlow.t('缩小流程图'),
34
- text: this.LogicFlow.t('缩小'),
32
+ title: '缩小流程图',
33
+ text: '缩小',
35
34
  onClick: function () {
36
35
  _this.lf.zoom(false);
37
36
  },
@@ -39,8 +38,8 @@ var Control = /** @class */ (function () {
39
38
  {
40
39
  key: 'zoom-in',
41
40
  iconClass: 'lf-control-zoomIn',
42
- title: this.LogicFlow.t('放大流程图'),
43
- text: this.LogicFlow.t('放大'),
41
+ title: '放大流程图',
42
+ text: '放大',
44
43
  onClick: function () {
45
44
  _this.lf.zoom(true);
46
45
  },
@@ -48,8 +47,8 @@ var Control = /** @class */ (function () {
48
47
  {
49
48
  key: 'reset',
50
49
  iconClass: 'lf-control-fit',
51
- title: this.LogicFlow.t('恢复流程原有尺寸'),
52
- text: this.LogicFlow.t('适应'),
50
+ title: '恢复流程原有尺寸',
51
+ text: '适应',
53
52
  onClick: function () {
54
53
  _this.lf.resetZoom();
55
54
  },
@@ -57,8 +56,8 @@ var Control = /** @class */ (function () {
57
56
  {
58
57
  key: 'undo',
59
58
  iconClass: 'lf-control-undo',
60
- title: this.LogicFlow.t('回到上一步'),
61
- text: this.LogicFlow.t('上一步'),
59
+ title: '回到上一步',
60
+ text: '上一步',
62
61
  onClick: function () {
63
62
  _this.lf.undo();
64
63
  },
@@ -66,13 +65,14 @@ var Control = /** @class */ (function () {
66
65
  {
67
66
  key: 'redo',
68
67
  iconClass: 'lf-control-redo',
69
- title: this.LogicFlow.t('移到下一步'),
70
- text: this.LogicFlow.t('下一步'),
68
+ title: '移到下一步',
69
+ text: '下一步',
71
70
  onClick: function () {
72
71
  _this.lf.redo();
73
72
  },
74
73
  },
75
74
  ];
75
+ this.lf = lf;
76
76
  }
77
77
  Control.prototype.render = function (lf, domContainer) {
78
78
  this.destroy();
@@ -113,14 +113,14 @@ var Control = /** @class */ (function () {
113
113
  text.title = item.title;
114
114
  text.innerText = item.text;
115
115
  itemContainer.append(icon, text);
116
- switch (item.key) {
117
- case 'undo':
116
+ switch (item.text) {
117
+ case '上一步':
118
118
  _this.lf.on('history:change', function (_a) {
119
119
  var undoAble = _a.data.undoAble;
120
120
  itemContainer.className = undoAble ? NORMAL : DISABLED;
121
121
  });
122
122
  break;
123
- case 'redo':
123
+ case '下一步':
124
124
  _this.lf.on('history:change', function (_a) {
125
125
  var redoAble = _a.data.redoAble;
126
126
  itemContainer.className = redoAble ? NORMAL : DISABLED;
@@ -44,8 +44,11 @@ var DndPanel = /** @class */ (function () {
44
44
  el.className = shapeItem.className ? "lf-dnd-item " + shapeItem.className : 'lf-dnd-item';
45
45
  var shape = document.createElement('div');
46
46
  shape.className = 'lf-dnd-shape';
47
+ // if (typeof shapeItem.icon === 'string') {
47
48
  if (shapeItem.icon) {
48
49
  shape.style.backgroundImage = "url(" + shapeItem.icon + ")";
50
+ // } else {
51
+ // shape.appendChild(shapeItem.icon);
49
52
  }
50
53
  el.appendChild(shape);
51
54
  if (shapeItem.label) {
@@ -66,6 +69,24 @@ var DndPanel = /** @class */ (function () {
66
69
  shapeItem.callback(_this.lf, _this.domContainer);
67
70
  }
68
71
  };
72
+ el.ondblclick = function (e) {
73
+ _this.lf.graphModel.eventCenter.emit('dnd:panel-dbclick', {
74
+ e: e,
75
+ data: shapeItem,
76
+ });
77
+ };
78
+ el.onclick = function (e) {
79
+ _this.lf.graphModel.eventCenter.emit('dnd:panel-click', {
80
+ e: e,
81
+ data: shapeItem,
82
+ });
83
+ };
84
+ el.oncontextmenu = function (e) {
85
+ _this.lf.graphModel.eventCenter.emit('dnd:panel-contextmenu', {
86
+ e: e,
87
+ data: shapeItem,
88
+ });
89
+ };
69
90
  return el;
70
91
  };
71
92
  DndPanel.pluginName = 'dndPanel';
@@ -142,7 +142,6 @@ var Highlight = /** @class */ (function () {
142
142
  }
143
143
  Object.values(this.lf.graphModel.modelsMap).forEach(function (item) {
144
144
  // 所有节点样式都进行备份
145
- // eslint-disable-next-line operator-linebreak
146
145
  var oStyle = item.BaseType === 'node' ? item.getNodeStyle() : item.getEdgeStyle();
147
146
  _this.tempStyles[item.id] = __assign({}, oStyle);
148
147
  // 所有节点都设置透明度为0.1
@@ -26,11 +26,11 @@ var DefaultEdgeMenuKey = 'lf:defaultEdgeMenu';
26
26
  var DefaultGraphMenuKey = 'lf:defaultGraphMenu';
27
27
  var DefaultSelectionMenuKey = 'lf:defaultSelectionMenu';
28
28
  var Menu = /** @class */ (function () {
29
- function Menu(args) {
29
+ function Menu(_a) {
30
30
  var _this = this;
31
+ var lf = _a.lf;
31
32
  this.__menuDOM = document.createElement('ul');
32
- this.lf = args.lf;
33
- this.LogicFlow = args.LogicFlow;
33
+ this.lf = lf;
34
34
  this.menuTypeMap = new Map();
35
35
  this.init();
36
36
  this.lf.setMenuConfig = function (config) {
@@ -50,19 +50,19 @@ var Menu = /** @class */ (function () {
50
50
  var _this = this;
51
51
  var defaultNodeMenu = [
52
52
  {
53
- text: this.LogicFlow.t('删除'),
53
+ text: '删除',
54
54
  callback: function (node) {
55
55
  _this.lf.deleteNode(node.id);
56
56
  },
57
57
  },
58
58
  {
59
- text: this.LogicFlow.t('编辑文本'),
59
+ text: '编辑文本',
60
60
  callback: function (node) {
61
61
  _this.lf.graphModel.editText(node.id);
62
62
  },
63
63
  },
64
64
  {
65
- text: this.LogicFlow.t('复制'),
65
+ text: '复制',
66
66
  callback: function (node) {
67
67
  _this.lf.cloneNode(node.id);
68
68
  },
@@ -71,13 +71,13 @@ var Menu = /** @class */ (function () {
71
71
  this.menuTypeMap.set(DefaultNodeMenuKey, defaultNodeMenu);
72
72
  var defaultEdgeMenu = [
73
73
  {
74
- text: this.LogicFlow.t('删除'),
74
+ text: '删除',
75
75
  callback: function (edge) {
76
76
  _this.lf.deleteEdge(edge.id);
77
77
  },
78
78
  },
79
79
  {
80
- text: this.LogicFlow.t('编辑文本'),
80
+ text: '编辑文本',
81
81
  callback: function (edge) {
82
82
  _this.lf.graphModel.editText(edge.id);
83
83
  },
@@ -87,7 +87,7 @@ var Menu = /** @class */ (function () {
87
87
  this.menuTypeMap.set(DefaultGraphMenuKey, []);
88
88
  var DefaultSelectionMenu = [
89
89
  {
90
- text: this.LogicFlow.t('删除'),
90
+ text: '删除',
91
91
  callback: function (elements) {
92
92
  _this.lf.clearSelectElements();
93
93
  elements.edges.forEach(function (edge) { return _this.lf.deleteEdge(edge.id); });