cytoscape-react-fe-ml
Version:
118 lines (116 loc) • 3.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var defaultStyle = {
core: {
'selection-box-color': 'rgba(72, 133, 184, 0.2)'
},
node: {
width: '33px',
height: '33px',
shape: 'ellipse',
'border-width': '3px',
'border-opacity': 1,
'border-color': '#3a9caa',
'background-width': function backgroundWidth(ele) {
return ele.data('bgImages').width ? ele.data('bgImages').width : 'auto';
},
'background-height': function backgroundHeight(ele) {
return ele.data('bgImages').height ? ele.data('bgImages').height : 'auto';
},
'background-color': '#3a9caa',
'background-opacity': 1,
'background-repeat': 'no-repeat',
'background-fit': function backgroundFit(ele) {
return ele.data('bgImages') && ele.data('bgImages').fit ? ele.data('bgImages').fit : 'none';
},
'background-image': function backgroundImage(ele) {
return ele.data('bgImages') ? ele.data('bgImages').image : 'none';
},
'background-clip': function backgroundClip(ele) {
return ele.data('bgImages').clip ? ele.data('bgImages').clip : 'none';
},
'background-position-x': 'data(bgImages.positionX)',
'background-position-y': 'data(bgImages.positionY)',
content: 'data(name)',
color: '#707070',
'font-family': 'Microsoft Yahei',
'font-size': '12px',
'text-halign': 'center',
'text-valign': 'bottom',
'text-wrap': 'wrap',
'background-image-crossorigin': 'anonymous',
'text-margin-y': '8px',
'overlay-color': '#000000',
'background-width-relative-to': 'inner',
'background-height-relative-to': 'inner',
padding: '20px'
},
'node:locked': {
'border-color': '#666666'
},
'node:selected': {
'border-color': '#fbba0a'
},
'node.shape-hexagon': {
shape: 'polygon',
'shape-polygon-points': '0 1, 0.8660254037844386 0.5, 0.8660254037844386 -0.5, 0 -1, -0.8660254037844386 -0.5, -0.8660254037844386 0.5'
},
'node.shape-rectangle': {
shape: 'roundrectangle',
width: '50px',
height: '50px'
},
'node.shape-rectangle:selected': {
width: '53px',
height: '53px'
},
edge: {
width: '2px',
'line-color': '#9bb7f0',
content: 'data(event)',
color: '#707070',
'font-family': 'Microsoft Yahei',
'font-size': '12px',
'min-zoomed-font-size': '12px',
'edge-text-rotation': 'autorotate',
'curve-style': 'bezier',
'text-background-color': '#f6f7f9',
'text-background-opacity': '1',
'text-background-shape': 'roundrectangle'
},
'edge:selected': {
'line-color': '#fbba0a'
},
'.hidtxt': {
content: ''
},
'.showbigger': {
content(ele) {
return ele.data('showbigger') || ele.data('name');
}
},
'.showsmall': {
content: ''
},
'node.showtiny:selected': {
'border-width': '10px'
},
'edge.directed': {
'line-color': '#9bb7f0',
'target-arrow-shape': 'triangle',
'target-arrow-color': '#9bb7f0'
},
'edge.directed:selected': {
'line-color': '#fbba0a',
'target-arrow-shape': 'triangle',
'target-arrow-color': '#fbba0a'
},
'.hide': {
opacity: '0'
}
};
var _default = defaultStyle;
exports.default = _default;