mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[cytoscape] fixed typos and added new style options (#35313)
* add and fix line-styles * fix typo * add text-wrap style * add tests
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
179208b780
commit
620c7af73c
@@ -47,7 +47,8 @@ const showAllStyle: cytoscape.Stylesheet[] = [
|
||||
{
|
||||
selector: 'edge',
|
||||
css: {
|
||||
'target-arrow-shape': 'triangle'
|
||||
'target-arrow-shape': 'triangle',
|
||||
'curve-style': 'taxi',
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -58,6 +59,14 @@ const showAllStyle: cytoscape.Stylesheet[] = [
|
||||
'target-arrow-color': 'black',
|
||||
'source-arrow-color': 'black'
|
||||
}
|
||||
},
|
||||
{
|
||||
selector: 'node.lesstext',
|
||||
style: {
|
||||
label: 'data(name)',
|
||||
'text-wrap': 'ellipsis',
|
||||
'text-max-width': '200',
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
6
types/cytoscape/index.d.ts
vendored
6
types/cytoscape/index.d.ts
vendored
@@ -3668,7 +3668,7 @@ declare namespace cytoscape {
|
||||
* Smaller node shapes, like triangle, will not be as aesthetically pleasing.
|
||||
* Also note that edge arrows are unsupported for haystack edges.
|
||||
*/
|
||||
"curve-style"?: "haystack" | "bezier" | "unbundled" | "segments";
|
||||
"curve-style"?: "haystack" | "straight" | "bezier" | "unbundled-bezier" | "segments" | "taxi";
|
||||
/**
|
||||
* The colour of the edge’s line.
|
||||
*/
|
||||
@@ -3939,7 +3939,7 @@ declare namespace cytoscape {
|
||||
* * "none" for no wrapping (including manual newlines ) or
|
||||
* * "wrap" for manual and/ or autowrapping.
|
||||
*/
|
||||
"text-wrap": "none" | "wrap";
|
||||
"text-wrap": "none" | "wrap" | "ellipsis";
|
||||
/**
|
||||
* The maximum width for wrapped text,
|
||||
* applied when "text-wrap" is set to wrap.
|
||||
@@ -4080,7 +4080,7 @@ declare namespace cytoscape {
|
||||
/**
|
||||
* The shape to use for the label background.
|
||||
*/
|
||||
"text-background-shape": "ractangle" | "roundrectangle";
|
||||
"text-background-shape": "rectangle" | "roundrectangle";
|
||||
|
||||
/**
|
||||
* Border:
|
||||
|
||||
Reference in New Issue
Block a user