@esfaenza/es-diagrams 11.2.7 → 11.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/bundles/esfaenza-es-diagrams.umd.js +23 -0
- package/bundles/esfaenza-es-diagrams.umd.js.map +1 -1
- package/esfaenza-es-diagrams.metadata.json +1 -1
- package/esm2015/lib/components/es-diagram.component.js +24 -1
- package/fesm2015/esfaenza-es-diagrams.js +23 -0
- package/fesm2015/esfaenza-es-diagrams.js.map +1 -1
- package/lib/components/es-diagram.component.d.ts +8 -0
- package/package.json +7 -7
|
@@ -1308,6 +1308,10 @@
|
|
|
1308
1308
|
* N.B: la chiamata all'evento **onNodeClick** avviene **DOPO** la gestione della selezione
|
|
1309
1309
|
*/
|
|
1310
1310
|
this.SmartSelection = false;
|
|
1311
|
+
/**
|
|
1312
|
+
* Indica di selezionare un elemento per volta qualora **SmartSelection** fosse attivo
|
|
1313
|
+
*/
|
|
1314
|
+
this.SingleSelection = false;
|
|
1311
1315
|
/**
|
|
1312
1316
|
* CSS per la graficazione della selezione dei nodi. Quando un nodo verrà selezionato avrà sopra di se un overlay che 'sborda' di **overlay-padding** pixel,
|
|
1313
1317
|
* di colore **overlay-color** e con un opacità **overlay-opacity**
|
|
@@ -1368,6 +1372,10 @@
|
|
|
1368
1372
|
* Evento lanciato alla selezione o deselezione di un nodo, contiene l'oggetto **data** del nodo in questione e informazioni sul suo stato di selezione
|
|
1369
1373
|
*/
|
|
1370
1374
|
this.onNodeSelection = new i0.EventEmitter();
|
|
1375
|
+
/**
|
|
1376
|
+
* Evento lanciato al termine del Layouting. Se si vuole eseguire codice dopo che il Layout è fatto e completamente graficato, questo è il punto
|
|
1377
|
+
*/
|
|
1378
|
+
this.onLayoutDone = new i0.EventEmitter();
|
|
1371
1379
|
/**
|
|
1372
1380
|
* Evento lanciato al termine del caricamento del diagramma
|
|
1373
1381
|
*/
|
|
@@ -1545,6 +1553,16 @@
|
|
|
1545
1553
|
this.cy.bind('click', 'node', function (event) {
|
|
1546
1554
|
var targetData = event.target.data();
|
|
1547
1555
|
if (_this.SmartSelection) {
|
|
1556
|
+
// In caso di selezione singola ripulisco tutti gli elementi precedentemente selezionati
|
|
1557
|
+
if (_this.SingleSelection) {
|
|
1558
|
+
var selected_1 = _this.cy.elements('node:selected');
|
|
1559
|
+
selected_1.forEach(function (el) {
|
|
1560
|
+
el.selectify();
|
|
1561
|
+
el.unselect();
|
|
1562
|
+
el.unselectify();
|
|
1563
|
+
el.data("__selected", false);
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1548
1566
|
var id = targetData.id;
|
|
1549
1567
|
var el = _this.cy.$id(id);
|
|
1550
1568
|
var selected = el.selected();
|
|
@@ -1563,6 +1581,9 @@
|
|
|
1563
1581
|
var targetData = event.target.data();
|
|
1564
1582
|
_this.onNodeSelection.emit({ data: targetData, selected: true });
|
|
1565
1583
|
});
|
|
1584
|
+
this.cy.bind('layoutstop', function (event) {
|
|
1585
|
+
_this.onLayoutDone.emit();
|
|
1586
|
+
});
|
|
1566
1587
|
this.cy.bind('unselect', 'node', function (event) {
|
|
1567
1588
|
var targetData = event.target.data();
|
|
1568
1589
|
_this.onNodeSelection.emit({ data: targetData, selected: false });
|
|
@@ -1772,6 +1793,7 @@
|
|
|
1772
1793
|
PreserveElementsPosition: [{ type: i0.Input }],
|
|
1773
1794
|
AnimateLayoutChanges: [{ type: i0.Input }],
|
|
1774
1795
|
SmartSelection: [{ type: i0.Input }],
|
|
1796
|
+
SingleSelection: [{ type: i0.Input }],
|
|
1775
1797
|
SmartSelectionStyles: [{ type: i0.Input }],
|
|
1776
1798
|
ResizeThrottleTime: [{ type: i0.Input }],
|
|
1777
1799
|
Layout: [{ type: i0.Input }],
|
|
@@ -1780,6 +1802,7 @@
|
|
|
1780
1802
|
ExtensionModulesApplyer: [{ type: i0.Input }],
|
|
1781
1803
|
onNodeClick: [{ type: i0.Output }],
|
|
1782
1804
|
onNodeSelection: [{ type: i0.Output }],
|
|
1805
|
+
onLayoutDone: [{ type: i0.Output }],
|
|
1783
1806
|
onLoaded: [{ type: i0.Output }]
|
|
1784
1807
|
};
|
|
1785
1808
|
|