mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
Fix for CollectionElements
This commit is contained in:
@@ -80,3 +80,17 @@ cy.on('zoom', (event) => {
|
||||
cy.nodes('$node > node').style('opacity', 0);
|
||||
}
|
||||
});
|
||||
|
||||
cy.animate({
|
||||
fit: {
|
||||
padding: 10,
|
||||
eles: cy.nodes()
|
||||
},
|
||||
duration: 500
|
||||
});
|
||||
|
||||
const node = cy.nodes()[0];
|
||||
cy.animate({
|
||||
center: {eles: node},
|
||||
duration: 500
|
||||
});
|
||||
|
||||
3
types/cytoscape/index.d.ts
vendored
3
types/cytoscape/index.d.ts
vendored
@@ -1127,8 +1127,7 @@ declare namespace cytoscape {
|
||||
/**
|
||||
* The output is a collection of node and edge elements OR single element.
|
||||
*/
|
||||
interface CollectionElements extends
|
||||
EdgeCollection, NodeCollection, SingularElement { }
|
||||
type CollectionElements = EdgeCollection | NodeCollection | SingularElement;
|
||||
|
||||
/**
|
||||
* edges -> Cy.EdgeCollection
|
||||
|
||||
Reference in New Issue
Block a user