Skip to content
Snippets Groups Projects
Commit bec9f8fc authored by Christoph Dornieden's avatar Christoph Dornieden
Browse files

made style to object

parent 9553d540
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,22 @@ export default Ember.Component.extend({ ...@@ -27,7 +27,22 @@ export default Ember.Component.extend({
boxSelectionEnabled: false, boxSelectionEnabled: false,
autounselectify: true, autounselectify: true,
style: cytoscapeStyle, style: cytoscapeStyle({
nodeGroupTextColor: '#3399CC',
nodeGroupColor: 'white',
borderColor: '#39588A',
nodeColor: '#B4DCED',
nodeTextColor: '#3399CC',
serviceColor: '#E8F8FF',
serviceTextColor: '#3399CC',
arrowBorderColor: '#3399CC',
arrowColor: '#3399CC',
arrowLabelColor: 'black'
}
),
elements: _.cloneDeep(this.get('graph')), // TODO! elements: _.cloneDeep(this.get('graph')), // TODO!
......
...@@ -4,23 +4,8 @@ ...@@ -4,23 +4,8 @@
Notice that this is only pseudo-css for cytoscape. See the cytoscape.js docs for more info. Notice that this is only pseudo-css for cytoscape. See the cytoscape.js docs for more info.
*/ */
/*https://color.adobe.com/anggo-djago-color-theme-2691053/*/ export default function(variables){
const arrowBorderColor = '#002A4A'; return `
const arrowColor = arrowBorderColor;
const nodeTextColor = '#002A4A';
const nodeColor = '#17607D';
const serviceColor = '#ED8910';
const serviceTextColor = '#FFFEED';/* '#FFF1CE';*/
const nodeGroupTextColor = nodeTextColor;
const nodeGroupColor = 'white';
const borderColor = '#D64700';
export default `
* { * {
...@@ -48,34 +33,36 @@ $node > node { /* compounds. "Nodes" in meta model. $ selects the parent node th ...@@ -48,34 +33,36 @@ $node > node { /* compounds. "Nodes" in meta model. $ selects the parent node th
} }
[type="node"] { [type="node"] {
background-color: ${nodeColor}; background-color: ${variables.nodeColor};
color: ${nodeTextColor}; color: ${variables.nodeTextColor};
font-weight: bold; font-weight: bold;
} }
[type="serviceInstance"] { [type="serviceInstance"] {
background-color: ${serviceColor}; background-color: ${variables.serviceColor};
color: ${serviceTextColor}; color: ${variables.serviceTextColor};
font-weight: bold; font-weight: bold;
} }
[type="communicationInstance"] { [type="communicationInstance"] {
color: #F4EFDC; color: #F4EFDC;
line-color: ${arrowBorderColor}; line-color: ${variables.arrowBorderColor};
target-arrow-color: ${arrowColor}; target-arrow-color: ${variables.arrowColor};
} }
[type="nodeGroup"] { [type="nodeGroup"] {
color: ${nodeGroupTextColor}; color: ${variables.nodeGroupTextColor};
background-color: ${nodeGroupColor}; background-color: ${variables.nodeGroupColor};
border-style: dotted; border-style: dotted;
border-color: ${borderColor}; border-color: ${variables.borderColor};
border-width: 2px; border-width: 2px;
font-weight: bold; font-weight: bold;
} }
edge { edge {
label: data(label); label: data(label);
color: ${variables.arrowLabelColor};
font-weight: bold;
target-arrow-shape: triangle-backcurve; target-arrow-shape: triangle-backcurve;
curve-style: bezier; /* supports arrows */ curve-style: bezier; /* supports arrows */
width: 2px; width: 2px;
...@@ -94,3 +81,4 @@ edge { ...@@ -94,3 +81,4 @@ edge {
`; /* js string end */ `; /* js string end */
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment