@finos/legend-extension-dsl-diagram 1.0.26 → 1.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/lib/DiagramRenderer.d.ts +1 -1
  2. package/lib/DiagramRenderer.d.ts.map +1 -1
  3. package/lib/DiagramRenderer.js +56 -54
  4. package/lib/DiagramRenderer.js.map +1 -1
  5. package/lib/components/studio/ClassDiagramPreview.d.ts +1 -0
  6. package/lib/components/studio/ClassDiagramPreview.d.ts.map +1 -1
  7. package/lib/components/studio/DiagramEditor.d.ts +1 -0
  8. package/lib/components/studio/DiagramEditor.d.ts.map +1 -1
  9. package/lib/components/studio/DiagramEditor.js +10 -9
  10. package/lib/components/studio/DiagramEditor.js.map +1 -1
  11. package/lib/helpers/DiagramHelper.d.ts.map +1 -1
  12. package/lib/helpers/DiagramHelper.js +4 -3
  13. package/lib/helpers/DiagramHelper.js.map +1 -1
  14. package/lib/index.css +1 -1
  15. package/lib/index.d.ts +2 -1
  16. package/lib/index.d.ts.map +1 -1
  17. package/lib/index.js +2 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts +0 -3
  20. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts.map +1 -1
  21. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +1 -13
  22. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
  23. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts +0 -1
  24. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
  25. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js +2 -7
  26. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js.map +1 -1
  27. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +0 -11
  28. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
  29. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +2 -46
  30. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
  31. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.d.ts +35 -0
  32. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.d.ts.map +1 -0
  33. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.js +118 -0
  34. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.js.map +1 -0
  35. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts +0 -2
  36. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +1 -1
  37. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js +1 -9
  38. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +1 -1
  39. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +0 -17
  40. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts.map +1 -1
  41. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js +6 -109
  42. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
  43. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts +0 -8
  44. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  45. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +1 -16
  46. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
  47. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
  48. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +3 -2
  49. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
  50. package/lib/package.json +4 -4
  51. package/lib/stores/studio/DSLDiagram_ModifierHelper.d.ts +54 -0
  52. package/lib/stores/studio/DSLDiagram_ModifierHelper.d.ts.map +1 -0
  53. package/lib/stores/studio/DSLDiagram_ModifierHelper.js +87 -0
  54. package/lib/stores/studio/DSLDiagram_ModifierHelper.js.map +1 -0
  55. package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
  56. package/lib/stores/studio/DiagramEditorState.js +3 -3
  57. package/lib/stores/studio/DiagramEditorState.js.map +1 -1
  58. package/package.json +10 -10
  59. package/src/DiagramRenderer.ts +125 -58
  60. package/src/components/studio/DiagramEditor.tsx +16 -11
  61. package/src/helpers/DiagramHelper.ts +4 -3
  62. package/src/index.ts +2 -4
  63. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +1 -14
  64. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +1 -8
  65. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +2 -52
  66. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.ts +165 -0
  67. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts +1 -10
  68. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +6 -147
  69. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +1 -17
  70. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +3 -2
  71. package/src/stores/studio/DSLDiagram_ModifierHelper.ts +148 -0
  72. package/src/stores/studio/DiagramEditorState.ts +2 -2
  73. package/tsconfig.json +2 -0
@@ -21,7 +21,7 @@ import { PositionedRectangle } from './models/metamodels/pure/packageableElement
21
21
  import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
