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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. package/lib/DiagramRenderer.d.ts +4 -1
  2. package/lib/DiagramRenderer.d.ts.map +1 -1
  3. package/lib/DiagramRenderer.js +21 -23
  4. package/lib/DiagramRenderer.js.map +1 -1
  5. package/lib/components/studio/ClassDiagramPreview.d.ts.map +1 -1
  6. package/lib/components/studio/ClassDiagramPreview.js +3 -1
  7. package/lib/components/studio/ClassDiagramPreview.js.map +1 -1
  8. package/lib/components/studio/DiagramEditor.d.ts.map +1 -1
  9. package/lib/components/studio/DiagramEditor.js +2 -2
  10. package/lib/components/studio/DiagramEditor.js.map +1 -1
  11. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts +2 -1
  12. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts.map +1 -1
  13. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +11 -0
  14. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
  15. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts +34 -0
  16. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts.map +1 -0
  17. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js +94 -0
  18. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js.map +1 -0
  19. package/lib/helpers/DiagramHelper.d.ts +16 -1
  20. package/lib/helpers/DiagramHelper.d.ts.map +1 -1
  21. package/lib/helpers/DiagramHelper.js +87 -1
  22. package/lib/helpers/DiagramHelper.js.map +1 -1
  23. package/lib/index.css +1 -1
  24. package/lib/index.d.ts +0 -1
  25. package/lib/index.d.ts.map +1 -1
  26. package/lib/index.js +0 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts.map +1 -1
  29. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js +0 -4
  30. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js.map +1 -1
  31. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts.map +1 -1
  32. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +0 -8
  33. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
  34. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
  35. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js +0 -4
  36. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js.map +1 -1
  37. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +0 -1
  38. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
  39. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +0 -11
  40. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
  41. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts +0 -3
  42. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts.map +1 -1
  43. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js +0 -7
  44. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js.map +1 -1
  45. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts +0 -4
  46. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts.map +1 -1
  47. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js +0 -7
  48. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js.map +1 -1
  49. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts +6 -1
  50. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +1 -1
  51. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js +6 -6
  52. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +1 -1
  53. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +24 -6
  54. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts.map +1 -1
  55. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js +58 -27
  56. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
  57. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  58. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +0 -4
  59. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
  60. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts +3 -3
  61. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts.map +1 -1
  62. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js +1 -1
  63. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js.map +1 -1
  64. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
  65. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +3 -4
  66. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
  67. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js +2 -2
  68. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js.map +1 -1
  69. package/lib/package.json +2 -2
  70. package/lib/stores/studio/{DSLDiagram_ModifierHelper.d.ts → DSLDiagram_GraphModifierHelper.d.ts} +10 -7
  71. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts.map +1 -0
  72. package/lib/stores/studio/{DSLDiagram_ModifierHelper.js → DSLDiagram_GraphModifierHelper.js} +20 -13
  73. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js.map +1 -0
  74. package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
  75. package/lib/stores/studio/DiagramEditorState.js +10 -7
  76. package/lib/stores/studio/DiagramEditorState.js.map +1 -1
  77. package/package.json +9 -9
  78. package/src/DiagramRenderer.ts +31 -34
  79. package/src/components/studio/ClassDiagramPreview.tsx +3 -1
  80. package/src/components/studio/DiagramEditor.tsx +2 -1
  81. package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +17 -0
  82. package/src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts +153 -0
  83. package/src/helpers/DiagramHelper.ts +122 -1
  84. package/src/index.ts +0 -1
  85. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts +0 -6
  86. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +0 -10
  87. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +0 -6
  88. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +0 -13
  89. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts +0 -11
  90. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts +0 -17
  91. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts +6 -7
  92. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +77 -34
  93. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +0 -5
  94. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts +3 -3
  95. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +6 -4
  96. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts +4 -4
  97. package/src/stores/studio/{DSLDiagram_ModifierHelper.ts → DSLDiagram_GraphModifierHelper.ts} +34 -18
  98. package/src/stores/studio/DiagramEditorState.ts +26 -7
  99. package/tsconfig.json +2 -2
  100. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.d.ts +0 -35
  101. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.d.ts.map +0 -1
  102. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.js +0 -118
  103. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.js.map +0 -1
  104. package/lib/stores/studio/DSLDiagram_ModifierHelper.d.ts.map +0 -1
  105. package/lib/stores/studio/DSLDiagram_ModifierHelper.js.map +0 -1
  106. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.ts +0 -165
@@ -20,8 +20,7 @@ import { Point } from '../../../../../metamodels/pure/packageableElements/diagra
20
20
  import { Rectangle } from '../../../../../metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
