@metadev/daga 4.2.10 → 4.2.11
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.
- package/Changelog.md +7 -0
- package/index.cjs.js +31 -13
- package/index.esm.js +31 -14
- package/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/lib/diagram/diagram-event.d.ts +18 -4
package/Changelog.md
CHANGED
|
@@ -6,6 +6,13 @@ List of releases and changes.
|
|
|
6
6
|
|
|
7
7
|
## Next release Joyeuse
|
|
8
8
|
|
|
9
|
+
## v. 4.2.11
|
|
10
|
+
|
|
11
|
+
- Version branch to avoid error in ng-packagr
|
|
12
|
+
- Ensure that an array remains an array after cloning [#349](https://github.com/metadevpro/daga/pull/349)
|
|
13
|
+
- When checking if a port is being shared, ignore connections that have been removed [#350](https://github.com/metadevpro/daga/pull/350)
|
|
14
|
+
- Create `DiagramZoomEvent` to enable listening to user zooming and panning events [#351](https://github.com/metadevpro/daga/pull/351)
|
|
15
|
+
|
|
9
16
|
## v. 4.2.10
|
|
10
17
|
|
|
11
18
|
- Fix errors with cloned objects containing functions [#345](https://github.com/metadevpro/daga/pull/345)
|
package/index.cjs.js
CHANGED
|
@@ -2529,18 +2529,18 @@ class DiagramConnection extends DiagramElement {
|
|
|
2529
2529
|
// alternative start port not valid, it doesn't allow outgoing connections
|
|
2530
2530
|
continue checkAlternativeStartPorts;
|
|
2531
2531
|
}
|
|
2532
|
-
if (!allowSharingPorts && (alternativeStartPort.incomingConnections.
|
|
2532
|
+
if (!allowSharingPorts && (alternativeStartPort.incomingConnections.filter(c => !c.removed && c !== this).length > 0 || alternativeStartPort.outgoingConnections.filter(c => !c.removed && c !== this).length > 0)) {
|
|
2533
2533
|
// alternative start port not valid, it already has other connections
|
|
2534
2534
|
continue checkAlternativeStartPorts;
|
|
2535
2535
|
}
|
|
2536
2536
|
if (!allowSharingBothPorts) {
|
|
2537
|
-
for (const connection of alternativeStartPort.outgoingConnections) {
|
|
2537
|
+
for (const connection of alternativeStartPort.outgoingConnections.filter(c => !c.removed)) {
|
|
2538
2538
|
if (connection !== this && connection.end === this.end) {
|
|
2539
2539
|
// alternative start port not valid, there is a connection whose start and end matches the alternative start port and this connection's end
|
|
2540
2540
|
continue checkAlternativeStartPorts;
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
|
-
for (const connection of alternativeStartPort.incomingConnections) {
|
|
2543
|
+
for (const connection of alternativeStartPort.incomingConnections.filter(c => !c.removed)) {
|
|
2544
2544
|
if (connection !== this && connection.start === this.end) {
|
|
2545
2545
|
// alternative start port not valid, there is a connection whose start and end matches the alternative start port and this connection's end
|
|
2546
2546
|
continue checkAlternativeStartPorts;
|
|
@@ -2567,18 +2567,18 @@ class DiagramConnection extends DiagramElement {
|
|
|
2567
2567
|
// alternative end port not valid, it doesn't allow incoming connections
|
|
2568
2568
|
continue checkAlternativeEndPorts;
|
|
2569
2569
|
}
|
|
2570
|
-
if (!allowSharingPorts && (alternativeEndPort.
|
|
2570
|
+
if (!allowSharingPorts && (alternativeEndPort.incomingConnections.filter(c => !c.removed && c !== this).length > 0 || alternativeEndPort.outgoingConnections.filter(c => !c.removed && c !== this).length > 0)) {
|
|
2571
2571
|
// alternative end port not valid, it already has other connections
|
|
2572
2572
|
continue checkAlternativeEndPorts;
|
|
2573
2573
|
}
|
|
2574
2574
|
if (!allowSharingBothPorts) {
|
|
2575
|
-
for (const connection of alternativeEndPort.incomingConnections) {
|
|
2575
|
+
for (const connection of alternativeEndPort.incomingConnections.filter(c => !c.removed)) {
|
|
2576
2576
|
if (connection !== this && connection.start === this.start) {
|
|
2577
2577
|
// alternative end port not valid, there is a connection whose start and end matches the alternative end port and this connection's start
|
|
2578
2578
|
continue checkAlternativeEndPorts;
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
2581
|
-
for (const connection of alternativeEndPort.outgoingConnections) {
|
|
2581
|
+
for (const connection of alternativeEndPort.outgoingConnections.filter(c => !c.removed)) {
|
|
2582
2582
|
if (connection !== this && connection.end === this.start) {
|
|
2583
2583
|
// alternative end port not valid, there is a connection whose start and end matches the alternative end port and this connection's start
|
|
2584
2584
|
continue checkAlternativeEndPorts;
|
|
@@ -6301,11 +6301,27 @@ class DiagramEvent {
|
|
|
6301
6301
|
*/
|
|
6302
6302
|
exports.DiagramEvents = void 0;
|
|
6303
6303
|
(function (DiagramEvents) {
|
|
6304
|
-
DiagramEvents[DiagramEvents["
|
|
6305
|
-
DiagramEvents[DiagramEvents["
|
|
6306
|
-
DiagramEvents[DiagramEvents["
|
|
6307
|
-
DiagramEvents[DiagramEvents["
|
|
6304
|
+
DiagramEvents[DiagramEvents["Zoom"] = 0] = "Zoom";
|
|
6305
|
+
DiagramEvents[DiagramEvents["DoubleClick"] = 1] = "DoubleClick";
|
|
6306
|
+
DiagramEvents[DiagramEvents["SecondaryClick"] = 2] = "SecondaryClick";
|
|
6307
|
+
DiagramEvents[DiagramEvents["Selection"] = 3] = "Selection";
|
|
6308
|
+
DiagramEvents[DiagramEvents["Highlight"] = 4] = "Highlight";
|
|
6308
6309
|
})(exports.DiagramEvents || (exports.DiagramEvents = {}));
|
|
6310
|
+
/**
|
|
6311
|
+
* Diagram event which consists of the user zooming or panning.
|
|
6312
|
+
*/
|
|
6313
|
+
class DiagramZoomEvent extends DiagramEvent {
|
|
6314
|
+
/**
|
|
6315
|
+
* Create a diagram zoom event.
|
|
6316
|
+
*
|
|
6317
|
+
* @param coords .
|
|
6318
|
+
*/
|
|
6319
|
+
constructor(coords, zoom) {
|
|
6320
|
+
super(exports.DiagramEvents.Zoom);
|
|
6321
|
+
this.coords = coords;
|
|
6322
|
+
this.zoom = zoom;
|
|
6323
|
+
}
|
|
6324
|
+
}
|
|
6309
6325
|
/**
|
|
6310
6326
|
* Diagram event which consists of the user performing a double click on the diagram.
|
|
6311
6327
|
*/
|
|
@@ -7697,6 +7713,7 @@ class DiagramCanvas {
|
|
|
7697
7713
|
this.selectCanvasElements().attr('transform', transformAttribute);
|
|
7698
7714
|
d3__namespace.select(`#${this.backgroundPatternId}`).attr('patternTransform', transformAttribute);
|
|
7699
7715
|
this.contextMenu.close();
|
|
7716
|
+
this.diagramEvent$.next(new DiagramZoomEvent([this.zoomTransform.x, this.zoomTransform.y], this.zoomTransform.k));
|
|
7700
7717
|
}).on(exports.ZoomEvents.End, () => {
|
|
7701
7718
|
setCursorStyle();
|
|
7702
7719
|
}));
|
|
@@ -8357,7 +8374,7 @@ class DiagramCanvas {
|
|
|
8357
8374
|
if (this.multipleSelectionOn || this.secondaryButton) {
|
|
8358
8375
|
this.startMultipleSelection(event);
|
|
8359
8376
|
} else {
|
|
8360
|
-
if (this.canUserPerformAction(exports.DiagramActions.AddConnection) && (this.allowSharingPorts || d.incomingConnections.length === 0 && d.outgoingConnections.length === 0) && !d.removed) {
|
|
8377
|
+
if (this.canUserPerformAction(exports.DiagramActions.AddConnection) && (this.allowSharingPorts || d.incomingConnections.filter(c => !c.removed).length === 0 && d.outgoingConnections.filter(c => !c.removed).length === 0) && !d.removed) {
|
|
8361
8378
|
setCursorStyle(exports.CursorStyle.Grabbing);
|
|
8362
8379
|
this.startConnection(d);
|
|
8363
8380
|
// should be true after having called this.startConnection()
|
|
@@ -9107,13 +9124,13 @@ class DiagramCanvas {
|
|
|
9107
9124
|
this.dropConnection();
|
|
9108
9125
|
return;
|
|
9109
9126
|
}
|
|
9110
|
-
if (!this.allowSharingPorts && (port.incomingConnections.length > 0 || port.outgoingConnections.length > 0)) {
|
|
9127
|
+
if (!this.allowSharingPorts && (port.incomingConnections.filter(c => !c.removed).length > 0 || port.outgoingConnections.filter(c => !c.removed).length > 0)) {
|
|
9111
9128
|
this.dropConnection();
|
|
9112
9129
|
return;
|
|
9113
9130
|
}
|
|
9114
9131
|
if (!this.allowSharingBothPorts && this.model.connections.find(c => {
|
|
9115
9132
|
var _a, _b;
|
|
9116
|
-
return c.start === ((_a = this.unfinishedConnection) === null || _a === void 0 ? void 0 : _a.start) && c.end === port || c.end === ((_b = this.unfinishedConnection) === null || _b === void 0 ? void 0 : _b.start) && c.start === port;
|
|
9133
|
+
return !c.removed && (c.start === ((_a = this.unfinishedConnection) === null || _a === void 0 ? void 0 : _a.start) && c.end === port || c.end === ((_b = this.unfinishedConnection) === null || _b === void 0 ? void 0 : _b.start) && c.start === port);
|
|
9117
9134
|
}) !== undefined) {
|
|
9118
9135
|
this.dropConnection();
|
|
9119
9136
|
return;
|
|
@@ -10325,6 +10342,7 @@ exports.DiagramSectionSet = DiagramSectionSet;
|
|
|
10325
10342
|
exports.DiagramSelectionEvent = DiagramSelectionEvent;
|
|
10326
10343
|
exports.DiagramUserHighlight = DiagramUserHighlight;
|
|
10327
10344
|
exports.DiagramUserSelection = DiagramUserSelection;
|
|
10345
|
+
exports.DiagramZoomEvent = DiagramZoomEvent;
|
|
10328
10346
|
exports.EditFieldAction = EditFieldAction;
|
|
10329
10347
|
exports.ForceLayout = ForceLayout;
|
|
10330
10348
|
exports.HorizontalLayout = HorizontalLayout;
|
package/index.esm.js
CHANGED
|
@@ -2508,18 +2508,18 @@ class DiagramConnection extends DiagramElement {
|
|
|
2508
2508
|
// alternative start port not valid, it doesn't allow outgoing connections
|
|
2509
2509
|
continue checkAlternativeStartPorts;
|
|
2510
2510
|
}
|
|
2511
|
-
if (!allowSharingPorts && (alternativeStartPort.incomingConnections.
|
|
2511
|
+
if (!allowSharingPorts && (alternativeStartPort.incomingConnections.filter(c => !c.removed && c !== this).length > 0 || alternativeStartPort.outgoingConnections.filter(c => !c.removed && c !== this).length > 0)) {
|
|
2512
2512
|
// alternative start port not valid, it already has other connections
|
|
2513
2513
|
continue checkAlternativeStartPorts;
|
|
2514
2514
|
}
|
|
2515
2515
|
if (!allowSharingBothPorts) {
|
|
2516
|
-
for (const connection of alternativeStartPort.outgoingConnections) {
|
|
2516
|
+
for (const connection of alternativeStartPort.outgoingConnections.filter(c => !c.removed)) {
|
|
2517
2517
|
if (connection !== this && connection.end === this.end) {
|
|
2518
2518
|
// alternative start port not valid, there is a connection whose start and end matches the alternative start port and this connection's end
|
|
2519
2519
|
continue checkAlternativeStartPorts;
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
for (const connection of alternativeStartPort.incomingConnections) {
|
|
2522
|
+
for (const connection of alternativeStartPort.incomingConnections.filter(c => !c.removed)) {
|
|
2523
2523
|
if (connection !== this && connection.start === this.end) {
|
|
2524
2524
|
// alternative start port not valid, there is a connection whose start and end matches the alternative start port and this connection's end
|
|
2525
2525
|
continue checkAlternativeStartPorts;
|
|
@@ -2546,18 +2546,18 @@ class DiagramConnection extends DiagramElement {
|
|
|
2546
2546
|
// alternative end port not valid, it doesn't allow incoming connections
|
|
2547
2547
|
continue checkAlternativeEndPorts;
|
|
2548
2548
|
}
|
|
2549
|
-
if (!allowSharingPorts && (alternativeEndPort.
|
|
2549
|
+
if (!allowSharingPorts && (alternativeEndPort.incomingConnections.filter(c => !c.removed && c !== this).length > 0 || alternativeEndPort.outgoingConnections.filter(c => !c.removed && c !== this).length > 0)) {
|
|
2550
2550
|
// alternative end port not valid, it already has other connections
|
|
2551
2551
|
continue checkAlternativeEndPorts;
|
|
2552
2552
|
}
|
|
2553
2553
|
if (!allowSharingBothPorts) {
|
|
2554
|
-
for (const connection of alternativeEndPort.incomingConnections) {
|
|
2554
|
+
for (const connection of alternativeEndPort.incomingConnections.filter(c => !c.removed)) {
|
|
2555
2555
|
if (connection !== this && connection.start === this.start) {
|
|
2556
2556
|
// alternative end port not valid, there is a connection whose start and end matches the alternative end port and this connection's start
|
|
2557
2557
|
continue checkAlternativeEndPorts;
|
|
2558
2558
|
}
|
|
2559
2559
|
}
|
|
2560
|
-
for (const connection of alternativeEndPort.outgoingConnections) {
|
|
2560
|
+
for (const connection of alternativeEndPort.outgoingConnections.filter(c => !c.removed)) {
|
|
2561
2561
|
if (connection !== this && connection.end === this.start) {
|
|
2562
2562
|
// alternative end port not valid, there is a connection whose start and end matches the alternative end port and this connection's start
|
|
2563
2563
|
continue checkAlternativeEndPorts;
|
|
@@ -6280,11 +6280,27 @@ class DiagramEvent {
|
|
|
6280
6280
|
*/
|
|
6281
6281
|
var DiagramEvents;
|
|
6282
6282
|
(function (DiagramEvents) {
|
|
6283
|
-
DiagramEvents[DiagramEvents["
|
|
6284
|
-
DiagramEvents[DiagramEvents["
|
|
6285
|
-
DiagramEvents[DiagramEvents["
|
|
6286
|
-
DiagramEvents[DiagramEvents["
|
|
6283
|
+
DiagramEvents[DiagramEvents["Zoom"] = 0] = "Zoom";
|
|
6284
|
+
DiagramEvents[DiagramEvents["DoubleClick"] = 1] = "DoubleClick";
|
|
6285
|
+
DiagramEvents[DiagramEvents["SecondaryClick"] = 2] = "SecondaryClick";
|
|
6286
|
+
DiagramEvents[DiagramEvents["Selection"] = 3] = "Selection";
|
|
6287
|
+
DiagramEvents[DiagramEvents["Highlight"] = 4] = "Highlight";
|
|
6287
6288
|
})(DiagramEvents || (DiagramEvents = {}));
|
|
6289
|
+
/**
|
|
6290
|
+
* Diagram event which consists of the user zooming or panning.
|
|
6291
|
+
*/
|
|
6292
|
+
class DiagramZoomEvent extends DiagramEvent {
|
|
6293
|
+
/**
|
|
6294
|
+
* Create a diagram zoom event.
|
|
6295
|
+
*
|
|
6296
|
+
* @param coords .
|
|
6297
|
+
*/
|
|
6298
|
+
constructor(coords, zoom) {
|
|
6299
|
+
super(DiagramEvents.Zoom);
|
|
6300
|
+
this.coords = coords;
|
|
6301
|
+
this.zoom = zoom;
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
6288
6304
|
/**
|
|
6289
6305
|
* Diagram event which consists of the user performing a double click on the diagram.
|
|
6290
6306
|
*/
|
|
@@ -7676,6 +7692,7 @@ class DiagramCanvas {
|
|
|
7676
7692
|
this.selectCanvasElements().attr('transform', transformAttribute);
|
|
7677
7693
|
d3.select(`#${this.backgroundPatternId}`).attr('patternTransform', transformAttribute);
|
|
7678
7694
|
this.contextMenu.close();
|
|
7695
|
+
this.diagramEvent$.next(new DiagramZoomEvent([this.zoomTransform.x, this.zoomTransform.y], this.zoomTransform.k));
|
|
7679
7696
|
}).on(ZoomEvents.End, () => {
|
|
7680
7697
|
setCursorStyle();
|
|
7681
7698
|
}));
|
|
@@ -8336,7 +8353,7 @@ class DiagramCanvas {
|
|
|
8336
8353
|
if (this.multipleSelectionOn || this.secondaryButton) {
|
|
8337
8354
|
this.startMultipleSelection(event);
|
|
8338
8355
|
} else {
|
|
8339
|
-
if (this.canUserPerformAction(DiagramActions.AddConnection) && (this.allowSharingPorts || d.incomingConnections.length === 0 && d.outgoingConnections.length === 0) && !d.removed) {
|
|
8356
|
+
if (this.canUserPerformAction(DiagramActions.AddConnection) && (this.allowSharingPorts || d.incomingConnections.filter(c => !c.removed).length === 0 && d.outgoingConnections.filter(c => !c.removed).length === 0) && !d.removed) {
|
|
8340
8357
|
setCursorStyle(CursorStyle.Grabbing);
|
|
8341
8358
|
this.startConnection(d);
|
|
8342
8359
|
// should be true after having called this.startConnection()
|
|
@@ -9086,13 +9103,13 @@ class DiagramCanvas {
|
|
|
9086
9103
|
this.dropConnection();
|
|
9087
9104
|
return;
|
|
9088
9105
|
}
|
|
9089
|
-
if (!this.allowSharingPorts && (port.incomingConnections.length > 0 || port.outgoingConnections.length > 0)) {
|
|
9106
|
+
if (!this.allowSharingPorts && (port.incomingConnections.filter(c => !c.removed).length > 0 || port.outgoingConnections.filter(c => !c.removed).length > 0)) {
|
|
9090
9107
|
this.dropConnection();
|
|
9091
9108
|
return;
|
|
9092
9109
|
}
|
|
9093
9110
|
if (!this.allowSharingBothPorts && this.model.connections.find(c => {
|
|
9094
9111
|
var _a, _b;
|
|
9095
|
-
return c.start === ((_a = this.unfinishedConnection) === null || _a === void 0 ? void 0 : _a.start) && c.end === port || c.end === ((_b = this.unfinishedConnection) === null || _b === void 0 ? void 0 : _b.start) && c.start === port;
|
|
9112
|
+
return !c.removed && (c.start === ((_a = this.unfinishedConnection) === null || _a === void 0 ? void 0 : _a.start) && c.end === port || c.end === ((_b = this.unfinishedConnection) === null || _b === void 0 ? void 0 : _b.start) && c.start === port);
|
|
9096
9113
|
}) !== undefined) {
|
|
9097
9114
|
this.dropConnection();
|
|
9098
9115
|
return;
|
|
@@ -10262,4 +10279,4 @@ const getLocationsOfNodes = model => {
|
|
|
10262
10279
|
return locations;
|
|
10263
10280
|
};
|
|
10264
10281
|
|
|
10265
|
-
export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, ApplyLayoutAction, BreadthAdjacencyLayout, BreadthLayout, ClosedShape, CollabClient, Corner, CursorStyle, DIAGRAM_FIELD_DEFAULTS, DagaExporter, DagaImporter, DiagramActionMethod, DiagramActions, DiagramCanvas, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramContextMenu, DiagramDecorator, DiagramDecoratorSet, DiagramDoubleClickEvent, DiagramElement, DiagramElementSet, DiagramEntitySet, DiagramEvent, DiagramEvents, DiagramField, DiagramFieldSet, DiagramHighlightedEvent, DiagramModel, DiagramNode, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramPortType, DiagramSecondaryClickEvent, DiagramSection, DiagramSectionSet, DiagramSelectionEvent, DiagramUserHighlight, DiagramUserSelection, DragEvents, EditFieldAction, Events, ForceLayout, HorizontalAlign, HorizontalLayout, Keys, LineShape, LineStyle, MoveAction, PasteAction, PriorityLayout, Property, PropertySet, RemoveAction, SetGeometryAction, SetParentAction, Side, TreeLayout, Type, UpdateValuesAction, ValueSet, VerticalAlign, VerticalLayout, ZoomEvents, addIfNotExists, diff, equals, filterByOnlyAncestors, filterByOnlyDescendants, generalClosedPath, getBottomMargin, getBottomPadding$1 as getBottomPadding, getLeftMargin, getLeftPadding$1 as getLeftPadding, getLocationsOfNodes, getRightMargin, getRightPadding$1 as getRightPadding, getTopMargin, getTopPadding$1 as getTopPadding, isObject, layouts, linePath, lineStyleDasharray, removeIfExists, setCursorStyle };
|
|
10282
|
+
export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, ApplyLayoutAction, BreadthAdjacencyLayout, BreadthLayout, ClosedShape, CollabClient, Corner, CursorStyle, DIAGRAM_FIELD_DEFAULTS, DagaExporter, DagaImporter, DiagramActionMethod, DiagramActions, DiagramCanvas, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramContextMenu, DiagramDecorator, DiagramDecoratorSet, DiagramDoubleClickEvent, DiagramElement, DiagramElementSet, DiagramEntitySet, DiagramEvent, DiagramEvents, DiagramField, DiagramFieldSet, DiagramHighlightedEvent, DiagramModel, DiagramNode, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramPortType, DiagramSecondaryClickEvent, DiagramSection, DiagramSectionSet, DiagramSelectionEvent, DiagramUserHighlight, DiagramUserSelection, DiagramZoomEvent, DragEvents, EditFieldAction, Events, ForceLayout, HorizontalAlign, HorizontalLayout, Keys, LineShape, LineStyle, MoveAction, PasteAction, PriorityLayout, Property, PropertySet, RemoveAction, SetGeometryAction, SetParentAction, Side, TreeLayout, Type, UpdateValuesAction, ValueSet, VerticalAlign, VerticalLayout, ZoomEvents, addIfNotExists, diff, equals, filterByOnlyAncestors, filterByOnlyDescendants, generalClosedPath, getBottomMargin, getBottomPadding$1 as getBottomPadding, getLeftMargin, getLeftPadding$1 as getLeftPadding, getLocationsOfNodes, getRightMargin, getRightPadding$1 as getRightPadding, getTopMargin, getTopPadding$1 as getTopPadding, isObject, layouts, linePath, lineStyleDasharray, removeIfExists, setCursorStyle };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metadev/daga",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.11",
|
|
4
4
|
"dependencies": {},
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"d3": "^7.9.0",
|
|
7
7
|
"rxjs": "~7.8.1",
|
|
8
|
-
"uuid": "^
|
|
8
|
+
"uuid": "^13.0.0"
|
|
9
9
|
},
|
|
10
10
|
"main": "./index.cjs.js",
|
|
11
11
|
"typings": "./src/index.d.ts",
|
package/src/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type { DiagramModelExporter } from './lib/diagram/converters/diagram-mode
|
|
|
18
18
|
export type { DiagramModelImporter } from './lib/diagram/converters/diagram-model-importer';
|
|
19
19
|
export { ActionStack, AddConnectionAction, AddNodeAction, ApplyLayoutAction, DiagramActionMethod, DiagramActions, EditFieldAction, MoveAction, PasteAction, RemoveAction, SetGeometryAction, SetParentAction, UpdateValuesAction } from './lib/diagram/diagram-action';
|
|
20
20
|
export type { DiagramAction } from './lib/diagram/diagram-action';
|
|
21
|
-
export { DiagramDoubleClickEvent, DiagramEvent, DiagramEvents, DiagramHighlightedEvent, DiagramSecondaryClickEvent, DiagramSelectionEvent } from './lib/diagram/diagram-event';
|
|
21
|
+
export { DiagramDoubleClickEvent, DiagramEvent, DiagramEvents, DiagramHighlightedEvent, DiagramSecondaryClickEvent, DiagramSelectionEvent, DiagramZoomEvent } from './lib/diagram/diagram-event';
|
|
22
22
|
export { AdjacencyLayout } from './lib/diagram/layout/adjacency-layout';
|
|
23
23
|
export { BreadthAdjacencyLayout } from './lib/diagram/layout/breadth-adjacency-layout';
|
|
24
24
|
export { BreadthLayout } from './lib/diagram/layout/breadth-layout';
|
|
@@ -16,10 +16,24 @@ export declare abstract class DiagramEvent {
|
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
18
|
export declare enum DiagramEvents {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Zoom = 0,
|
|
20
|
+
DoubleClick = 1,
|
|
21
|
+
SecondaryClick = 2,
|
|
22
|
+
Selection = 3,
|
|
23
|
+
Highlight = 4
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Diagram event which consists of the user zooming or panning.
|
|
27
|
+
*/
|
|
28
|
+
export declare class DiagramZoomEvent extends DiagramEvent {
|
|
29
|
+
coords: Point;
|
|
30
|
+
zoom: number;
|
|
31
|
+
/**
|
|
32
|
+
* Create a diagram zoom event.
|
|
33
|
+
*
|
|
34
|
+
* @param coords .
|
|
35
|
+
*/
|
|
36
|
+
constructor(coords: Point, zoom: number);
|
|
23
37
|
}
|
|
24
38
|
/**
|
|
25
39
|
* Diagram event which consists of the user performing a double click on the diagram.
|