@metadev/daga 5.0.5 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import { Point } from '../../util/canvas-util';
2
2
  import { DiagramElement, DiagramElementSet } from './diagram-element';
3
3
  import { DiagramModel } from './diagram-model';
4
4
  /**
5
- * A foreign object which is inserted with arbitrary html into a diagram.
5
+ * A foreign object which is inserted with arbitrary SVG code into a diagram.
6
6
  * Diagram objects are not serialized with other diagram elements.
7
7
  * @public
8
8
  */
@@ -23,8 +23,8 @@ export declare class DiagramObject extends DiagramElement {
23
23
  */
24
24
  height: number;
25
25
  priority: number;
26
- html: string;
27
- constructor(model: DiagramModel, coords: Point, width: number, height: number, priority: number, html: string, id: string);
26
+ svg: string;
27
+ constructor(model: DiagramModel, coords: Point, width: number, height: number, priority: number, svg: string, id: string);
28
28
  get removed(): boolean;
29
29
  updateInView(): void;
30
30
  raise(): void;
@@ -50,10 +50,10 @@ export declare class DiagramObjectSet extends DiagramElementSet<DiagramObject> {
50
50
  * @param width The dimension of the object along the x axis.
51
51
  * @param height The dimension of the object along the y axis.
52
52
  * @param priority The priority of the object. Used when filtering by priority.
53
- * @param html The html contents of the object.
53
+ * @param svg The SVG contents of the object.
54
54
  * @param id The id of the object. Cannot be an empty string.
55
55
  * @returns The instanced object.
56
56
  */
57
- new(coords: Point, width: number, height: number, priority: number, html: string, id: string): DiagramObject;
57
+ new(coords: Point, width: number, height: number, priority: number, svg: string, id: string): DiagramObject;
58
58
  remove(id: string): void;
59
59
  }
@@ -3,15 +3,15 @@ import { DiagramContextMenu } from '../diagram/canvas/diagram-context-menu';
3
3
  import { DiagramUserHighlight } from '../diagram/canvas/diagram-user-highlight';
4
4
  import { DiagramUserSelection } from '../diagram/canvas/diagram-user-selection';
5
5
  import { CollabEngine } from '../diagram/collab/collab-engine';
6
- import { ActionStack, DiagramAction, DiagramActionMethod, DiagramActions } from '../diagram/diagram-action';
6
+ import { BackgroundConfig, GridConfig } from '../diagram/config/diagram-canvas-config';
7
7
  import { UserActionConfig } from '../diagram/config/diagram-config';
8
+ import { ActionStack, DiagramAction, DiagramActionMethod, DiagramActions } from '../diagram/diagram-action';
8
9
  import { DiagramEvent } from '../diagram/diagram-event';
9
10
  import { DiagramConnectionType } from '../diagram/model/diagram-connection';
10
11
  import { DiagramModel } from '../diagram/model/diagram-model';
11
12
  import { DiagramValidator } from '../errors/diagram-validator';
12
13
  import { Point } from '../util/canvas-util';
13
14
  import { DiagramEditor } from './diagram-editor';
14
- import { GridStyle } from '../diagram/config/diagram-canvas-config';
15
15
  /**
16
16
  * Represents a specific replica or view of the model.
17
17
  * Provides the functionality for the visual representation of the elements of a model.
@@ -54,35 +54,15 @@ export interface Canvas {
54
54
  */
55
55
  readonly collabEngine: CollabEngine;
56
56
  /**
57
- * Background color of the diagram.
58
- * @public
59
- */
60
- backgroundColor: string;
61
- /**
62
- * Style of the grid elements of the diagram.
63
- * @public
64
- */
65
- gridStyle: GridStyle;
66
- /**
67
- * Distance between the grid points of the diagram in diagram units.
68
- * @public
69
- */
70
- gridSize: number;
71
- /**
72
- * Size of the grid points of the diagram relative to the distance between grid points in diagram units.
73
- * @public
74
- */
75
- gridThickness: number;
76
- /**
77
- * Color of the grid elements of the diagram.
57
+ * Background config of the diagram.
78
58
  * @public
79
59
  */
80
- gridColor: string;
60
+ backgroundConfig: BackgroundConfig;
81
61
  /**
82
- * If true, elements moved by the user should be placed on the closest grid point rather than the exact point where they were placed.
62
+ * Grid config of the diagram.
83
63
  * @public
84
64
  */
85
- snapToGrid: boolean;
65
+ gridConfig: GridConfig;
86
66
  /**
87
67
  * The factor by which the zoom level increases or decreases when the user users buttons or keys to zoom in or out. Should be above 1.
88
68
  * @public