@finos/legend-extension-dsl-diagram 2.0.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/DSLDiagram_Extension.d.ts +0 -2
- package/lib/DSLDiagram_Extension.d.ts.map +1 -1
- package/lib/DSLDiagram_Extension.js +8 -9
- package/lib/DSLDiagram_Extension.js.map +1 -1
- package/lib/DiagramRenderer.d.ts +8 -8
- package/lib/DiagramRenderer.d.ts.map +1 -1
- package/lib/DiagramRenderer.js +42 -44
- package/lib/DiagramRenderer.js.map +1 -1
- package/lib/components/studio/ClassDiagramPreview.d.ts +1 -1
- package/lib/components/studio/ClassDiagramPreview.js +2 -2
- package/lib/components/studio/ClassDiagramPreview.js.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts +4 -14
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js +8 -6
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.d.ts.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js +10 -10
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts +3 -3
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts.map +1 -1
- package/lib/components/studio/DSLDiagram_TestID.js +1 -1
- package/lib/components/studio/DSLDiagram_TestID.js.map +1 -1
- package/lib/components/studio/DiagramEditor.d.ts +1 -1
- package/lib/components/studio/DiagramEditor.js +5 -5
- package/lib/components/studio/DiagramEditor.js.map +1 -1
- package/lib/components/studio/InheritanceDiagramRenderer.d.ts +1 -1
- package/lib/components/studio/InheritanceDiagramRenderer.d.ts.map +1 -1
- package/lib/components/studio/InheritanceDiagramRenderer.js +3 -3
- package/lib/components/studio/InheritanceDiagramRenderer.js.map +1 -1
- package/lib/graph/DSLDiagram_PureGraphPlugin.js +2 -2
- package/lib/graph/DSLDiagram_PureGraphPlugin.js.map +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts.map +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.js +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.js.map +1 -1
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +2 -2
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts +10 -10
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts.map +1 -1
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js +1 -1
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js.map +1 -1
- package/lib/helpers/{DiagramHelper.d.ts → DSLDiagram_Helper.d.ts} +28 -6
- package/lib/helpers/DSLDiagram_Helper.d.ts.map +1 -0
- package/lib/helpers/{DiagramHelper.js → DSLDiagram_Helper.js} +56 -9
- package/lib/helpers/{DiagramHelper.js.map → DSLDiagram_Helper.js.map} +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +18 -18
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -18
- package/lib/index.js.map +1 -1
- package/lib/models/DSLDiagram_ModelUtils.js +1 -1
- package/lib/models/DSLDiagram_ModelUtils.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts +3 -3
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts +3 -3
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +6 -6
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +4 -4
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts +3 -3
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +7 -7
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js +20 -12
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.d.ts → DSLDiagram_RelationshipViewEnd.d.ts} +6 -6
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.js → DSLDiagram_RelationshipViewEnd.js} +5 -5
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts +0 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js +1 -7
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts +3 -9
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +11 -22
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js.map +1 -1
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js +6 -6
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts +3 -3
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts +7 -7
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +8 -8
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts +2 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js +7 -7
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js +7 -7
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js.map +1 -1
- package/lib/package.json +15 -14
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts +12 -12
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js +8 -8
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js.map +1 -1
- package/lib/stores/studio/DiagramEditorState.d.ts +5 -5
- package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
- package/lib/stores/studio/DiagramEditorState.js +6 -6
- package/lib/stores/studio/DiagramEditorState.js.map +1 -1
- package/package.json +22 -21
- package/src/DSLDiagram_Extension.ts +8 -11
- package/src/DiagramRenderer.ts +64 -53
- package/src/components/studio/ClassDiagramPreview.tsx +2 -2
- package/src/components/studio/DSLDiagram_LegendStudioDocumentation.ts +13 -6
- package/src/components/studio/DSLDiagram_LegendStudioPlugin.tsx +14 -13
- package/src/components/studio/DSLDiagram_LegendStudioPlugin_Extension.tsx +2 -2
- package/src/components/studio/DiagramEditor.tsx +6 -6
- package/src/components/studio/InheritanceDiagramRenderer.ts +3 -3
- package/src/graph/DSLDiagram_PureGraphPlugin.ts +2 -2
- package/src/graphManager/DSLDiagram_GraphManagerHelper.ts +1 -1
- package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +2 -2
- package/src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts +11 -11
- package/src/helpers/{DiagramHelper.ts → DSLDiagram_Helper.ts} +102 -11
- package/src/index.ts +21 -18
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts +4 -4
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +8 -7
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +3 -3
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +5 -5
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts +2 -2
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.ts +4 -4
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts +2 -2
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +26 -17
- package/src/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.ts → DSLDiagram_RelationshipViewEnd.ts} +6 -5
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.ts +1 -9
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +12 -42
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.ts +1 -1
- package/src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts +6 -6
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.ts +4 -4
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.ts +3 -3
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.ts +1 -1
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.ts +1 -1
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.ts +3 -3
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.ts +1 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +14 -14
- package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts +13 -13
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.ts +7 -7
- package/src/stores/studio/DSLDiagram_GraphModifierHelper.ts +22 -20
- package/src/stores/studio/DiagramEditorState.ts +9 -9
- package/tsconfig.json +5 -11
- package/tsconfig.package.json +1 -4
- package/lib/helpers/DiagramHelper.d.ts.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts +0 -26
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js +0 -37
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js.map +0 -1
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts +0 -44
@@ -14,9 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { AbstractPreset } from '@finos/legend-shared';
|
17
|
-
import type { GraphPluginManager } from '@finos/legend-graph';
|
18
17
|
export declare class DSLDiagram_GraphPreset extends AbstractPreset {
|
19
18
|
constructor();
|
20
|
-
install(pluginManager: GraphPluginManager): void;
|
21
19
|
}
|
22
20
|
//# sourceMappingURL=DSLDiagram_Extension.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSLDiagram_Extension.d.ts","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"DSLDiagram_Extension.d.ts","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,qBAAa,sBAAuB,SAAQ,cAAc;;CAQzD"}
|
@@ -15,17 +15,16 @@
|
|
15
15
|
*/
|
16
16
|
import packageJson from '../package.json';
|
17
17
|
import { AbstractPreset } from '@finos/legend-shared';
|
18
|
-
import { DSLDiagram_PureGraphManagerPlugin } from './graphManager/DSLDiagram_PureGraphManagerPlugin';
|
19
|
-
import { DSLDiagram_PureProtocolProcessorPlugin } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin';
|
20
|
-
import { DSLDiagram_PureGraphPlugin } from './graph/DSLDiagram_PureGraphPlugin';
|
18
|
+
import { DSLDiagram_PureGraphManagerPlugin } from './graphManager/DSLDiagram_PureGraphManagerPlugin.js';
|
19
|
+
import { DSLDiagram_PureProtocolProcessorPlugin } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js';
|
20
|
+
import { DSLDiagram_PureGraphPlugin } from './graph/DSLDiagram_PureGraphPlugin.js';
|
21
21
|
export class DSLDiagram_GraphPreset extends AbstractPreset {
|
22
22
|
constructor() {
|
23
|
-
super(packageJson.extensions.graphPreset, packageJson.version
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
new DSLDiagram_PureProtocolProcessorPlugin().install(pluginManager);
|
23
|
+
super(packageJson.extensions.graphPreset, packageJson.version, [
|
24
|
+
new DSLDiagram_PureGraphPlugin(),
|
25
|
+
new DSLDiagram_PureGraphManagerPlugin(),
|
26
|
+
new DSLDiagram_PureProtocolProcessorPlugin(),
|
27
|
+
]);
|
29
28
|
}
|
30
29
|
}
|
31
30
|
//# sourceMappingURL=DSLDiagram_Extension.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSLDiagram_Extension.js","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iCAAiC,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"DSLDiagram_Extension.js","sourceRoot":"","sources":["../src/DSLDiagram_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,sCAAsC,EAAE,MAAM,mEAAmE,CAAC;AAC3H,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAEnF,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IACxD;QACE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,EAAE;YAC7D,IAAI,0BAA0B,EAAE;YAChC,IAAI,iCAAiC,EAAE;YACvC,IAAI,sCAAsC,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/lib/DiagramRenderer.d.ts
CHANGED
@@ -14,14 +14,14 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { type AbstractProperty, Class } from '@finos/legend-graph';
|
17
|
-
import type { Diagram } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
18
|
-
import { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
|
19
|
-
import { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
|
20
|
-
import { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
|
21
|
-
import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
|
22
|
-
import type { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView';
|
23
|
-
import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
|
24
|
-
import { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
|
17
|
+
import type { Diagram } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
18
|
+
import { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js';
|
19
|
+
import { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
|
20
|
+
import { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js';
|
21
|
+
import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
|
22
|
+
import type { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js';
|
23
|
+
import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js';
|
24
|
+
import { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js';
|
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,
|
1
|
+
{"version":3,"file":"DiagramRenderer.d.ts","sourceRoot":"","sources":["../src/DiagramRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,EAcN,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4EAA4E,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,MAAM,uFAAuF,CAAC;AAClH,OAAO,EAAE,KAAK,EAAE,MAAM,mFAAmF,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,iGAAiG,CAAC;AACtI,OAAO,EAAE,SAAS,EAAE,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O,EAChB,oBAAoB,EAAE,OAAO,EAC7B,SAAS,EAAE,OAAO,GACjB,CAAC,SAAS,EAAE,EAAE,kBAAkB,EAAE,CAAC;CAmGvC"}
|
package/lib/DiagramRenderer.js
CHANGED
@@ -14,19 +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, } from '@finos/legend-graph';
|
17
|
+
import { Class, Enumeration, PrimitiveType, DerivedProperty, PackageableElementExplicitReference, PropertyExplicitReference, GenericTypeExplicitReference, GenericType, Property, Multiplicity, getAllSuperclasses, getAllOwnClassProperties, generateMultiplicityString, getRawGenericType, } from '@finos/legend-graph';
|
18
18
|
import { action, makeObservable, observable } from 'mobx';
|
19
|
-
import { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
|
20
|
-
import { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
|
21
|
-
import { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
|
22
|
-
import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
|
23
|
-
import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
|
24
|
-
import { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
|
25
|
-
import { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
|
26
|
-
import { getElementPosition } from './helpers/
|
27
|
-
import { AssociationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView';
|
19
|
+
import { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js';
|
20
|
+
import { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
|
21
|
+
import { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js';
|
22
|
+
import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
|
23
|
+
import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js';
|
24
|
+
import { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js';
|
25
|
+
import { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js';
|
26
|
+
import { boxContains, buildBottomRightCornerBox, getBottomRightCornerPoint, getElementPosition, rotatePointX, rotatePointY, } from './helpers/DSLDiagram_Helper.js';
|
27
|
+
import { AssociationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js';
|
28
28
|
import { class_addProperty, class_addSuperType } from '@finos/legend-studio';
|
29
|
-
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, relationshipView_simplifyPath, relationshipView_setPath, } from './stores/studio/DSLDiagram_GraphModifierHelper';
|
29
|
+
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, relationshipView_simplifyPath, relationshipView_setPath, } from './stores/studio/DSLDiagram_GraphModifierHelper.js';
|
30
30
|
export var DIAGRAM_INTERACTION_MODE;
|
31
31
|
(function (DIAGRAM_INTERACTION_MODE) {
|
32
32
|
DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE["LAYOUT"] = 0] = "LAYOUT";
|
@@ -35,14 +35,14 @@ export var DIAGRAM_INTERACTION_MODE;
|
|
35
35
|
DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE["ZOOM_OUT"] = 3] = "ZOOM_OUT";
|
36
36
|
DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE["ADD_RELATIONSHIP"] = 4] = "ADD_RELATIONSHIP";
|
37
37
|
DIAGRAM_INTERACTION_MODE[DIAGRAM_INTERACTION_MODE["ADD_CLASS"] = 5] = "ADD_CLASS";
|
38
|
-
})(DIAGRAM_INTERACTION_MODE || (DIAGRAM_INTERACTION_MODE = {}));
|
38
|
+
})(DIAGRAM_INTERACTION_MODE = DIAGRAM_INTERACTION_MODE || (DIAGRAM_INTERACTION_MODE = {}));
|
39
39
|
export var DIAGRAM_RELATIONSHIP_EDIT_MODE;
|
40
40
|
(function (DIAGRAM_RELATIONSHIP_EDIT_MODE) {
|
41
41
|
// ASSOCIATION,
|
42
42
|
DIAGRAM_RELATIONSHIP_EDIT_MODE[DIAGRAM_RELATIONSHIP_EDIT_MODE["PROPERTY"] = 0] = "PROPERTY";
|
43
43
|
DIAGRAM_RELATIONSHIP_EDIT_MODE[DIAGRAM_RELATIONSHIP_EDIT_MODE["INHERITANCE"] = 1] = "INHERITANCE";
|
44
44
|
DIAGRAM_RELATIONSHIP_EDIT_MODE[DIAGRAM_RELATIONSHIP_EDIT_MODE["NONE"] = 2] = "NONE";
|
45
|
-
})(DIAGRAM_RELATIONSHIP_EDIT_MODE || (DIAGRAM_RELATIONSHIP_EDIT_MODE = {}));
|
45
|
+
})(DIAGRAM_RELATIONSHIP_EDIT_MODE = DIAGRAM_RELATIONSHIP_EDIT_MODE || (DIAGRAM_RELATIONSHIP_EDIT_MODE = {}));
|
46
46
|
const MIN_ZOOM_LEVEL = 0.05; // 5%
|
47
47
|
const FIT_ZOOM_PADDING = 10;
|
48
48
|
export const DIAGRAM_ZOOM_LEVELS = [
|
@@ -423,9 +423,9 @@ export class DiagramRenderer {
|
|
423
423
|
// Do not allow creating self-inheritance
|
424
424
|
startClassView.class.value !== targetClassView.class.value &&
|
425
425
|
// Avoid creating inhertance that already existed
|
426
|
-
!startClassView.class.value.
|
426
|
+
!getAllSuperclasses(startClassView.class.value).includes(targetClassView.class.value) &&
|
427
427
|
// Avoid loop (might be expensive)
|
428
|
-
!targetClassView.class.value.
|
428
|
+
!getAllSuperclasses(targetClassView.class.value).includes(startClassView.class.value)) {
|
429
429
|
class_addSuperType(startClassView.class.value, GenericTypeExplicitReference.create(new GenericType(targetClassView.class.value)));
|
430
430
|
}
|
431
431
|
// only add an inheritance relationship view if the start class
|
@@ -515,8 +515,8 @@ export class DiagramRenderer {
|
|
515
515
|
fullPath[fullPath.length - 2], fullPath[fullPath.length - 1], relationshipView.to.classView.value, relationshipView.property.value, false);
|
516
516
|
minX = Math.min(minX, box.position.x);
|
517
517
|
minY = Math.min(minY, box.position.y);
|
518
|
-
maxX = Math.max(maxX, box
|
519
|
-
maxY = Math.max(maxY, box
|
518
|
+
maxX = Math.max(maxX, getBottomRightCornerPoint(box).x);
|
519
|
+
maxY = Math.max(maxY, getBottomRightCornerPoint(box).y);
|
520
520
|
}
|
521
521
|
// if (relationshipView.from.name) {
|
522
522
|
// var box = this.displayText(fullPath[1], fullPath[0], relationshipView.from.classView, relationshipView.property, this.ctx);
|
@@ -620,12 +620,12 @@ export class DiagramRenderer {
|
|
620
620
|
diagram_addGeneralizationView(this.diagram, new GeneralizationView(this.diagram, classView, newClassView));
|
621
621
|
}
|
622
622
|
// Add property view
|
623
|
-
addedClass
|
623
|
+
getAllOwnClassProperties(addedClass).forEach((property) => {
|
624
624
|
if (property.genericType.value.rawType === _class) {
|
625
625
|
diagram_addPropertyView(this.diagram, new PropertyView(this.diagram, PropertyExplicitReference.create(property), newClassView, classView));
|
626
626
|
}
|
627
627
|
});
|
628
|
-
_class
|
628
|
+
getAllOwnClassProperties(_class).forEach((property) => {
|
629
629
|
if (property.genericType.value.rawType === addedClass) {
|
630
630
|
diagram_addPropertyView(this.diagram, new PropertyView(this.diagram, PropertyExplicitReference.create(property), classView, newClassView));
|
631
631
|
}
|
@@ -881,10 +881,11 @@ export class DiagramRenderer {
|
|
881
881
|
}
|
882
882
|
txtMeasure += this.ctx.measureText(property.genericType.value.rawType.name).width;
|
883
883
|
this.ctx.font = `${(this.fontSize - 1) * (measureOnly ? 1 : this.zoom)}px ${this.fontFamily}`;
|
884
|
+
const multiplicityString = generateMultiplicityString(property.multiplicity.lowerBound, property.multiplicity.upperBound);
|
884
885
|
if (!measureOnly) {
|
885
|
-
this.ctx.fillText(`[${
|
886
|
+
this.ctx.fillText(`[${multiplicityString}]`, propX + txtMeasure, propY);
|
886
887
|
}
|
887
|
-
txtMeasure += this.ctx.measureText(`[${
|
888
|
+
txtMeasure += this.ctx.measureText(`[${multiplicityString}]`).width;
|
888
889
|
return txtMeasure;
|
889
890
|
}
|
890
891
|
computeClassNameWidth(classView) {
|
@@ -920,7 +921,7 @@ export class DiagramRenderer {
|
|
920
921
|
}
|
921
922
|
// Calculate box for properties
|
922
923
|
if (!classView.hideProperties) {
|
923
|
-
classView.class.value
|
924
|
+
getAllOwnClassProperties(classView.class.value).forEach((property) => {
|
924
925
|
if (!this.hasPropertyView(classView, property)) {
|
925
926
|
const propertyTextMeasure = this.drawClassViewProperty(classView, property,
|
926
927
|
// these means nothing since we only need to measure here
|
@@ -1048,7 +1049,7 @@ export class DiagramRenderer {
|
|
1048
1049
|
this.zoom +
|
1049
1050
|
this.canvasCenter.x, yLineCoord);
|
1050
1051
|
this.ctx.stroke();
|
1051
|
-
for (const property of classView.class.value
|
1052
|
+
for (const property of getAllOwnClassProperties(classView.class.value)) {
|
1052
1053
|
if (!this.hasPropertyView(classView, property)) {
|
1053
1054
|
this.ctx.fillStyle =
|
1054
1055
|
property instanceof DerivedProperty
|
@@ -1077,8 +1078,9 @@ export class DiagramRenderer {
|
|
1077
1078
|
drawLinePropertyNameAndMultiplicity(property, textPositionX, textPositionY, multiplicityPositionX, multiplicityPositionY, measureOnly) {
|
1078
1079
|
this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;
|
1079
1080
|
const propertyName = getPropertyDisplayName(property);
|
1081
|
+
const multiplictyString = generateMultiplicityString(property.multiplicity.lowerBound, property.multiplicity.upperBound);
|
1080
1082
|
const textSize = this.ctx.measureText(propertyName).width;
|
1081
|
-
const mulSize = this.ctx.measureText(
|
1083
|
+
const mulSize = this.ctx.measureText(multiplictyString).width;
|
1082
1084
|
this.ctx.font = `${this.fontSize * this.zoom}px ${this.fontFamily}`;
|
1083
1085
|
const posX = textPositionX(textSize);
|
1084
1086
|
const posY = textPositionY(textSize);
|
@@ -1090,7 +1092,7 @@ export class DiagramRenderer {
|
|
1090
1092
|
const mulPosY = multiplicityPositionY(mulSize);
|
1091
1093
|
const multiplicityPosition = this.modelCoordinateToCanvasCoordinate(new Point(multiplicityPositionX(mulSize), multiplicityPositionY(mulSize)));
|
1092
1094
|
if (!measureOnly) {
|
1093
|
-
this.ctx.fillText(
|
1095
|
+
this.ctx.fillText(multiplictyString, multiplicityPosition.x, multiplicityPosition.y);
|
1094
1096
|
}
|
1095
1097
|
const position = new Point(Math.min(posX, mulPosX), Math.min(posY, mulPosY));
|
1096
1098
|
return new PositionedRectangle(position, new Rectangle(Math.max(posX, mulPosX) + Math.max(textSize, mulSize) - position.x, Math.max(posY, mulPosY) + this.lineHeight - position.y));
|
@@ -1319,24 +1321,24 @@ export class DiagramRenderer {
|
|
1319
1321
|
angle = endX >= startX ? angle : angle + Math.PI;
|
1320
1322
|
this.ctx.beginPath();
|
1321
1323
|
this.ctx.moveTo(resultX +
|
1322
|
-
(this.screenOffset.x + this.triangle[0]
|
1324
|
+
(this.screenOffset.x + rotatePointX(this.triangle[0], angle)) *
|
1323
1325
|
this.zoom, resultY +
|
1324
|
-
(this.screenOffset.y + this.triangle[0]
|
1326
|
+
(this.screenOffset.y + rotatePointY(this.triangle[0], angle)) *
|
1325
1327
|
this.zoom);
|
1326
1328
|
this.ctx.lineTo(resultX +
|
1327
|
-
(this.screenOffset.x + this.triangle[1]
|
1329
|
+
(this.screenOffset.x + rotatePointX(this.triangle[1], angle)) *
|
1328
1330
|
this.zoom, resultY +
|
1329
|
-
(this.screenOffset.y + this.triangle[1]
|
1331
|
+
(this.screenOffset.y + rotatePointY(this.triangle[1], angle)) *
|
1330
1332
|
this.zoom);
|
1331
1333
|
this.ctx.lineTo(resultX +
|
1332
|
-
(this.screenOffset.x + this.triangle[2]
|
1334
|
+
(this.screenOffset.x + rotatePointX(this.triangle[2], angle)) *
|
1333
1335
|
this.zoom, resultY +
|
1334
|
-
(this.screenOffset.y + this.triangle[2]
|
1336
|
+
(this.screenOffset.y + rotatePointY(this.triangle[2], angle)) *
|
1335
1337
|
this.zoom);
|
1336
1338
|
this.ctx.lineTo(resultX +
|
1337
|
-
(this.screenOffset.x + this.triangle[0]
|
1339
|
+
(this.screenOffset.x + rotatePointX(this.triangle[0], angle)) *
|
1338
1340
|
this.zoom, resultY +
|
1339
|
-
(this.screenOffset.y + this.triangle[0]
|
1341
|
+
(this.screenOffset.y + rotatePointY(this.triangle[0], angle)) *
|
1340
1342
|
this.zoom);
|
1341
1343
|
this.ctx.fillStyle = this.generalizationViewInheritanceTriangeFillColor;
|
1342
1344
|
this.ctx.fill();
|
@@ -1524,7 +1526,7 @@ export class DiagramRenderer {
|
|
1524
1526
|
}
|
1525
1527
|
// Add subtypes of selected classes to the diagram
|
1526
1528
|
else if ('ArrowDown' === e.key) {
|
1527
|
-
const views = uniqBy(this.selectedClasses.flatMap((x) => x.class.value.
|
1529
|
+
const views = uniqBy(this.selectedClasses.flatMap((x) => x.class.value._subclasses.flatMap((c) => new ClassView(this.diagram, uuid(), PackageableElementExplicitReference.create(c)))), (cv) => cv.class.value);
|
1528
1530
|
if (views.length > 0) {
|
1529
1531
|
views.forEach((classView) => this.ensureClassViewMeetMinDimensions(classView));
|
1530
1532
|
const res = this.layoutTaxonomy([views, this.selectedClasses], this.diagram, false, false);
|
@@ -1695,9 +1697,7 @@ export class DiagramRenderer {
|
|
1695
1697
|
// NOTE: Traverse backwards the class views to preserve z-index buffer
|
1696
1698
|
for (let i = this.diagram.classViews.length - 1; i >= 0; i--) {
|
1697
1699
|
const targetClassView = this.diagram.classViews[i];
|
1698
|
-
if (targetClassView
|
1699
|
-
.buildBottomRightCornerBox()
|
1700
|
-
.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {
|
1700
|
+
if (buildBottomRightCornerBox(targetClassView).contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {
|
1701
1701
|
this.setSelectedClasses([]);
|
1702
1702
|
this.setSelectedClassCorner(this.diagram.classViews[i]);
|
1703
1703
|
if (!this.isReadOnly) {
|
@@ -1932,8 +1932,8 @@ export class DiagramRenderer {
|
|
1932
1932
|
: this.selectionStart.y + selectionBoxHeight), new Rectangle(Math.abs(selectionBoxWidth), Math.abs(selectionBoxHeight)));
|
1933
1933
|
this.setSelectedClasses([]);
|
1934
1934
|
for (const classView of this.diagram.classViews) {
|
1935
|
-
if (this.selection
|
1936
|
-
|
1935
|
+
if (boxContains(this.selection, classView) ||
|
1936
|
+
boxContains(classView, this.selection)) {
|
1937
1937
|
this.setSelectedClasses([...this.selectedClasses, classView]);
|
1938
1938
|
}
|
1939
1939
|
}
|
@@ -1972,9 +1972,7 @@ export class DiagramRenderer {
|
|
1972
1972
|
if (classView.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {
|
1973
1973
|
this.setMouseOverClassView(classView);
|
1974
1974
|
// Check hover class corner
|
1975
|
-
if (classView
|
1976
|
-
.buildBottomRightCornerBox()
|
1977
|
-
.contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {
|
1975
|
+
if (buildBottomRightCornerBox(classView).contains(eventPointInModelCoordinate.x, eventPointInModelCoordinate.y)) {
|
1978
1976
|
this.setMouseOverClassCorner(classView);
|
1979
1977
|
}
|
1980
1978
|
// TODO: we probably should make this a shared function so we don't need to maintain
|
@@ -2005,7 +2003,7 @@ export class DiagramRenderer {
|
|
2005
2003
|
: _class.taggedValues.length * this.fontSize);
|
2006
2004
|
cursorY += this.classViewSpaceY;
|
2007
2005
|
// Check hover class property
|
2008
|
-
for (const property of _class
|
2006
|
+
for (const property of getAllOwnClassProperties(_class)) {
|
2009
2007
|
if (!this.hasPropertyView(classView, property)) {
|
2010
2008
|
this.ctx.font = `${(this.fontSize - 1) * this.zoom}px ${this.fontFamily}`;
|
2011
2009
|
if (new PositionedRectangle(this.modelCoordinateToCanvasCoordinate(new Point(classView.position.x + this.classViewSpaceX, cursorY)), new Rectangle(this.drawClassViewProperty(classView, property,
|
@@ -2041,7 +2039,7 @@ export class DiagramRenderer {
|
|
2041
2039
|
//---------------------
|
2042
2040
|
getSuperTypeLevels(classViews, diagram, currentDepth, recurseMaxDepth) {
|
2043
2041
|
if (classViews.length) {
|
2044
|
-
const res = uniqBy(classViews.flatMap((classView) => classView.class.value.generalizations.map((generation) => new ClassView(diagram, uuid(), PackageableElementExplicitReference.create(generation.value
|
2042
|
+
const res = uniqBy(classViews.flatMap((classView) => classView.class.value.generalizations.map((generation) => new ClassView(diagram, uuid(), PackageableElementExplicitReference.create(getRawGenericType(generation.value, Class))))), (a) => a.class.value);
|
2045
2043
|
res.forEach((classView) => this.ensureClassViewMeetMinDimensions(classView));
|
2046
2044
|
if (recurseMaxDepth === -1 || currentDepth < recurseMaxDepth) {
|
2047
2045
|
const rec = this.getSuperTypeLevels(res, diagram, currentDepth + 1, recurseMaxDepth);
|