21
21
  import { PropertyView } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
22
22
  import { GeneralizationView } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
23
- import { getClassView } from '../../../../../../helpers/DiagramHelper';
24
- import { _relationView_possiblyFlattenPath } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper';
23
+ import { getClassView, _relationshipView_simplifyPath, } from '../../../../../../helpers/DiagramHelper';
25
24
  const buildPoint = (point) => {
26
25
  const x = guaranteeNonNullable(point.x, `Point 'x' coordinate is missing`);
27
26
  const y = guaranteeNonNullable(point.y, `Point 'y' coordinate is missing`);
@@ -53,7 +52,7 @@ export const V1_buildPropertyView = (propertyView, context, diagram) => {
53
52
  const property = context.resolveOwnedProperty(propertyView.property);
54
53
  const view = new PropertyView(diagram, property, sourceClassView, targetClassView);
55
54
  view.path = propertyView.line.points.map((point) => buildPoint(point));
56
- _relationView_possiblyFlattenPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
55
+ _relationshipView_simplifyPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
57
56
  return view;
58
57
  };
59
58
  export const V1_buildGeneralizationView = (generalizationView, diagram) => {
@@ -62,7 +61,7 @@ export const V1_buildGeneralizationView = (generalizationView, diagram) => {
62
61
  const targetClassView = guaranteeNonNullable(getClassView(diagram, guaranteeNonNullable(generalizationView.targetView)), `Generalization view 'targetView' field is missing`);
63
62
  const view = new GeneralizationView(diagram, sourceClassView, targetClassView);
64
63
  view.path = generalizationView.line.points.map((point) => buildPoint(point));
65
- _relationView_possiblyFlattenPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
64
+ _relationshipView_simplifyPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
66
65
  return view;
67
66
  };
68
67
  export const V1_resolveDiagram = (path, context) => context.createImplicitPackageableElementReference(path, (_path) => getDiagram(_path, context.graph));
@@ -1 +1 @@
1
- {"version":3,"file":"V1_DSLDiagram_GraphBuilderHelper.js","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAK1F,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,sBAA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_GraphBuilderHelper.js","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAK1F,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,iFAAiF,CAAC;AAC5G,OAAO,EAAE,KAAK,EAAE,MAAM,sFAAsF,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,0FAA0F,CAAC;AACrH,OAAO,EAAE,YAAY,EAAE,MAAM,oFAAoF,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0FAA0F,CAAC;AAM9H,OAAO,EACL,YAAY,EACZ,8BAA8B,GAC/B,MAAM,yCAAyC,CAAC;AAEjD,MAAM,UAAU,GAAG,CAAC,KAAe,EAAS,EAAE;IAC5C,MAAM,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAE,iCAAiC,CAAC,CAAC;IAC3E,MAAM,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAE,iCAAiC,CAAC,CAAC;IAC3E,OAAO,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,SAAuB,EAAa,EAAE;IAC5D,MAAM,KAAK,GAAG,oBAAoB,CAChC,SAAS,CAAC,KAAK,EACf,8BAA8B,CAC/B,CAAC;IACF,MAAM,MAAM,GAAG,oBAAoB,CACjC,SAAS,CAAC,MAAM,EAChB,+BAA+B,CAChC,CAAC;IACF,OAAO,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/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C,MAAM,iBAAiB,GAAG,CAC/B,IAAY,EACZ,OAA+B,EACe,EAAE,CAChD,OAAO,CAAC,yCAAyC,CAAC,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE,CACxE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CACjC,CAAC"}
@@ -37,7 +37,7 @@ const createPoint = (x, y) => {
37
37
  const transformPropertyView = (element) => {
38
38
  const view = new V1_PropertyView();
39
39
  const line = new V1_Line();
40
- line.points = element.fullPath;
40
+ line.points = element.pathForSerialization;
41
41
  view.line = line;
42
42
  view.property = V1_transformPropertyReference(element.property);
43
43
  view.sourceView = relationshipEdgeViewTransformer(element.from);
@@ -47,7 +47,7 @@ const transformPropertyView = (element) => {
47
47
  const transformGenerationView = (element) => {
48
48
  const view = new V1_GeneralizationView();
49
49
  const line = new V1_Line();
50
- line.points = element.fullPath;
50
+ line.points = element.pathForSerialization;
51
51
  view.line = line;
52
52
  view.sourceView = relationshipEdgeViewTransformer(element.from);
53
53
  view.targetView = relationshipEdgeViewTransformer(element.to);
@@ -1 +1 @@
1
- {"version":3,"file":"V1_DSLDiagram_TransformerHelper.js","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,EAAE,QAAQ,EAAE,MAAM,sEAAsE,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,iEAAiE,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,+DAA+D,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0EAA0E,CAAC;AACjH,OAAO,EAAE,OAAO,EAAE,MAAM,qEAAqE,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,0EAA0E,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,oEAAoE,CAAC;AACrG,OAAO,EACL,yBAAyB,EACzB,4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AU,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAChE,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC,GAAG,CAC3D,uBAAuB,CACxB,CAAC;IACF,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACzE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
1
+ {"version":3,"file":"V1_DSLDiagram_TransformerHelper.js","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,EAAE,QAAQ,EAAE,MAAM,sEAAsE,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,iEAAiE,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,+DAA+D,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0EAA0E,CAAC;AACjH,OAAO,EAAE,OAAO,EAAE,MAAM,qEAAqE,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,0EAA0E,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,oEAAoE,CAAC;AACrG,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,+BAA+B,GAAG,CAAC,KAA2B,EAAU,EAAE,CAC9E,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;AAE3B,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,KAAa,EAAgB,EAAE;IACtE,MAAM,SAAS,GAAG,IAAI,YAAY,EAAE,CAAC;IACrC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACxB,OAAO,SAAS,CAAC;AACnB,C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3
+ "version": "1.0.30",
4
4
  "description": "Legend extension for Diagram DSL",
5
5
  "keywords": [
6
6
  "legend",
@@ -64,7 +64,7 @@
64
64
  "jest-canvas-mock": "2.3.1",
65
65
  "npm-run-all": "4.1.5",
66
66
  "rimraf": "3.0.2",
67
- "sass": "1.49.11",
67
+ "sass": "1.50.0",
68
68
  "typescript": "4.6.3"
69
69
  },
70
70
  "peerDependencies": {
@@ -18,7 +18,7 @@ import type { ClassView } from '../../models/metamodels/pure/packageableElements
18
18
  import type { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
19
19
  import type { GeneralizationView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
20
20
  import type { PropertyView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
21
- import type { RelationShipEdgeView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
21
+ import type { RelationshipEdgeView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
22
22
  import type { RelationshipView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
23
23
  import type { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
24
24
  import type { PositionedRectangle } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
@@ -37,18 +37,21 @@ export declare const diagram_deletePropertyView: (diagram: Diagram, val: Propert
37
37
  export declare const classView_setHideProperties: (cv: ClassView, val: boolean) => void;
38
38
  export declare const classView_setHideStereotypes: (cv: ClassView, val: boolean) => void;
39
39
  export declare const classView_setHideTaggedValues: (cv: ClassView, val: boolean) => void;
40
- export declare const relationShipEdgeView_setOffsetX: (r: RelationShipEdgeView, val: number) => void;
41
- export declare const relationShipEdgeView_setOffsetY: (r: RelationShipEdgeView, val: number) => void;
40
+ export declare const relationshipEdgeView_setOffsetX: (r: RelationshipEdgeView, val: number) => void;
41
+ export declare const relationshipEdgeView_setOffsetY: (r: RelationshipEdgeView, val: number) => void;
42
42
  export declare const relationshipView_changePoint: (v: RelationshipView, val: Point, newVal: Point) => void;
43
- export declare const relationView_possiblyFlattenPath: (relationView: RelationshipView) => void;
44
- export declare const findOrBuildPoint: (relationView: RelationshipView, x: number, y: number, zoom: number, allowChange?: boolean) => Point | undefined;
45
- export declare const relationView_setPath: (relationView: RelationshipView, val: Point[]) => void;
43
+ export declare const relationshipView_simplifyPath: (relationshipView: RelationshipView) => void;
44
+ export declare const findOrBuildPoint: (relationshipView: RelationshipView, x: number, y: number, zoom: number, allowChange: boolean) => Point | undefined;
45
+ export declare const relationshipView_setPath: (relationshipView: RelationshipView, val: Point[]) => void;
46
46
  export declare const positionedRectangle_setRectangle: (pR: PositionedRectangle, value: Rectangle) => void;
47
47
  export declare const positionedRectangle_setPosition: (pR: PositionedRectangle, value: Point) => void;
48
48
  /**
49
49
  * NOTE: Having `position` and `rectangle` as observables compromises the performance of diagram
50
50
  * so we want to have a way to refresh the hash for change detection to pick up new hash when we resize
51
51
  * the class view box or move it.
52
+ *
53
+ * We should re-consider the usefulness of this method, maybe it's more worthwhile to recompute hash
54
+ * for the whole diagram instead?
52
55
  */
53
56
  export declare const positionedRectangle_forceRefreshHash: (pR: PositionedRectangle) => void;
54
- //# sourceMappingURL=DSLDiagram_ModifierHelper.d.ts.map
57
+ //# sourceMappingURL=DSLDiagram_GraphModifierHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSLDiagram_GraphModifierHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/DSLDiagram_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAC3H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+EAA+E,CAAC;AAC/G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6EAA6E,CAAC;AAC3G,O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S,OAAO,OAAO,KAAG,IAGhC,CAAC;AACF,eAAO,MAAM,4BAA4B,OAClC,SAAS,OAAO,OAAO,KAAG,IAGhC,CAAC;AACF,eAAO,MAAM,6BAA6B,OACnC,SAAS,OAAO,OAAO,KAAG,IAGhC,CAAC;AACF,eAAO,MAAM,+BAA+B,MACtC,oBAAoB,OAAO,MAAM,KAAG,IAGzC,CAAC;AACF,eAAO,MAAM,+BAA+B,MACtC,oBAAoB,OAAO,MAAM,KAAG,IAGzC,CAAC;AAGF,eAAO,MAAM,4BAA4B,MACnC,gBAAgB,OAAO,KAAK,UAAU,KAAK,KAAG,IAGnD,CAAC;AACF,eAAO,MAAM,6BAA6B,8CAEzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,qHAA4B,CAAC;AAC1D,eAAO,MAAM,wBAAwB,4DAAoC,CAAC;AAG1E,eAAO,MAAM,gCAAgC,OACtC,mBAAmB,SAAS,SAAS,KAAG,IAG9C,CAAC;AAGF,eAAO,MAAM,+BAA+B,OACrC,mBAAmB,SAAS,KAAK,KAAG,IAG1C,CAAC;AACF;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC,OAC1C,mBAAmB,KAAG,IAG5B,CAAC"}
@@ -15,36 +15,37 @@
15
15
  */
16
16
  import { addUniqueEntry, changeEntry, deleteEntry } from '@finos/legend-shared';
17
17
  import { action } from 'mobx';
18
- import { _findOrBuildPoint, _relationView_possiblyFlattenPath, _relationView_setPath, } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper';
18
+ import { _findOrBuildPoint, _relationshipView_simplifyPath, _relationshipView_setPath, } from '../../helpers/DiagramHelper';
19
+ import { observe_AssociationView, observe_ClassView, observe_GeneralizationView, observe_PropertyView, } from '../../graphManager/action/changeDetection/DSLDiagram_ObserverHelper';
19
20
  export const diagram_setClassViews = action((diagram, val) => {
20
- diagram.classViews = val;
21
+ diagram.classViews = val.map(observe_ClassView);
21
22
  });
22
23
  export const diagram_addClassView = action((diagram, val) => {
23
- addUniqueEntry(diagram.classViews, val);
24
+ addUniqueEntry(diagram.classViews, observe_ClassView(val));
24
25
  });
25
26
  export const diagram_deleteClassView = action((diagram, val) => {
26
27
  deleteEntry(diagram.classViews, val);
27
28
  });
28
29
  export const diagram_setAssociationViews = action((diagram, val) => {
29
- diagram.associationViews = val;
30
+ diagram.associationViews = val.map(observe_AssociationView);
30
31
  });
31
32
  export const diagram_deleteAssociationView = action((diagram, val) => {
32
33
  deleteEntry(diagram.associationViews, val);
33
34
  });
34
35
  export const diagram_setGeneralizationViews = action((diagram, val) => {
35
- diagram.generalizationViews = val;
36
+ diagram.generalizationViews = val.map(observe_GeneralizationView);
36
37
  });
37
38
  export const diagram_addGeneralizationView = action((diagram, val) => {
38
- addUniqueEntry(diagram.generalizationViews, val);
39
+ addUniqueEntry(diagram.generalizationViews, observe_GeneralizationView(val));
39
40
  });
40
41
  export const diagram_deleteGeneralizationView = action((diagram, val) => {
41
42
  deleteEntry(diagram.generalizationViews, val);
42
43
  });
43
44
  export const diagram_setPropertyViews = action((diagram, val) => {
44
- diagram.propertyViews = val;
45
+ diagram.propertyViews = val.map(observe_PropertyView);
45
46
  });
46
47
  export const diagram_addPropertyView = action((diagram, val) => {
47
- addUniqueEntry(diagram.propertyViews, val);
48
+ addUniqueEntry(diagram.propertyViews, observe_PropertyView(val));
48
49
  });
49
50
  export const diagram_deletePropertyView = action((diagram, val) => {
50
51
  deleteEntry(diagram.propertyViews, val);
@@ -58,21 +59,24 @@ export const classView_setHideStereotypes = action((cv, val) => {
58
59
  export const classView_setHideTaggedValues = action((cv, val) => {
59
60
  cv.hideTaggedValues = val;
60
61
  });
61
- export const relationShipEdgeView_setOffsetX = action((r, val) => {
62
+ export const relationshipEdgeView_setOffsetX = action((r, val) => {
62
63
  r.offsetX = val;
63
64
  });
64
- export const relationShipEdgeView_setOffsetY = action((r, val) => {
65
+ export const relationshipEdgeView_setOffsetY = action((r, val) => {
65
66
  r.offsetY = val;
66
67
  });
68
+ // To optimize performance we will not observe point (path)
67
69
  export const relationshipView_changePoint = action((v, val, newVal) => {
68
70
  changeEntry(v.path, val, newVal);
69
71
  });
70
- export const relationView_possiblyFlattenPath = action(_relationView_possiblyFlattenPath);
72
+ export const relationshipView_simplifyPath = action(_relationshipView_simplifyPath);
71
73
  export const findOrBuildPoint = action(_findOrBuildPoint);
72
- export const relationView_setPath = action(_relationView_setPath);
74
+ export const relationshipView_setPath = action(_relationshipView_setPath);
75
+ // To optimize performance we will not observe rectangle
73
76
  export const positionedRectangle_setRectangle = action((pR, value) => {
74
77
  pR.rectangle = value;
75
78
  });
79
+ // To optimize performance we will not observe point (path)
76
80
  export const positionedRectangle_setPosition = action((pR, value) => {
77
81
  pR.position = value;
78
82
  });
@@ -80,8 +84,11 @@ export const positionedRectangle_setPosition = action((pR, value) => {
80
84
  * NOTE: Having `position` and `rectangle` as observables compromises the performance of diagram
81
85
  * so we want to have a way to refresh the hash for change detection to pick up new hash when we resize
82
86
  * the class view box or move it.
87
+ *
88
+ * We should re-consider the usefulness of this method, maybe it's more worthwhile to recompute hash
89
+ * for the whole diagram instead?
83
90
  */
84
91
  export const positionedRectangle_forceRefreshHash = action((pR) => {
85
92
  pR.dummyObservable = {};
86
93
  });
87
- //# sourceMappingURL=DSLDiagram_ModifierHelper.js.map
94
+ //# sourceMappingURL=DSLDiagram_GraphModifierHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSLDiagram_GraphModifierHelper.js","sourceRoot":"","sources":["../../../src/stores/studio/DSLDiagram_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAK9B,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EACL,uBA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}
198
198
  else if (this.renderer.mouseOverClassProperty) {
199
199
  return this.isReadOnly ||
200
- this.renderer.mouseOverClassProperty.owner.isReadOnly
200
+ this.editorStore.graphManagerState.isElementReadOnly(this.renderer.mouseOverClassProperty.owner)
201
201
  ? 'diagram-editor__cursor--not-allowed'
202
202
  : 'diagram-editor__cursor--text';
203
203
  }
204
204
  else if (this.renderer.mouseOverPropertyHolderViewLabel) {
205
205
  return this.isReadOnly ||
206
- this.renderer.mouseOverPropertyHolderViewLabel.property.value.owner
207
- .isReadOnly
206
+ this.editorStore.graphManagerState.isElementReadOnly(this.renderer.mouseOverPropertyHolderViewLabel.property.value
207
+ .owner)
208
208
  ? 'diagram-editor__cursor--not-allowed'
209
209
  : 'diagram-editor__cursor--text';
210
210
  }
211
211
  else if (this.renderer.mouseOverClassName) {
212
212
  return this.isReadOnly ||
213
- this.renderer.mouseOverClassName.class.value.isReadOnly
213
+ this.editorStore.graphManagerState.isElementReadOnly(this.renderer.mouseOverClassName.class.value)
214
214
  ? 'diagram-editor__cursor--not-allowed'
215
215
  : 'diagram-editor__cursor--text';
216
216
  }
@@ -270,19 +270,22 @@ export class DiagramEditorState extends ElementEditorState {
270
270
  this.setContextMenuClassView(classView);
271
271
  };
272
272
  this.renderer.onClassNameDoubleClick = (classView, point) => {
273
- if (!this.isReadOnly && !classView.class.value.isReadOnly) {
273
+ if (!this.isReadOnly &&
274
+ !this.editorStore.graphManagerState.isElementReadOnly(classView.class.value)) {
274
275
  this.setInlineClassRenamerState(new DiagramEditorInlineClassRenamerState(this, classView, point));
275
276
  }
276
277
  };
277
278
  const editProperty = (property, point, propertyHolderView) => {
278
- if (!this.isReadOnly && !property.owner.isReadOnly) {
279
+ if (!this.isReadOnly &&
280
+ !this.editorStore.graphManagerState.isElementReadOnly(property.owner)) {
279
281
  this.setInlinePropertyEditorState(new DiagramEditorInlinePropertyEditorState(this, property, point, Boolean(propertyHolderView)));
280
282
  }
281
283
  };
282
284
  this.renderer.onClassPropertyDoubleClick = editProperty;
283
285
  this.renderer.handleEditProperty = editProperty;
284
286
  this.renderer.handleAddSimpleProperty = (classView) => {
285
- if (!this.isReadOnly && !classView.class.value.isReadOnly) {
287
+ if (!this.isReadOnly &&
288
+ !this.editorStore.graphManagerState.isElementReadOnly(classView.class.value)) {
286
289
  const _class = classView.class.value;
287
290
  class_addProperty(_class, new Property(`property_${_class.properties.length + 1}`, this.editorStore.graphManagerState.graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE), GenericTypeExplicitReference.create(new GenericType(this.editorStore.graphManagerState.graph.getPrimitiveType(PRIMITIVE_TYPE.STRING))), _class));
288
291
  this.renderer.render();
@@ -1 +1 @@
1
- {"version":3,"file":"DiagramEditorState.js","sourceRoot":"","sources":["../../../src/stores/studio/DiagramEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAIL,4BAA4B,EAC5B,cAAc,EACd,yBAAyB,EACzB,QAAQ,EACR,WAAW,EACX,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,OAAO,EAAE,MAAM,6EAA6E,CAAC;AAGtG,IAAK,qBASJ;AATD,WAAK,qBAAqB;IACxB,8CAAqB,CAAA;IACrB,wDAA+B,CAAA;IAC/B,wDAA+B,CAAA;IAC/B,sDAA6B,CAAA;IAC7B,gEAAuC,CAAA;IACvC,sEA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0CAA0C;YAC1C,CAAC,CAAC,QAAQ,CAAC,aAAa;gBACtB,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CACvC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,CAC7C,CAAC,EACJ;YACA,OAAO,CAAC,KAAK,CAAC,CAAC;SAChB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEZ,SAAS,CACP,UAA8B,EAC9B,WAAwB;QAExB,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAC3E,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-diagram",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "Legend extension for Diagram DSL",
5
5
  "keywords": [
6
6
  "legend",
@@ -40,12 +40,12 @@
40
40
  "test:watch": "jest --watch"
41
41
  },
42
42
  "dependencies": {
43
- "@finos/legend-application": "2.0.8",
44
- "@finos/legend-art": "0.3.13",
45
- "@finos/legend-graph": "2.1.3",
46
- "@finos/legend-model-storage": "0.0.26",
47
- "@finos/legend-shared": "1.2.7",
48
- "@finos/legend-studio": "5.1.3",
43
+ "@finos/legend-application": "2.0.9",
44
+ "@finos/legend-art": "0.3.14",
45
+ "@finos/legend-graph": "3.0.0",
46
+ "@finos/legend-model-storage": "0.0.27",
47
+ "@finos/legend-shared": "1.2.8",
48
+ "@finos/legend-studio": "5.1.4",
49
49
  "@types/react": "17.0.43",
50
50
  "mobx": "6.5.0",
51
51
  "mobx-react-lite": "3.3.0",
@@ -56,7 +56,7 @@
56
56
  "serializr": "2.0.5"
57
57
  },
58
58
  "devDependencies": {
59
- "@finos/legend-dev-utils": "0.3.17",
59
+ "@finos/legend-dev-utils": "0.3.18",
60
60
  "@testing-library/react": "12.1.4",
61
61
  "cross-env": "7.0.3",
62
62
  "eslint": "8.12.0",
@@ -64,7 +64,7 @@
64
64
  "jest-canvas-mock": "2.3.1",
65
65
  "npm-run-all": "4.1.5",
66
66
  "rimraf": "3.0.2",
67
- "sass": "1.49.11",
67
+ "sass": "1.50.0",
68
68
  "typescript": "4.6.3"
69
69
  },
70
70
  "peerDependencies": {
@@ -45,7 +45,7 @@ import { PositionedRectangle } from './models/metamodels/pure/packageableElement
45
45
  import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
46
46
  import type { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView';
47
47
  import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
48
- import type { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
48
+ import { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
49
49
  import { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
50
50
  import { getElementPosition } from './helpers/DiagramHelper';
51
51
  import { AssociationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView';
@@ -69,13 +69,12 @@ import {
69
69
  positionedRectangle_forceRefreshHash,
70
70
  positionedRectangle_setPosition,
71
71
  positionedRectangle_setRectangle,
72
- relationShipEdgeView_setOffsetX,
73
- relationShipEdgeView_setOffsetY,
72
+ relationshipEdgeView_setOffsetX,
73
+ relationshipEdgeView_setOffsetY,
74
74
  relationshipView_changePoint,
75
- relationView_possiblyFlattenPath,
76
- relationView_setPath,
77
- } from './stores/studio/DSLDiagram_ModifierHelper';
78
- import { _relationView_manageInsidePointsDynamically } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper';
75
+ relationshipView_simplifyPath,
76
+ relationshipView_setPath,
77
+ } from './stores/studio/DSLDiagram_GraphModifierHelper';
79
78
 
80
79
  export enum DIAGRAM_INTERACTION_MODE {
81
80
  LAYOUT,
@@ -746,9 +745,8 @@ export class DiagramRenderer {
746
745
  .concat(this.diagram.generalizationViews)
747
746
  .concat(this.diagram.propertyViews);
748
747
  for (const relationshipView of relationshipViews) {
749
- let fullPath = relationshipView.buildFullPath();
750
- fullPath = _relationView_manageInsidePointsDynamically(
751
- fullPath,
748
+ const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(
749
+ relationshipView.buildFullPath(),
752
750
  relationshipView.from.classView.value,
753
751
  relationshipView.to.classView.value,
754
752
  );
@@ -1823,9 +1821,8 @@ export class DiagramRenderer {
1823
1821
  }
1824
1822
 
1825
1823
  private drawPropertyOrAssociation(propertyView: PropertyView): void {
1826
- let fullPath = propertyView.buildFullPath();
1827
- fullPath = _relationView_manageInsidePointsDynamically(
1828
- fullPath,
1824
+ const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(
1825
+ propertyView.buildFullPath(),
1829
1826
  propertyView.from.classView.value,
1830
1827
  propertyView.to.classView.value,
1831
1828
  );
@@ -1914,9 +1911,8 @@ export class DiagramRenderer {
1914
1911
 
1915
1912
  private drawInheritance(inheritance: GeneralizationView): void {
1916
1913
  const rect = inheritance.to.classView.value.rectangle;
1917
- let fullPath = inheritance.buildFullPath();
1918
- fullPath = _relationView_manageInsidePointsDynamically(
1919
- fullPath,
1914
+ const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(
1915
+ inheritance.buildFullPath(),
1920
1916
  inheritance.from.classView.value,
1921
1917
  inheritance.to.classView.value,
1922
1918
  );
@@ -2061,21 +2057,23 @@ export class DiagramRenderer {
2061
2057
  return newClasses;
2062
2058
  }
2063
2059
 
2064
- // TODO: add doc
2060
+ /**
2061
+ * Shift relationship views if both ends' classviews are moved.
2062
+ */
2065
2063
  private potentiallyShiftRelationships(
2066
- assoViews: RelationshipView[],
2064
+ relationshipViews: RelationshipView[],
2067
2065
  selectedClasses: ClassView[],
2068
2066
  newMovingDeltaX: number,
2069
2067
  newMovingDeltaY: number,
2070
2068
  ): void {
2071
- assoViews.forEach((assoView) => {
2069
+ relationshipViews.forEach((view) => {
2072
2070
  if (
2073
- selectedClasses.indexOf(assoView.from.classView.value) !== -1 &&
2074
- selectedClasses.indexOf(assoView.to.classView.value) !== -1
2071
+ selectedClasses.indexOf(view.from.classView.value) !== -1 &&
2072
+ selectedClasses.indexOf(view.to.classView.value) !== -1
2075
2073
  ) {
2076
- relationView_setPath(
2077
- assoView,
2078
- assoView.path.map(
2074
+ relationshipView_setPath(
2075
+ view,
2076
+ view.path.map(
2079
2077
  (point) =>
2080
2078
  new Point(point.x - newMovingDeltaX, point.y - newMovingDeltaY),
2081
2079
  ),
@@ -2379,13 +2377,13 @@ export class DiagramRenderer {
2379
2377
  switch (this.interactionMode) {
2380
2378
  case DIAGRAM_INTERACTION_MODE.LAYOUT: {
2381
2379
  this.diagram.generalizationViews.forEach((generalizationView) =>
2382
- relationView_possiblyFlattenPath(generalizationView),
2380
+ relationshipView_simplifyPath(generalizationView),
2383
2381
  );
2384
2382
  this.diagram.associationViews.forEach((associationView) =>
2385
- relationView_possiblyFlattenPath(associationView),
2383
+ relationshipView_simplifyPath(associationView),
2386
2384
  );
2387
2385
  this.diagram.propertyViews.forEach((propertyView) =>
2388
- relationView_possiblyFlattenPath(propertyView),
2386
+ relationshipView_simplifyPath(propertyView),
2389
2387
  );
2390
2388
  break;
2391
2389
  }
@@ -2473,7 +2471,7 @@ export class DiagramRenderer {
2473
2471
  );
2474
2472
 
2475
2473
  if (gview) {
2476
- relationShipEdgeView_setOffsetX(
2474
+ relationshipEdgeView_setOffsetX(
2477
2475
  gview.from,
2478
2476
  -(
2479
2477
  this.startClassView.position.x +
@@ -2481,7 +2479,7 @@ export class DiagramRenderer {
2481
2479
  this.selectionStart.x
2482
2480
  ),
2483
2481
  );
2484
- relationShipEdgeView_setOffsetY(
2482
+ relationshipEdgeView_setOffsetY(
2485
2483
  gview.from,
2486
2484
  -(
2487
2485
  this.startClassView.position.y +
@@ -2489,7 +2487,7 @@ export class DiagramRenderer {
2489
2487
  this.selectionStart.y
2490
2488
  ),
2491
2489
  );
2492
- relationShipEdgeView_setOffsetX(
2490
+ relationshipEdgeView_setOffsetX(
2493
2491
  gview.to,
2494
2492
  -(
2495
2493
  targetClassView.position.x +
@@ -2497,7 +2495,7 @@ export class DiagramRenderer {
2497
2495
  eventPointInModelCoordinate.x
2498
2496
  ),
2499
2497
  );
2500
- relationShipEdgeView_setOffsetY(
2498
+ relationshipEdgeView_setOffsetY(
2501
2499
  gview.to,
2502
2500
  -(
2503
2501
  targetClassView.position.y +
@@ -3164,9 +3162,8 @@ export class DiagramRenderer {
3164
3162
  ...this.diagram.associationViews,
3165
3163
  ];
3166
3164
  for (const propertyHolderView of propertyHolderViews) {
3167
- let fullPath = propertyHolderView.buildFullPath();
3168
- fullPath = _relationView_manageInsidePointsDynamically(
3169
- fullPath,
3165
+ const fullPath = RelationshipView.pruneUnnecessaryInsidePoints(
3166
+ propertyHolderView.buildFullPath(),
3170
3167
  propertyHolderView.from.classView.value,
3171
3168
  propertyHolderView.to.classView.value,
3172
3169
  );
@@ -21,11 +21,13 @@ import { useApplicationStore } from '@finos/legend-application';
21
21
  import type { Class } from '@finos/legend-graph';
22
22
  import { InheritanceDiagramRenderer } from './InheritanceDiagramRenderer';
23
23
  import { DSL_DIAGRAM_TEST_ID } from './DSLDiagram_TestID';
24
+ import { useEditorStore } from '@finos/legend-studio';
24
25
 
25
26
  export const ClassDiagramPreview = observer((props: { _class: Class }) => {
26
27
  const { _class } = props;
27
28
  const applicationStore = useApplicationStore();
28
- const classHash = _class.isReadOnly
29
+ const editorStore = useEditorStore();
30
+ const classHash = editorStore.graphManagerState.isElementReadOnly(_class)
29
31
  ? undefined
30
32
  : applicationStore.notifyAndReturnAlternativeOnError(
31
33
  () => _class.hashCode,
@@ -112,7 +112,7 @@ import {
112
112
  classView_setHideProperties,
113
113
  classView_setHideStereotypes,
114
114
  classView_setHideTaggedValues,
115
- } from '../../stores/studio/DSLDiagram_ModifierHelper';
115
+ } from '../../stores/studio/DSLDiagram_GraphModifierHelper';
116
116
 
117
117
  const DiagramEditorContextMenu = observer(
118
118
  forwardRef<
@@ -865,6 +865,7 @@ const DiagramEditorInlineClassCreatorInner = observer(
865
865
  package_addElement(
866
866
  editorStore.graphManagerState.graph.getOrCreatePackage(packagePath),
867
867
  _class,
868
+ editorStore.changeDetectionState.observerContext,
868
869
  );
869
870
  editorStore.graphManagerState.graph.addElement(_class);
870
871
  editorStore.explorerTreeState.reprocess();