[@types/cytoscape] Fix return type of eles.boundingBox. Closes #39080 (#39091)

This commit is contained in:
Dan Manastireanu
2019-10-14 13:48:19 -07:00
committed by Andrew Branch
parent 58d5effb66
commit e9ace4a64f
2 changed files with 21 additions and 4 deletions
+17
View File
@@ -634,3 +634,20 @@ cy.elements(':grabbable').dfs({ roots: '#1' });
// TODO: traversing (need to actively check the nodes/edges distinction)
// TODO: algorithms
// TODO: compound nodes (there aren't any in current test case)
// Check eles.boundingBox return type: https://js.cytoscape.org/#eles.boundingBox
const box1 = eles.boundingBox({});
box1.x1;
box1.x2;
box1.y1;
box1.y2;
box1.w;
box1.h;
// Check eles.renderedBoundingBox return type: https://js.cytoscape.org/#eles.renderedBoundingBox
const box2 = eles.renderedBoundingBox({});
box2.x1;
box2.x2;
box2.y1;
box2.y2;
box2.w;
box2.h;
+4 -4
View File
@@ -1812,14 +1812,14 @@ declare namespace cytoscape {
* @param options An object containing options for the function.
* http://js.cytoscape.org/#eles.boundingBox
*/
boundingBox(options: BoundingBoxOptions): BoundingBox12 | BoundingBoxWH;
boundingbox(options: BoundingBoxOptions): BoundingBox12 | BoundingBoxWH;
boundingBox(options: BoundingBoxOptions): BoundingBox12 & BoundingBoxWH;
boundingbox(options: BoundingBoxOptions): BoundingBox12 & BoundingBoxWH;
/**
* Get the bounding box of the elements in rendered coordinates.
* @param options An object containing options for the function.
*/
renderedBoundingBox(options: BoundingBoxOptions): BoundingBox12 | BoundingBoxWH;
renderedBoundingbox(options: BoundingBoxOptions): BoundingBox12 | BoundingBoxWH;
renderedBoundingBox(options: BoundingBoxOptions): BoundingBox12 & BoundingBoxWH;
renderedBoundingbox(options: BoundingBoxOptions): BoundingBox12 & BoundingBoxWH;
}
/**