[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:
-1
2019-05-14 01:41:20 +02:00
committed by Nathan Shively-Sanders
parent 179208b780
commit 620c7af73c
2 changed files with 13 additions and 4 deletions

View File

@@ -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',
}
}
];

View File

@@ -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 edges 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: