forked from p15670423/monkey
Merge branch '400-zero-trust-mvp-venn-diagram' of https://github.com/guardicore/monkey into 400-zero-trust-mvp-venn-diagram
This commit is contained in:
commit
4601882ba2
|
@ -12,13 +12,6 @@ class ResponsiveVennDiagram extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {pillarsGrades} = this.props;
|
const {pillarsGrades} = this.props;
|
||||||
let childrenWidth = this.props.containerWidth, childrenHeight = this.props.containerHeight;
|
|
||||||
|
|
||||||
if (childrenHeight === 0 || isNaN(childrenHeight)) {
|
|
||||||
childrenHeight = childrenWidth;
|
|
||||||
} else {
|
|
||||||
childrenWidth = Math.min(childrenWidth, childrenHeight)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={this.divElement} style={{textAlign: 'center'}}>
|
<div ref={this.divElement} style={{textAlign: 'center'}}>
|
||||||
|
|
|
@ -13,7 +13,6 @@ class VennDiagram extends React.Component {
|
||||||
this.state = {tooltip: {top: 0, left: 0, display: 'none', html: ''}};
|
this.state = {tooltip: {top: 0, left: 0, display: 'none', html: ''}};
|
||||||
|
|
||||||
this.width = this.height = 512;
|
this.width = this.height = 512;
|
||||||
this.zOrder = [];
|
|
||||||
|
|
||||||
this.colors = ['#777777', '#D9534F', '#F0AD4E', '#5CB85C'];
|
this.colors = ['#777777', '#D9534F', '#F0AD4E', '#5CB85C'];
|
||||||
this.prefix = 'vennDiagram';
|
this.prefix = 'vennDiagram';
|
||||||
|
@ -208,7 +207,6 @@ class VennDiagram extends React.Component {
|
||||||
} else {
|
} else {
|
||||||
// equivalent to center translate (width/2, height/2)
|
// equivalent to center translate (width/2, height/2)
|
||||||
let viewPortParameters = (-this.width / 2) + ' ' + (-this.height / 2) + ' ' + this.width + ' ' + this.height;
|
let viewPortParameters = (-this.width / 2) + ' ' + (-this.height / 2) + ' ' + this.width + ' ' + this.height;
|
||||||
let translate = 'translate(' + this.width / 2 + ',' + this.height / 2 + ')';
|
|
||||||
|
|
||||||
let nodes = Object.values(this.layout).map((d_, i_) => {
|
let nodes = Object.values(this.layout).map((d_, i_) => {
|
||||||
if (d_.hasOwnProperty('cx')) {
|
if (d_.hasOwnProperty('cx')) {
|
||||||
|
|
Loading…
Reference in New Issue