22
22
  import type { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView';
23
23
  import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
24
- import { type RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
24
+ import type { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
25
25
  export declare enum DIAGRAM_INTERACTION_MODE {
26
26
  LAYOUT = 0,
27
27
  PAN = 1,
@@ -1 +1 @@
1
- {"version":3,"file":"DiagramRenderer.d.ts","sourceRoot":"","sources":["../src/DiagramRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,EAYN,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yEAAyE,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,oFAAoF,CAAC;AAC/G,OAAO,EAAE,KAAK,EAAE,MAAM,gFAAgF,CAAC;AACvG,OAAO,EAAE,mBAAmB,EAAE,MAAM,8FAA8F,CAAC;AACnI,OAAO,EAAE,SAAS,EAAE,MAAM,2EAA2E,CAAC;AACtG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oFAAoF,CAAC;AAC7H,OAAO,EAAE,kBAAkB,EAAE,MAAM,oFAAoF,CAAC;AACxH,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,kFAAkF,CAAC;AAK1F,oBAAY,wBAAwB;IAClC,MAAM,IAAA;IACN,GAAG,IAAA;IACH,OAAO,IAAA;IACP,QAAQ,IAAA;IACR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AE,UAAU,GAAG,IAAI;IAmW9B,kBAAkB,CAChB,UAAU,EAAE,SAAS,EAAE,EACvB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,GACtB,SAAS,EAAE,EAAE;IAoChB,cAAc,CACZ,eAAe,EAAE,SAAS,EAAE,EAAE,EAC9B,OAAO,EAAE,OAAO,EAChB,oBAAoB,EAAE,OAAO,EAC7B,SAAS,EAAE,OAAO,GACjB,CAAC,SAAS,EAAE,EAAE,kBAAkB,EAAE,CAAC;CAmGvC"}
@@ -14,17 +14,19 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { uuid, noop, getNullableFirstElement, UnsupportedOperationError, IllegalStateError, guaranteeNonNullable, findLast, uniqBy, } from '@finos/legend-shared';
17
- import { Class, Enumeration, PrimitiveType, DerivedProperty, PackageableElementExplicitReference, PropertyExplicitReference, GenericTypeExplicitReference, GenericType, Property, Multiplicity, addClassProperty, addClassSuperType, } from '@finos/legend-graph';
17
+ import { Class, Enumeration, PrimitiveType, DerivedProperty, PackageableElementExplicitReference, PropertyExplicitReference, GenericTypeExplicitReference, GenericType, Property, Multiplicity, } from '@finos/legend-graph';
18
18
  import { action, makeObservable, observable } from 'mobx';
19
19
  import { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
20
20
  import { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
21
21
  import { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
22
22
  import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
23
23
  import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
24
- import { manageInsidePointsDynamically, } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
25
24
  import { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
26
25
  import { getElementPosition } from './helpers/DiagramHelper';
27
26
  import { AssociationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView';
27
+ import { class_addProperty, class_addSuperType } from '@finos/legend-studio';
28
+ import { classView_setHideProperties, classView_setHideStereotypes, classView_setHideTaggedValues, diagram_addClassView, diagram_addGeneralizationView, diagram_addPropertyView, diagram_deleteAssociationView, diagram_deleteClassView, diagram_deleteGeneralizationView, diagram_deletePropertyView, diagram_setAssociationViews, diagram_setClassViews, diagram_setGeneralizationViews, diagram_setPropertyViews, findOrBuildPoint, positionedRectangle_forceRefreshHash, positionedRectangle_setPosition, positionedRectangle_setRectangle, relationShipEdgeView_setOffsetX, relationShipEdgeView_setOffsetY, relationshipView_changePoint, relationView_possiblyFlattenPath, relationView_setPath, } from './stores/studio/DSLDiagram_ModifierHelper';
29
+ import { _relationView_manageInsidePointsDynamically } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper';
28
30
  export var DIAGRAM_INTERACTION_MODE;
29
31
  (function (DIAGRAM_INTERACTION_MODE) {
30
32
  DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE["LAYOUT"] = 0] = "LAYOUT";
@@ -424,13 +426,13 @@ export class DiagramRenderer {
424
426
  !startClassView.class.value.allSuperclasses.includes(targetClassView.class.value) &&
425
427
  // Avoid loop (might be expensive)
426
428
  !targetClassView.class.value.allSuperclasses.includes(startClassView.class.value)) {
427
- addClassSuperType(startClassView.class.value, GenericTypeExplicitReference.create(new GenericType(targetClassView.class.value)));
429
+ class_addSuperType(startClassView.class.value, GenericTypeExplicitReference.create(new GenericType(targetClassView.class.value)));
428
430
  }
429
431
  // only add an inheritance relationship view if the start class
430
432
  // has already had the target class as its supertype
431
433
  if (startClassView.class.value.generalizations.find((generalization) => generalization.value.rawType === targetClassView.class.value)) {
432
434
  const gview = new GeneralizationView(this.diagram, startClassView, targetClassView);
433
- this.diagram.addGeneralizationView(gview);
435
+ diagram_addGeneralizationView(this.diagram, gview);
434
436
  return gview;
435
437
  }
436
438
  return undefined;
@@ -440,13 +442,13 @@ export class DiagramRenderer {
440
442
  case DIAGRAM_RELATIONSHIP_EDIT_MODE.PROPERTY: {
441
443
  this.handleAddRelationship = (startClassView, targetClassView) => {
442
444
  const property = new Property(`property_${startClassView.class.value.properties.length + 1}`, new Multiplicity(1, 1), GenericTypeExplicitReference.create(new GenericType(targetClassView.class.value)), startClassView.class.value);
443
- addClassProperty(startClassView.class.value, property);
445
+ class_addProperty(startClassView.class.value, property);
444
446
  // only create property view if the classviews are different
445
447
  // else we end up with a weird rendering where the property view
446
448
  // is not targetable
447
449
  if (startClassView !== targetClassView) {
448
450
  const pView = new PropertyView(this.diagram, PropertyExplicitReference.create(property), startClassView, targetClassView);
449
- this.diagram.addPropertyView(pView);
451
+ diagram_addPropertyView(this.diagram, pView);
450
452
  return pView;
451
453
  }
452
454
  return undefined;
@@ -506,7 +508,7 @@ export class DiagramRenderer {
506
508
  .concat(this.diagram.propertyViews);
507
509
  for (const relationshipView of relationshipViews) {
508
510
  let fullPath = relationshipView.buildFullPath();
509
- fullPath = manageInsidePointsDynamically(fullPath, relationshipView.from.classView.value, relationshipView.to.classView.value);
511
+ fullPath = _relationView_manageInsidePointsDynamically(fullPath, relationshipView.from.classView.value, relationshipView.to.classView.value);
510
512
  if (relationshipView instanceof PropertyView) {
511
513
  const box = this.drawLinePropertyText(
512
514
  // NOTE: by the way we compute the full path, it would guarantee
@@ -595,14 +597,14 @@ export class DiagramRenderer {
595
597
  id = uuid();
596
598
  }
597
599
  const newClassView = new ClassView(this.diagram, id, PackageableElementExplicitReference.create(addedClass));
598
- newClassView.setPosition(classViewModelCoordinate ??
600
+ positionedRectangle_setPosition(newClassView, classViewModelCoordinate ??
599
601
  this.canvasCoordinateToModelCoordinate(new Point(this.virtualScreen.position.x +
600
602
  this.virtualScreen.rectangle.width / 2, this.virtualScreen.position.y +
601
603
  this.virtualScreen.rectangle.height / 2)));
602
- this.diagram.addClassView(newClassView);
604
+ diagram_addClassView(this.diagram, newClassView);
603
605
  // Refresh hash since ClassView position is not observable
604
606
  // NOTE: here we refresh after adding the class view to the diagram, that way the diagram hash is refreshed
605
- newClassView.forceRefreshHash();
607
+ positionedRectangle_forceRefreshHash(newClassView);
606
608
  this.diagram.classViews
607
609
  .filter((classView) => classView.class.value !== addedClass)
608
610
  .forEach((classView) => {
@@ -611,22 +613,22 @@ export class DiagramRenderer {
611
613
  if (addedClass.generalizations
612
614
  .map((generalization) => generalization.value.rawType)
613
615
  .includes(_class)) {
614
- this.diagram.addGeneralizationView(new GeneralizationView(this.diagram, newClassView, classView));
616
+ diagram_addGeneralizationView(this.diagram, new GeneralizationView(this.diagram, newClassView, classView));
615
617
  }
616
618
  if (_class.generalizations
617
619
  .map((generalization) => generalization.value.rawType)
618
620
  .includes(addedClass)) {
619
- this.diagram.addGeneralizationView(new GeneralizationView(this.diagram, classView, newClassView));
621
+ diagram_addGeneralizationView(this.diagram, new GeneralizationView(this.diagram, classView, newClassView));
620
622
  }
621
623
  // Add property view
622
624
  addedClass.getAllOwnedProperties().forEach((property) => {
623
625
  if (property.genericType.value.rawType === _class) {
624
- this.diagram.addPropertyView(new PropertyView(this.diagram, PropertyExplicitReference.create(property), newClassView, classView));
626
+ diagram_addPropertyView(this.diagram, new PropertyView(this.diagram, PropertyExplicitReference.create(property), newClassView, classView));
625
627
  }
626
628
  });
627
629
  _class.getAllOwnedProperties().forEach((property) => {
628
630
  if (property.genericType.value.rawType === addedClass) {
629
- this.diagram.addPropertyView(new PropertyView(this.diagram, PropertyExplicitReference.create(property), classView, newClassView));
631
+ diagram_addPropertyView(this.diagram, new PropertyView(this.diagram, PropertyExplicitReference.create(property), classView, newClassView));
630
632
  }
631
633
  });
632
634
  });
@@ -940,7 +942,7 @@ export class DiagramRenderer {
940
942
  classView.rectangle.height > classMinHeight
941
943
  ? classView.rectangle.height
942
944
  : classMinHeight;
943
- classView.setRectangle(new Rectangle(width, height));
945
+ positionedRectangle_setRectangle(classView, new Rectangle(width, height));
944
946
  }
945
947
  }
946
948
  drawClassView(classView) {
@@ -1071,7 +1073,7 @@ export class DiagramRenderer {
1071
1073
  // NOTE: force hash reload when we redraw class view; this would help with cases where
1072
1074
  // we auto add new properties to the class view, causing the box to expand, hence we need
1073
1075
  // to recompute hash
1074
- classView.forceRefreshHash();
1076
+ positionedRectangle_forceRefreshHash(classView);
1075
1077
  }
1076
1078
  drawLinePropertyNameAndMultiplicity(property, textPositionX, textPositionY, multiplicityPositionX, multiplicityPositionY, measureOnly) {
1077
1079
  this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;
@@ -1157,7 +1159,7 @@ export class DiagramRenderer {
1157
1159
  }
1158
1160
  drawPropertyOrAssociation(propertyView) {
1159
1161
  let fullPath = propertyView.buildFullPath();
1160
- fullPath = manageInsidePointsDynamically(fullPath, propertyView.from.classView.value, propertyView.to.classView.value);
1162
+ fullPath = _relationView_manageInsidePointsDynamically(fullPath, propertyView.from.classView.value, propertyView.to.classView.value);
1161
1163
  // const toProperty = asso instanceof.property ? asso.property : asso.association.properties[1];
1162
1164
  const toProperty = propertyView.property.value;
1163
1165
  this.drawLinePropertyText(
@@ -1239,7 +1241,7 @@ export class DiagramRenderer {
1239
1241
  drawInheritance(inheritance) {
1240
1242
  const rect = inheritance.to.classView.value.rectangle;
1241
1243
  let fullPath = inheritance.buildFullPath();
1242
- fullPath = manageInsidePointsDynamically(fullPath, inheritance.from.classView.value, inheritance.to.classView.value);
1244
+ fullPath = _relationView_manageInsidePointsDynamically(fullPath, inheritance.from.classView.value, inheritance.to.classView.value);
1243
1245
  // NOTE: by the way we compute the full path, it would guarantee
1244
1246
  // to always have at least 2 points
1245
1247
  const startX = fullPath[fullPath.length - 2].x;
@@ -1358,7 +1360,7 @@ export class DiagramRenderer {
1358
1360
  assoViews.forEach((assoView) => {
1359
1361
  if (selectedClasses.indexOf(assoView.from.classView.value) !== -1 &&
1360
1362
  selectedClasses.indexOf(assoView.to.classView.value) !== -1) {
1361
- assoView.setPath(assoView.path.map((point) => new Point(point.x - newMovingDeltaX, point.y - newMovingDeltaY)));
1363
+ relationView_setPath(assoView, assoView.path.map((point) => new Point(point.x - newMovingDeltaX, point.y - newMovingDeltaY)));
1362
1364
  }
1363
1365
  });
1364
1366
  }
@@ -1367,23 +1369,23 @@ export class DiagramRenderer {
1367
1369
  if ('Delete' === e.key) {
1368
1370
  if (!this.isReadOnly) {
1369
1371
  this.selectedClasses.forEach((classView) => {
1370
- this.diagram.deleteClassView(classView);
1371
- this.diagram.setAssociationViews(this.diagram.associationViews.filter((associationView) => !(associationView.from.classView.value === classView ||
1372
+ diagram_deleteClassView(this.diagram, classView);
1373
+ diagram_setAssociationViews(this.diagram, this.diagram.associationViews.filter((associationView) => !(associationView.from.classView.value === classView ||
1372
1374
  associationView.to.classView.value === classView)));
1373
- this.diagram.setGeneralizationViews(this.diagram.generalizationViews.filter((generalizationView) => !(generalizationView.from.classView.value === classView ||
1375
+ diagram_setGeneralizationViews(this.diagram, this.diagram.generalizationViews.filter((generalizationView) => !(generalizationView.from.classView.value === classView ||
1374
1376
  generalizationView.to.classView.value === classView)));
1375
- this.diagram.setPropertyViews(this.diagram.propertyViews.filter((propertyView) => !(propertyView.from.classView.value === classView ||
1377
+ diagram_setPropertyViews(this.diagram, this.diagram.propertyViews.filter((propertyView) => !(propertyView.from.classView.value === classView ||
1376
1378
  propertyView.to.classView.value === classView)));
1377
1379
  });
1378
1380
  if (this.selectedPropertyOrAssociation instanceof AssociationView) {
1379
- this.diagram.deleteAssociationView(this.selectedPropertyOrAssociation);
1381
+ diagram_deleteAssociationView(this.diagram, this.selectedPropertyOrAssociation);
1380
1382
  }
1381
1383
  else if (this.selectedPropertyOrAssociation instanceof PropertyView) {
1382
- this.diagram.deletePropertyView(this.selectedPropertyOrAssociation);
1384
+ diagram_deletePropertyView(this.diagram, this.selectedPropertyOrAssociation);
1383
1385
  }
1384
1386
  if (this.selectedInheritance) {
1385
1387
  if (this.diagram.generalizationViews.find((generalizationView) => generalizationView === this.selectedInheritance)) {
1386
- this.diagram.deleteGeneralizationView(this.selectedInheritance);
1388
+ diagram_deleteGeneralizationView(this.diagram, this.selectedInheritance);
1387
1389
  }
1388
1390
  }
1389
1391
  this.selectedClasses = [];
@@ -1461,7 +1463,7 @@ export class DiagramRenderer {
1461
1463
  if (!this.isReadOnly) {
1462
1464
  if (this.selectedClasses.length !== 0) {
1463
1465
  this.selectedClasses.forEach((classView) => {
1464
- classView.setHideProperties(!classView.hideProperties);
1466
+ classView_setHideProperties(classView, !classView.hideProperties);
1465
1467
  });
1466
1468
  this.drawScreen();
1467
1469
  }
@@ -1472,7 +1474,7 @@ export class DiagramRenderer {
1472
1474
  if (!this.isReadOnly) {
1473
1475
  if (this.selectedClasses.length !== 0) {
1474
1476
  this.selectedClasses.forEach((classView) => {
1475
- classView.setHideStereotypes(!classView.hideStereotypes);
1477
+ classView_setHideStereotypes(classView, !classView.hideStereotypes);
1476
1478
  });
1477
1479
  this.drawScreen();
1478
1480
  }
@@ -1483,7 +1485,7 @@ export class DiagramRenderer {
1483
1485
  if (!this.isReadOnly) {
1484
1486
  if (this.selectedClasses.length !== 0) {
1485
1487
  this.selectedClasses.forEach((classView) => {
1486
- classView.setHideTaggedValues(!classView.hideTaggedValues);
1488
+ classView_setHideTaggedValues(classView, !classView.hideTaggedValues);
1487
1489
  });
1488
1490
  this.drawScreen();
1489
1491
  }
@@ -1517,8 +1519,8 @@ export class DiagramRenderer {
1517
1519
  else if ('ArrowUp' === e.key) {
1518
1520
  const views = this.getSuperTypeLevels(this.selectedClasses, this.diagram, 0, 1);
1519
1521
  const res = this.layoutTaxonomy(views, this.diagram, false, true);
1520
- res[0].forEach((cv) => this.diagram.addClassView(cv));
1521
- res[1].forEach((gv) => this.diagram.addGeneralizationView(gv));
1522
+ res[0].forEach((cv) => diagram_addClassView(this.diagram, cv));
1523
+ res[1].forEach((gv) => diagram_addGeneralizationView(this.diagram, gv));
1522
1524
  this.drawScreen();
1523
1525
  }
1524
1526
  // Add subtypes of selected classes to the diagram
@@ -1527,8 +1529,8 @@ export class DiagramRenderer {
1527
1529
  if (views.length > 0) {
1528
1530
  views.forEach((classView) => this.ensureClassViewMeetMinDimensions(classView));
1529
1531
  const res = this.layoutTaxonomy([views, this.selectedClasses], this.diagram, false, false);
1530
- res[0].forEach((cv) => this.diagram.addClassView(cv));
1531
- res[1].forEach((gv) => this.diagram.addGeneralizationView(gv));
1532
+ res[0].forEach((cv) => diagram_addClassView(this.diagram, cv));
1533
+ res[1].forEach((gv) => diagram_addGeneralizationView(this.diagram, gv));
1532
1534
  }
1533
1535
  this.drawScreen();
1534
1536
  }
@@ -1537,9 +1539,9 @@ export class DiagramRenderer {
1537
1539
  if (!this.isReadOnly) {
1538
1540
  switch (this.interactionMode) {
1539
1541
  case DIAGRAM_INTERACTION_MODE.LAYOUT: {
1540
- this.diagram.generalizationViews.forEach((generalizationView) => generalizationView.possiblyFlattenPath());
1541
- this.diagram.associationViews.forEach((associationView) => associationView.possiblyFlattenPath());
1542
- this.diagram.propertyViews.forEach((propertyView) => propertyView.possiblyFlattenPath());
1542
+ this.diagram.generalizationViews.forEach((generalizationView) => relationView_possiblyFlattenPath(generalizationView));
1543
+ this.diagram.associationViews.forEach((associationView) => relationView_possiblyFlattenPath(associationView));
1544
+ this.diagram.propertyViews.forEach((propertyView) => relationView_possiblyFlattenPath(propertyView));
1543
1545
  break;
1544
1546
  }
1545
1547
  case DIAGRAM_INTERACTION_MODE.ADD_CLASS: {
@@ -1596,16 +1598,16 @@ export class DiagramRenderer {
1596
1598
  if (targetClassView.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {
1597
1599
  const gview = this.handleAddRelationship(this.startClassView, targetClassView);
1598
1600
  if (gview) {
1599
- gview.from.setOffsetX(-(this.startClassView.position.x +
1601
+ relationShipEdgeView_setOffsetX(gview.from, -(this.startClassView.position.x +
1600
1602
  this.startClassView.rectangle.width / 2 -
1601
1603
  this.selectionStart.x));
1602
- gview.from.setOffsetY(-(this.startClassView.position.y +
1604
+ relationShipEdgeView_setOffsetY(gview.from, -(this.startClassView.position.y +
1603
1605
  this.startClassView.rectangle.height / 2 -
1604
1606
  this.selectionStart.y));
1605
- gview.to.setOffsetX(-(targetClassView.position.x +
1607
+ relationShipEdgeView_setOffsetX(gview.to, -(targetClassView.position.x +
1606
1608
  targetClassView.rectangle.width / 2 -
1607
1609
  eventPointInModelCoordinate.x));
1608
- gview.to.setOffsetY(-(targetClassView.position.y +
1610
+ relationShipEdgeView_setOffsetY(gview.to, -(targetClassView.position.y +
1609
1611
  targetClassView.rectangle.height / 2 -
1610
1612
  eventPointInModelCoordinate.y));
1611
1613
  }
@@ -1702,7 +1704,7 @@ export class DiagramRenderer {
1702
1704
  this.setSelectedClassCorner(this.diagram.classViews[i]);
1703
1705
  if (!this.isReadOnly) {
1704
1706
  // Bring the class view to front
1705
- this.diagram.setClassViews(this.reorderDiagramDomain(guaranteeNonNullable(this.selectedClassCorner), this.diagram));
1707
+ diagram_setClassViews(this.diagram, this.reorderDiagramDomain(guaranteeNonNullable(this.selectedClassCorner), this.diagram));
1706
1708
  }
1707
1709
  break;
1708
1710
  }
@@ -1729,7 +1731,7 @@ export class DiagramRenderer {
1729
1731
  }
1730
1732
  if (!this.isReadOnly) {
1731
1733
  // Bring the class view to front
1732
- this.diagram.setClassViews(this.reorderDiagramDomain(this.selectedClasses[0], this.diagram));
1734
+ diagram_setClassViews(this.diagram, this.reorderDiagramDomain(this.selectedClasses[0], this.diagram));
1733
1735
  }
1734
1736
  this.clickX =
1735
1737
  eventPointInCanvasCoordinate.x / this.zoom -
@@ -1760,7 +1762,7 @@ export class DiagramRenderer {
1760
1762
  // check for selection of inheritance view
1761
1763
  for (const generalizationView of this.diagram
1762
1764
  .generalizationViews) {
1763
- const val = generalizationView.findOrBuildPoint(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);
1765
+ const val = findOrBuildPoint(generalizationView, eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);
1764
1766
  if (val) {
1765
1767
  this.selectedPoint = val;
1766
1768
  this.setSelectedInheritance(generalizationView);
@@ -1770,7 +1772,7 @@ export class DiagramRenderer {
1770
1772
  // check for selection of association view
1771
1773
  if (!this.selectedPoint) {
1772
1774
  for (const associationView of this.diagram.associationViews) {
1773
- const val = associationView.findOrBuildPoint(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);
1775
+ const val = findOrBuildPoint(associationView, eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);
1774
1776
  if (val) {
1775
1777
  this.selectedPoint = val;
1776
1778
  this.setSelectedPropertyOrAssociation(associationView);
@@ -1781,7 +1783,7 @@ export class DiagramRenderer {
1781
1783
  // check for selection of property view
1782
1784
  if (!this.selectedPoint) {
1783
1785
  for (const propertyView of this.diagram.propertyViews) {
1784
- const val = propertyView.findOrBuildPoint(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);
1786
+ const val = findOrBuildPoint(propertyView, eventPointInModelCoordinate.x, eventPointInModelCoordinate.y, this.zoom, !this.isReadOnly);
1785
1787
  if (val) {
1786
1788
  this.selectedPoint = val;
1787
1789
  this.setSelectedPropertyOrAssociation(propertyView);
@@ -1862,11 +1864,11 @@ export class DiagramRenderer {
1862
1864
  // Resize class view
1863
1865
  if (this.selectedClassCorner) {
1864
1866
  // Make sure width and height are in range!
1865
- this.selectedClassCorner.setRectangle(new Rectangle(eventPointInModelCoordinate.x -
1867
+ positionedRectangle_setRectangle(this.selectedClassCorner, new Rectangle(eventPointInModelCoordinate.x -
1866
1868
  this.selectedClassCorner.position.x, eventPointInModelCoordinate.y -
1867
1869
  this.selectedClassCorner.position.y));
1868
1870
  // Refresh hash since ClassView rectangle is not observable
1869
- this.selectedClassCorner.forceRefreshHash();
1871
+ positionedRectangle_forceRefreshHash(this.selectedClassCorner);
1870
1872
  this.drawClassView(this.selectedClassCorner);
1871
1873
  this.drawScreen();
1872
1874
  }
@@ -1888,9 +1890,9 @@ export class DiagramRenderer {
1888
1890
  (this.clickY - selectedClassOldPosition.oldPos.y);
1889
1891
  newMovingDeltaX = selectedClass.position.x - newMovingX;
1890
1892
  newMovingDeltaY = selectedClass.position.y - newMovingY;
1891
- selectedClass.setPosition(new Point(newMovingX, newMovingY));
1893
+ positionedRectangle_setPosition(selectedClass, new Point(newMovingX, newMovingY));
1892
1894
  // Refresh hash since ClassView position is not observable
1893
- selectedClass.forceRefreshHash();
1895
+ positionedRectangle_forceRefreshHash(selectedClass);
1894
1896
  }
1895
1897
  });
1896
1898
  this.potentiallyShiftRelationships(this.diagram.associationViews, this.selectedClasses, newMovingDeltaX, newMovingDeltaY);
@@ -1902,10 +1904,10 @@ export class DiagramRenderer {
1902
1904
  // Change line (add a new point to the line)
1903
1905
  if (this.selectedPoint) {
1904
1906
  if (this.selectedPropertyOrAssociation) {
1905
- this.selectedPropertyOrAssociation.changePoint(this.selectedPoint, eventPointInModelCoordinate);
1907
+ relationshipView_changePoint(this.selectedPropertyOrAssociation, this.selectedPoint, eventPointInModelCoordinate);
1906
1908
  }
1907
1909
  else if (this.selectedInheritance) {
1908
- this.selectedInheritance.changePoint(this.selectedPoint, eventPointInModelCoordinate);
1910
+ relationshipView_changePoint(this.selectedInheritance, this.selectedPoint, eventPointInModelCoordinate);
1909
1911
  }
1910
1912
  this.selectedPoint = eventPointInModelCoordinate;
1911
1913
  this.drawScreen();
@@ -2028,7 +2030,7 @@ export class DiagramRenderer {
2028
2030
  ];
2029
2031
  for (const propertyHolderView of propertyHolderViews) {
2030
2032
  let fullPath = propertyHolderView.buildFullPath();
2031
- fullPath = manageInsidePointsDynamically(fullPath, propertyHolderView.from.classView.value, propertyHolderView.to.classView.value);
2033
+ fullPath = _relationView_manageInsidePointsDynamically(fullPath, propertyHolderView.from.classView.value, propertyHolderView.to.classView.value);
2032
2034
  const propertyInfoBox = this.drawLinePropertyText(
2033
2035
  // NOTE: by the way we compute the full path, it would guarantee
2034
2036
  // to always have at least 2 points
@@ -2100,11 +2102,11 @@ export class DiagramRenderer {
2100
2102
  : precedentY + precedentTotalHeight + spaceY;
2101
2103
  // Set layout of current level
2102
2104
  if (positionInitialClass || currentLevelIndex > 0) {
2103
- levels[0].setPosition(new Point(startX, currentLevelY));
2105
+ positionedRectangle_setPosition(levels[0], new Point(startX, currentLevelY));
2104
2106
  levels.forEach((view, idx) => {
2105
2107
  if (idx > 0) {
2106
2108
  const precedent = levels[idx - 1];
2107
- view.setPosition(new Point(precedent.position.x + precedent.rectangle.width + spaceX, currentLevelY));
2109
+ positionedRectangle_setPosition(view, new Point(precedent.position.x + precedent.rectangle.width + spaceX, currentLevelY));
2108
2110
  }
2109
2111
  });
2110
2112
  }